* @param {any} thing * @returns {string}
(thing)
| 392 | * @returns {string} |
| 393 | */ |
| 394 | function stringify_primitive(thing) { |
| 395 | const type = typeof thing; |
| 396 | if (type === 'string') return stringify_string(thing); |
| 397 | if (thing === void 0) return UNDEFINED.toString(); |
| 398 | if (thing === 0 && 1 / thing < 0) return NEGATIVE_ZERO.toString(); |
| 399 | if (type === 'bigint') return `["BigInt","${thing}"]`; |
| 400 | return String(thing); |
| 401 | } |
no test coverage detected
searching dependent graphs…