You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
parttimejob/node_modules/core-js/internals/array-buffer-is-detached.js

20 lines
606 B

1 month ago
'use strict';
var globalThis = require('../internals/global-this');
var uncurryThis = require('../internals/function-uncurry-this-clause');
var arrayBufferByteLength = require('../internals/array-buffer-byte-length');
var ArrayBuffer = globalThis.ArrayBuffer;
var ArrayBufferPrototype = ArrayBuffer && ArrayBuffer.prototype;
var slice = ArrayBufferPrototype && uncurryThis(ArrayBufferPrototype.slice);
module.exports = function (O) {
if (arrayBufferByteLength(O) !== 0) return false;
if (!slice) return false;
try {
slice(O, 0, 0);
return false;
} catch (error) {
return true;
}
};