Skip to content

Commit

Permalink
Use is-boolean-object.
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Sep 27, 2015
1 parent c598d44 commit ba4dcee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
12 changes: 2 additions & 10 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

var ObjectPrototype = Object.prototype;
var toStr = ObjectPrototype.toString;
var booleanValue = Boolean.prototype.valueOf;
var has = ObjectPrototype.hasOwnProperty;
var isArrowFunction = require('is-arrow-function');
var isBoolean = require('is-boolean-object');
var isDate = require('is-date-object');
var isGenerator = require('is-generator-function');
var isNumber = require('is-number-object');
Expand Down Expand Up @@ -36,16 +38,6 @@ if (!getPrototypeOf) {
/* eslint-enable no-proto */
}

var booleanValue = Boolean.prototype.valueOf;
var isBoolean = function isBoolean(value) {
try {
booleanValue.call(value);
return true;
} catch (e) {
return false;
}
};

var isArray = Array.isArray || function (value) {
return toStr.call(value) === '[object Array]';
};
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
],
"dependencies": {
"is-arrow-function": "^2.0.3",
"is-boolean-object": "^1.0.0",
"is-callable": "^1.0.4",
"is-date-object": "^1.0.1",
"is-generator-function": "^1.0.3",
Expand Down

0 comments on commit ba4dcee

Please sign in to comment.