Skip to content

Commit

Permalink
Merge pull request #8 from realityking/master
Browse files Browse the repository at this point in the history
Remove dependency on kind-of
  • Loading branch information
jonschlinkert committed Oct 17, 2017
2 parents af885e2 + 1a94dd2 commit db0d5e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
8 changes: 3 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@

'use strict';

var typeOf = require('kind-of');

module.exports = function isNumber(num) {
var type = typeOf(num);
var type = typeof num;

if (type === 'string') {
if (type === 'string' || num instanceof String) {
if (!num.trim()) return false;
} else if (type !== 'number') {
} else if (type !== 'number' && !(num instanceof Number)) {
return false;
}

Expand Down
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
"scripts": {
"test": "mocha"
},
"dependencies": {
"kind-of": "^3.0.2"
},
"devDependencies": {
"benchmarked": "^0.2.5",
"chalk": "^1.1.3",
Expand Down Expand Up @@ -80,4 +77,4 @@
"verb-generate-readme"
]
}
}
}

0 comments on commit db0d5e3

Please sign in to comment.