| 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) { |