You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
818 B
22 lines
818 B
'use strict'; |
|
var exportTypedArrayMethod = require('../internals/array-buffer-view-core').exportTypedArrayMethod; |
|
var fails = require('../internals/fails'); |
|
var global = require('../internals/global'); |
|
var uncurryThis = require('../internals/function-uncurry-this'); |
|
|
|
var Uint8Array = global.Uint8Array; |
|
var Uint8ArrayPrototype = Uint8Array && Uint8Array.prototype || {}; |
|
var arrayToString = [].toString; |
|
var join = uncurryThis([].join); |
|
|
|
if (fails(function () { arrayToString.call({}); })) { |
|
arrayToString = function toString() { |
|
return join(this); |
|
}; |
|
} |
|
|
|
var IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString != arrayToString; |
|
|
|
// `%TypedArray%.prototype.toString` method |
|
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tostring |
|
exportTypedArrayMethod('toString', arrayToString, IS_NOT_ARRAY_METHOD);
|
|
|