Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tools/node_modules/eslint-plugin-markdown/node_modules/is-decimal/index.js')
-rw-r--r--tools/node_modules/eslint-plugin-markdown/node_modules/is-decimal/index.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/node_modules/eslint-plugin-markdown/node_modules/is-decimal/index.js b/tools/node_modules/eslint-plugin-markdown/node_modules/is-decimal/index.js
new file mode 100644
index 00000000000..a522104e5cf
--- /dev/null
+++ b/tools/node_modules/eslint-plugin-markdown/node_modules/is-decimal/index.js
@@ -0,0 +1,11 @@
+'use strict'
+
+module.exports = decimal
+
+// Check if the given character code, or the character code at the first
+// character, is decimal.
+function decimal(character) {
+ var code = typeof character === 'string' ? character.charCodeAt(0) : character
+
+ return code >= 48 && code <= 57 /* 0-9 */
+}