fcc1404a116568d30d44ba0fe1415f800263ba21a862e9a5e50ffa1f3a3a33c7.json 2.2 KB

1
  1. {"ast":null,"code":"'use strict';\n\nvar callBound = require('call-bound');\n\n/** @type {undefined | ((thisArg: SharedArrayBuffer) => number)} */\nvar $byteLength = callBound('SharedArrayBuffer.prototype.byteLength', true);\n\n/** @type {import('.')} */\nmodule.exports = $byteLength ? function isSharedArrayBuffer(obj) {\n if (!obj || typeof obj !== 'object') {\n return false;\n }\n try {\n // @ts-expect-error TS can't figure out this closed-over variable is non-nullable, and it's fine that `obj` might not be a SAB\n $byteLength(obj);\n return true;\n } catch (e) {\n return false;\n }\n} : function isSharedArrayBuffer(_obj) {\n // eslint-disable-line no-unused-vars\n return false;\n};","map":{"version":3,"names":["callBound","require","$byteLength","module","exports","isSharedArrayBuffer","obj","e","_obj"],"sources":["/Users/max_liu/max_liu/company/tools_auto_pt/node_modules/is-shared-array-buffer/index.js"],"sourcesContent":["'use strict';\n\nvar callBound = require('call-bound');\n\n/** @type {undefined | ((thisArg: SharedArrayBuffer) => number)} */\nvar $byteLength = callBound('SharedArrayBuffer.prototype.byteLength', true);\n\n/** @type {import('.')} */\nmodule.exports = $byteLength\n\t? function isSharedArrayBuffer(obj) {\n\t\tif (!obj || typeof obj !== 'object') {\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\t// @ts-expect-error TS can't figure out this closed-over variable is non-nullable, and it's fine that `obj` might not be a SAB\n\t\t\t$byteLength(obj);\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t}\n\t: function isSharedArrayBuffer(_obj) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t};\n"],"mappings":"AAAA,YAAY;;AAEZ,IAAIA,SAAS,GAAGC,OAAO,CAAC,YAAY,CAAC;;AAErC;AACA,IAAIC,WAAW,GAAGF,SAAS,CAAC,wCAAwC,EAAE,IAAI,CAAC;;AAE3E;AACAG,MAAM,CAACC,OAAO,GAAGF,WAAW,GACzB,SAASG,mBAAmBA,CAACC,GAAG,EAAE;EACnC,IAAI,CAACA,GAAG,IAAI,OAAOA,GAAG,KAAK,QAAQ,EAAE;IACpC,OAAO,KAAK;EACb;EACA,IAAI;IACH;IACAJ,WAAW,CAACI,GAAG,CAAC;IAChB,OAAO,IAAI;EACZ,CAAC,CAAC,OAAOC,CAAC,EAAE;IACX,OAAO,KAAK;EACb;AACD,CAAC,GACC,SAASF,mBAAmBA,CAACG,IAAI,EAAE;EAAE;EACtC,OAAO,KAAK;AACb,CAAC","ignoreList":[]},"metadata":{},"sourceType":"script","externalDependencies":[]}