symbol.js 197 B

123456
  1. export default function inspectSymbol(value) {
  2. if ('description' in Symbol.prototype) {
  3. return value.description ? `Symbol(${value.description})` : 'Symbol()'
  4. }
  5. return value.toString()
  6. }