/home/techb158/balavpn.abdallabala.com/node_modules/is-document.all
NameSizeModeActions
.github/-0777rm
test/-0777rm
.nycrc1390666editdlrm
CHANGELOG.md5450666editdlrm
eslint.config.mjs1460666editdlrm
index.d.ts1010666editdlrm
index.js12210666editdlrm
LICENSE10670666editdlrm
package.json22830666editdlrm
README.md14340666editdlrm
tsconfig.json1140666editdlrm
Edit: /home/techb158/balavpn.abdallabala.com/node_modules/is-document.all/index.js (1221B)
'use strict'; var callBound = require('call-bound'); var toStr = callBound('Object.prototype.toString'); var isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, no-magic-numbers var objectClass = '[object Object]'; var ddaClass = '[object HTMLAllCollection]'; /** @type {(() => false) | ((value: unknown) => value is HTMLAllCollection)} */ var isDDA = function isDocumentDotAll() { return /** @type {const} */ (false); }; if (typeof document === 'object') { // Firefox 3 canonicalizes DDA to undefined when it's not accessed directly var all = document.all; if (toStr(all) === toStr(document.all)) { isDDA = /** @type {import('.')} */ (function isDocumentDotAll(value) { /* globals document: false */ // in IE 6-8, typeof document.all is "object" and it's truthy if ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) { try { // @ts-expect-error nullish will throw var str = toStr(value); // IE 6-8 uses `objectClass` return (str === ddaClass || str === objectClass) && /** @type {Function} */ (value)('') == null; // eslint-disable-line eqeqeq } catch (e) { /**/ } } return false; }); } } module.exports = isDDA;