(value: unknown)
| 17 | * Check `core/test/render3/perf/render_stringify` for benchmarks and alternate implementations. |
| 18 | */ |
| 19 | export function renderStringify(value: unknown): string { |
| 20 | if (typeof value === 'string') return value; |
| 21 | if (value == null) return ''; |
| 22 | // Use `String` so that it invokes the `toString` method of the value. Note that this |
| 23 | // appears to be faster than calling `value.toString` (see `render_stringify` benchmark). |
| 24 | return String(value); |
| 25 | } |
| 26 | |
| 27 | /** |
| 28 | * Used to stringify a value so that it can be displayed in an error message. |
no outgoing calls
no test coverage detected
searching dependent graphs…