2
0

is-boolean.js 245 B

12345678910
  1. 'use strict';
  2. var toString = Object.prototype.toString
  3. , id = toString.call(true);
  4. module.exports = function (x) {
  5. return (typeof x === 'boolean') || ((typeof x === 'object') &&
  6. ((x instanceof Boolean) || (toString.call(x) === id)));
  7. };