(value)
| 579 | } |
| 580 | |
| 581 | let stringifyPrimitive = function (value) { |
| 582 | switch (typeof value) { |
| 583 | case 'string': |
| 584 | return strEscape(value) |
| 585 | case 'number': |
| 586 | return isFinite(value) ? String(value) : fail ? fail(value) : 'null' |
| 587 | case 'boolean': |
| 588 | return value === true ? 'true' : 'false' |
| 589 | case 'undefined': |
| 590 | return undefined |
| 591 | case 'bigint': |
| 592 | if (bigint) { |
| 593 | return bigint === 'string' ? `"${value}"` : String(value) |
| 594 | } |
| 595 | // fallthrough |
| 596 | default: |
| 597 | return fail ? fail(value) : undefined |
| 598 | } |
| 599 | } |
| 600 | |
| 601 | let stringifyObject = function (key, value, stack) { |
| 602 | if (value === null) { |
no test coverage detected