MCPcopy Create free account
hub / github.com/GNOME/gjs / _hasStandardToString

Function _hasStandardToString

modules/script/_bootstrap/default.js:31–39  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

29 }
30
31 function _hasStandardToString(value) {
32 return value.toString === Object.prototype.toString ||
33 value.toString === Array.prototype.toString ||
34 // although TypedArrays have a standard Array.prototype.toString, we currently enforce an override to warn
35 // for legacy behaviour, making the toString non-standard for
36 // "any Uint8Array instances created in situations where previously a ByteArray would have been created"
37 _isTypedArray(value) ||
38 value.toString === Date.prototype.toString;
39 }
40
41 function prettyPrint(value, extra) {
42 switch (typeof value) {

Callers 2

prettyPrintFunction · 0.85
formatObjectFunction · 0.85

Calls 1

_isTypedArrayFunction · 0.85

Tested by

no test coverage detected