wallet-core/node_modules/well-known-symbols
2017-08-14 05:02:09 +02:00
..
index.js node_modules 2017-08-14 05:02:09 +02:00
LICENSE node_modules 2017-08-14 05:02:09 +02:00
package.json node_modules 2017-08-14 05:02:09 +02:00
README.md node_modules 2017-08-14 05:02:09 +02:00

well-known-symbols

Check whether a symbol is well-known.

Requires Node.js 4 or above. Note that not all Node.js versions support the same well-known symbols.

Installation

$ npm install --save well-known-symbols

Usage

const wellKnownSymbols = require('well-known-symbols')

wellKnownSymbols.isWellKnown(Symbol.iterator) // true
wellKnownSymbols.isWellKnown(Symbol()) // false

wellKnownSymbols.getLabel(Symbol.iterator) // 'Symbol.iterator'
wellKnownSymbols.getLabel(Symbol()) // undefined