From 7ba6c38a7c27b5834f6ac67e064392c06b5aaa91 Mon Sep 17 00:00:00 2001 From: Kenan Yildirim Date: Tue, 25 Mar 2014 18:01:11 -0400 Subject: [PATCH] Use KenanY/is-number Closes #1 --- component.json | 4 +++- index.js | 8 +------- package.json | 5 ++++- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/component.json b/component.json index 36fdea9..0d36816 100644 --- a/component.json +++ b/component.json @@ -4,7 +4,9 @@ "description": "Is nan component", "version": "1.0.0", "keywords": [], - "dependencies": {}, + "dependencies": { + "KenanY/is-number": "*" + }, "development": {}, "scripts": [ "index.js" diff --git a/index.js b/index.js index 38c13f0..a8527b9 100644 --- a/index.js +++ b/index.js @@ -1,10 +1,4 @@ -var numberClass = '[object Number]'; -var objectProto = Object.prototype; -var toString = objectProto.toString; - -function isNumber(value) { - return typeof value == 'number' || toString.call(value) == numberClass; -} +var isNumber = require('is-number'); /** * Checks if `value` is `NaN`. diff --git a/package.json b/package.json index c10b32c..687fd48 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,9 @@ "components": "component install --dev", "clean": "rm -fr build components" }, + "dependencies": { + "is-number": "KenanY/is-number" + }, "devDependencies": { "lodash.map": "^2.4.1", "tape": "^2.12.0" @@ -41,4 +44,4 @@ "ipad/6" ] } -} \ No newline at end of file +}