Files
NapCatQQ/.pnpm-store/v3/files/d3/3a48a98e6e85a4f41e4e17a564fe5bc56799df036bf4b001f1ba050bc888fb2a38489186c6a3e1b3825e9d9c5d343f777663240b4cfebdf6a4392a2b1ad401
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

20 lines
591 B
Plaintext

'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
/** @type {undefined | ((thisArg: import('.').TypedArray) => Buffer<ArrayBufferLike>)} */
var $typedArrayBuffer = callBound('TypedArray.prototype.buffer', true);
var isTypedArray = require('is-typed-array');
/** @type {import('.')} */
// node <= 0.10, < 0.11.4 has a nonconfigurable own property instead of a prototype getter
module.exports = $typedArrayBuffer || function typedArrayBuffer(x) {
if (!isTypedArray(x)) {
throw new $TypeError('Not a Typed Array');
}
return x.buffer;
};