caoge c760052ff9 机车状态修改 | 8 miesięcy temu | |
---|---|---|
.. | ||
.github | 8 miesięcy temu | |
test | 8 miesięcy temu | |
.eslintignore | 8 miesięcy temu | |
.eslintrc | 8 miesięcy temu | |
.nycrc | 8 miesięcy temu | |
CHANGELOG.md | 8 miesięcy temu | |
LICENSE | 8 miesięcy temu | |
README.md | 8 miesięcy temu | |
getInferredName.js | 8 miesięcy temu | |
index.js | 8 miesięcy temu | |
package.json | 8 miesięcy temu |
Gets the description of a Symbol. Handles Symbol()
vs Symbol('')
properly when possible.
var getSymbolDescription = require('get-symbol-description');
var assert = require('assert');
assert(getSymbolDescription(Symbol()) === undefined);
assert(getSymbolDescription(Symbol('')) === ''); // or `undefined`, if in an engine that lacks name inference from concise method
assert(getSymbolDescription(Symbol('foo')) === 'foo');
assert(getSymbolDescription(Symbol.iterator) === 'Symbol.iterator');
Simply clone the repo, npm install
, and run npm test