is-callable.js 389 B

123456789101112
  1. 'use strict';
  2. var $documentAll = require('../internals/document-all');
  3. var documentAll = $documentAll.all;
  4. // `IsCallable` abstract operation
  5. // https://tc39.es/ecma262/#sec-iscallable
  6. module.exports = $documentAll.IS_HTMLDDA ? function (argument) {
  7. return typeof argument == 'function' || argument === documentAll;
  8. } : function (argument) {
  9. return typeof argument == 'function';
  10. };