esnext.array-buffer.transfer-to-fixed-length.js 479 B

1234567891011
  1. 'use strict';
  2. var $ = require('../internals/export');
  3. var $transfer = require('../internals/array-buffer-transfer');
  4. // `ArrayBuffer.prototype.transferToFixedLength` method
  5. // https://tc39.es/proposal-arraybuffer-transfer/#sec-arraybuffer.prototype.transfertofixedlength
  6. if ($transfer) $({ target: 'ArrayBuffer', proto: true }, {
  7. transferToFixedLength: function transferToFixedLength() {
  8. return $transfer(this, arguments.length ? arguments[0] : undefined, false);
  9. }
  10. });