UNPKG

@n3okill/utils

Version:
15 lines 521 B
"use strict"; /* global NodeJS */ Object.defineProperty(exports, "__esModule", { value: true }); exports.cloneTypedArray = cloneTypedArray; const _internal_1 = require("../_internal"); /** * Clone a TypedArray * @param {TypedArray} origin * @param {Function} transform * @returns {TypedArray} */ function cloneTypedArray(origin, transform) { return (0, _internal_1._checkTransform)(new origin.constructor(origin.buffer, origin.byteOffset, origin.length), transform); } //# sourceMappingURL=cloneTypedArray.js.map