Sha256: 1ca34b44e45fc10e9a86d3ab0a347ba977d3a1b41a0f64b9504e5d8369090901

Contents?: true

Size: 601 Bytes

Versions: 9

Compression:

Stored size: 601 Bytes

Contents

'use strict';
var ArrayBufferViewCore = require('../internals/array-buffer-view-core');

var aTypedArray = ArrayBufferViewCore.aTypedArray;
var floor = Math.floor;

// `%TypedArray%.prototype.reverse` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.reverse
ArrayBufferViewCore.exportProto('reverse', function reverse() {
  var that = this;
  var length = aTypedArray(that).length;
  var middle = floor(length / 2);
  var index = 0;
  var value;
  while (index < middle) {
    value = that[index];
    that[index++] = that[--length];
    that[length] = value;
  } return that;
});

Version data entries

9 entries across 9 versions & 3 rubygems

Version Path
disco_app-0.18.0 test/dummy/node_modules/core-js/modules/es.typed-array.reverse.js
disco_app-0.18.2 test/dummy/node_modules/core-js/modules/es.typed-array.reverse.js
jester-data-8.0.0 node_modules/core-js/modules/es.typed-array.reverse.js
ezii-os-5.2.1 node_modules/core-js/modules/es.typed-array.reverse.js
ezii-os-2.0.1 node_modules/core-js/modules/es.typed-array.reverse.js
ezii-os-1.1.0 node_modules/core-js/modules/es.typed-array.reverse.js
ezii-os-1.0.0 node_modules/core-js/modules/es.typed-array.reverse.js
ezii-os-0.0.0.1.0 node_modules/core-js/modules/es.typed-array.reverse.js
ezii-os-0.0.0.0.1 node_modules/core-js/modules/es.typed-array.reverse.js