Sha256: 88836e0ac1636bf6652d9e3819767bd1629e32b84e2c572f8c26226cd4e7a766

Contents?: true

Size: 1.75 KB

Versions: 76

Compression:

Stored size: 1.75 KB

Contents

'use strict';
var $export = require('./_export');
var $typed = require('./_typed');
var buffer = require('./_typed-buffer');
var anObject = require('./_an-object');
var toAbsoluteIndex = require('./_to-absolute-index');
var toLength = require('./_to-length');
var isObject = require('./_is-object');
var ArrayBuffer = require('./_global').ArrayBuffer;
var speciesConstructor = require('./_species-constructor');
var $ArrayBuffer = buffer.ArrayBuffer;
var $DataView = buffer.DataView;
var $isView = $typed.ABV && ArrayBuffer.isView;
var $slice = $ArrayBuffer.prototype.slice;
var VIEW = $typed.VIEW;
var ARRAY_BUFFER = 'ArrayBuffer';

$export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { ArrayBuffer: $ArrayBuffer });

$export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, {
  // 24.1.3.1 ArrayBuffer.isView(arg)
  isView: function isView(it) {
    return $isView && $isView(it) || isObject(it) && VIEW in it;
  }
});

$export($export.P + $export.U + $export.F * require('./_fails')(function () {
  return !new $ArrayBuffer(2).slice(1, undefined).byteLength;
}), ARRAY_BUFFER, {
  // 24.1.4.3 ArrayBuffer.prototype.slice(start, end)
  slice: function slice(start, end) {
    if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix
    var len = anObject(this).byteLength;
    var first = toAbsoluteIndex(start, len);
    var fin = toAbsoluteIndex(end === undefined ? len : end, len);
    var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first));
    var viewS = new $DataView(this);
    var viewT = new $DataView(result);
    var index = 0;
    while (first < fin) {
      viewT.setUint8(index++, viewS.getUint8(first++));
    } return result;
  }
});

require('./_set-species')(ARRAY_BUFFER);

Version data entries

76 entries across 35 versions & 6 rubygems

Version Path
immosquare-cleaner-0.1.60 node_modules/core-js/library/modules/es6.typed.array-buffer.js
immosquare-cleaner-0.1.60 node_modules/core-js/modules/es6.typed.array-buffer.js
immosquare-cleaner-0.1.59 node_modules/core-js/library/modules/es6.typed.array-buffer.js
immosquare-cleaner-0.1.59 node_modules/core-js/modules/es6.typed.array-buffer.js
immosquare-cleaner-0.1.58 node_modules/core-js/modules/es6.typed.array-buffer.js
immosquare-cleaner-0.1.58 node_modules/core-js/library/modules/es6.typed.array-buffer.js
immosquare-cleaner-0.1.57 node_modules/core-js/library/modules/es6.typed.array-buffer.js
immosquare-cleaner-0.1.57 node_modules/core-js/modules/es6.typed.array-buffer.js
immosquare-cleaner-0.1.56 node_modules/core-js/library/modules/es6.typed.array-buffer.js
immosquare-cleaner-0.1.56 node_modules/core-js/modules/es6.typed.array-buffer.js
immosquare-cleaner-0.1.55 node_modules/core-js/library/modules/es6.typed.array-buffer.js
immosquare-cleaner-0.1.55 node_modules/core-js/modules/es6.typed.array-buffer.js
immosquare-cleaner-0.1.54 node_modules/core-js/library/modules/es6.typed.array-buffer.js
immosquare-cleaner-0.1.54 node_modules/core-js/modules/es6.typed.array-buffer.js
immosquare-cleaner-0.1.53 node_modules/core-js/modules/es6.typed.array-buffer.js
immosquare-cleaner-0.1.53 node_modules/core-js/library/modules/es6.typed.array-buffer.js
immosquare-cleaner-0.1.52 node_modules/core-js/library/modules/es6.typed.array-buffer.js
immosquare-cleaner-0.1.52 node_modules/core-js/modules/es6.typed.array-buffer.js
immosquare-cleaner-0.1.51 node_modules/core-js/library/modules/es6.typed.array-buffer.js
immosquare-cleaner-0.1.51 node_modules/core-js/modules/es6.typed.array-buffer.js