MCPcopy Create free account
hub / github.com/easydiffusion/easydiffusion / hasCustomToString

Function hasCustomToString

ui/plugins/ui/jasmine/jasmine.js:6897–6910  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

6895 }
6896
6897 function hasCustomToString(value) {
6898 // value.toString !== Object.prototype.toString if value has no custom toString but is from another context (e.g.
6899 // iframe, web worker)
6900 try {
6901 return (
6902 j$.isFunction_(value.toString) &&
6903 value.toString !== Object.prototype.toString &&
6904 value.toString() !== Object.prototype.toString.call(value)
6905 )
6906 } catch (e) {
6907 // The custom toString() threw.
6908 return true
6909 }
6910 }
6911
6912 function truncate(s, maxlen) {
6913 if (s.length <= maxlen) {

Callers 1

formatMethod · 0.85

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected