Sha256: 4ae0ae8582e2d3e55de494ff0fc2da2ed36a7493bec4f63ddc6f042c20dc2721

Contents?: true

Size: 1.03 KB

Versions: 6

Compression:

Stored size: 1.03 KB

Contents

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

var Int8Array = global.Int8Array;
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
var $toLocaleString = [].toLocaleString;
var $slice = [].slice;

// iOS Safari 6.x fails here
var TO_LOCALE_STRING_BUG = !!Int8Array && fails(function () {
  $toLocaleString.call(new Int8Array(1));
});

var FORCED = fails(function () {
  return [1, 2].toLocaleString() != new Int8Array([1, 2]).toLocaleString();
}) || !fails(function () {
  Int8Array.prototype.toLocaleString.call([1, 2]);
});

// `%TypedArray%.prototype.toLocaleString` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.tolocalestring
exportTypedArrayMethod('toLocaleString', function toLocaleString() {
  return $toLocaleString.apply(TO_LOCALE_STRING_BUG ? $slice.call(aTypedArray(this)) : aTypedArray(this), arguments);
}, FORCED);

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
optimacms-0.1.61 spec/dummy/node_modules/core-js/modules/es.typed-array.to-locale-string.js
tang-0.2.1 spec/tang_app/node_modules/core-js/modules/es.typed-array.to-locale-string.js
tang-0.2.0 spec/tang_app/node_modules/core-js/modules/es.typed-array.to-locale-string.js
tang-0.1.0 spec/tang_app/node_modules/core-js/modules/es.typed-array.to-locale-string.js
tang-0.0.9 spec/tang_app/node_modules/core-js/modules/es.typed-array.to-locale-string.js
enju_library-0.3.8 spec/dummy/node_modules/core-js/modules/es.typed-array.to-locale-string.js