Last change
on this file since 8d391a1 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
755 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | 'use strict';
|
---|
| 2 | var exportTypedArrayMethod = require('../internals/array-buffer-view-core').exportTypedArrayMethod;
|
---|
| 3 | var fails = require('../internals/fails');
|
---|
| 4 | var global = require('../internals/global');
|
---|
| 5 |
|
---|
| 6 | var Uint8Array = global.Uint8Array;
|
---|
| 7 | var Uint8ArrayPrototype = Uint8Array && Uint8Array.prototype || {};
|
---|
| 8 | var arrayToString = [].toString;
|
---|
| 9 | var arrayJoin = [].join;
|
---|
| 10 |
|
---|
| 11 | if (fails(function () { arrayToString.call({}); })) {
|
---|
| 12 | arrayToString = function toString() {
|
---|
| 13 | return arrayJoin.call(this);
|
---|
| 14 | };
|
---|
| 15 | }
|
---|
| 16 |
|
---|
| 17 | var IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString != arrayToString;
|
---|
| 18 |
|
---|
| 19 | // `%TypedArray%.prototype.toString` method
|
---|
| 20 | // https://tc39.es/ecma262/#sec-%typedarray%.prototype.tostring
|
---|
| 21 | exportTypedArrayMethod('toString', arrayToString, IS_NOT_ARRAY_METHOD);
|
---|
Note:
See
TracBrowser
for help on using the repository browser.