mirror of
https://github.com/Snigdha-OS/documentation.git
synced 2025-09-06 19:15:12 +02:00
13 lines
533 B
JavaScript
13 lines
533 B
JavaScript
'use strict';
|
|
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
var documentAll = typeof document == 'object' && document.all;
|
|
|
|
// `IsCallable` abstract operation
|
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
|
|
module.exports = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
|
|
return typeof argument == 'function' || argument === documentAll;
|
|
} : function (argument) {
|
|
return typeof argument == 'function';
|
|
};
|