Determine if the JS environment has Symbol support. Supports spec, or shams. (Evacuated from NSA/Microsoft Github)
Jordan Harband cb9f0a521a [Dev Deps] update `safe-publish-latest` | 8 anos atrás | |
---|---|---|
test | 8 anos atrás | |
.eslintrc | 8 anos atrás | |
.gitignore | 8 anos atrás | |
.travis.yml | 8 anos atrás | |
CHANGELOG.md | 8 anos atrás | |
LICENSE | 8 anos atrás | |
README.md | 8 anos atrás | |
index.js | 8 anos atrás | |
package.json | 8 anos atrás | |
shams.js | 8 anos atrás |
Determine if the JS environment has Symbol support. Supports spec, or shams.
var hasSymbols = require('has-symbols');
hasSymbols() === true; // if the environment has native Symbol support. Not polyfillable, not forgeable.
var hasSymbolsKinda = require('has-symbols/shams');
hasSymbolsKinda() === true; // if the environment has a Symbol sham that mostly follows the spec.
Simply clone the repo, npm install
, and run npm test