arraybuffer.prototype.transfertofixedlength
Version:
ES Proposal spec-compliant shim for ArrayBuffer.prototype.transferToFixedLength
10 lines (7 loc) • 326 B
JavaScript
;
var ArrayBufferCopyAndDetach = require('es-abstract/2024/ArrayBufferCopyAndDetach');
module.exports = function transferToFixedLength() {
var newLength = arguments.length > 0 ? arguments[0] : void undefined;
var O = this; // step 1
return ArrayBufferCopyAndDetach(O, newLength, 'FIXED-LENGTH'); // step 2
};