(sym)
| 145 | } |
| 146 | |
| 147 | function formatSymbol(sym) { |
| 148 | // Try to format Symbols in the same way that they would be constructed. |
| 149 | |
| 150 | // First check if this is a global registered symbol |
| 151 | const globalKey = Symbol.keyFor(sym); |
| 152 | if (globalKey !== undefined) |
| 153 | return `Symbol.for("${globalKey}")`; |
| 154 | |
| 155 | const descr = sym.description; |
| 156 | // Special-case the 'well-known' (built-in) Symbols |
| 157 | if (descr.startsWith('Symbol.')) |
| 158 | return descr; |
| 159 | |
| 160 | // Otherwise, it's just a regular symbol |
| 161 | return `Symbol("${descr}")`; |
| 162 | } |
| 163 | |
| 164 | Object.defineProperties(exports, { |
| 165 | ARGV: { |
no outgoing calls
no test coverage detected