MCPcopy Create free account
hub / github.com/EsperoTech/yaade / hasCustomToString

Function hasCustomToString

server/src/main/resources/jasmine.js:7422–7435  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

7420 }
7421
7422 function hasCustomToString(value) {
7423 // value.toString !== Object.prototype.toString if value has no custom toString but is from another context (e.g.
7424 // iframe, web worker)
7425 try {
7426 return (
7427 j$.isFunction_(value.toString) &&
7428 value.toString !== Object.prototype.toString &&
7429 value.toString() !== Object.prototype.toString.call(value)
7430 );
7431 } catch (e) {
7432 // The custom toString() threw.
7433 return true;
7434 }
7435 }
7436
7437 function truncate(s, maxlen) {
7438 if (s.length <= maxlen) {

Callers 1

formatMethod · 0.70

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected