is-object.js 494 B

123456789101112
  1. var isCallable = require('../internals/is-callable');
  2. var documentAll = typeof document == 'object' && document.all;
  3. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
  4. var SPECIAL_DOCUMENT_ALL = typeof documentAll == 'undefined' && documentAll !== undefined;
  5. module.exports = SPECIAL_DOCUMENT_ALL ? function (it) {
  6. return typeof it == 'object' ? it !== null : isCallable(it) || it === documentAll;
  7. } : function (it) {
  8. return typeof it == 'object' ? it !== null : isCallable(it);
  9. };