This repository has been archived on 2024-09-18. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
front/node_modules/is-shared-array-buffer/index.js
2024-09-18 13:34:19 -03:00

23 lines
481 B
JavaScript

'use strict';
var callBound = require('call-bind/callBound');
var $byteLength = callBound('SharedArrayBuffer.prototype.byteLength', true);
/** @type {import('.')} */
module.exports = $byteLength
? function isSharedArrayBuffer(obj) {
if (!obj || typeof obj !== 'object') {
return false;
}
try {
$byteLength(obj);
return true;
} catch (e) {
return false;
}
}
: function isSharedArrayBuffer(obj) { // eslint-disable-line no-unused-vars
return false;
};