is-boolean.js 269 B

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