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 years ago | |
---|---|---|
test | 8 years ago | |
.eslintrc | 8 years ago | |
.gitignore | 8 years ago | |
.travis.yml | 8 years ago | |
CHANGELOG.md | 8 years ago | |
LICENSE | 8 years ago | |
README.md | 8 years ago | |
index.js | 8 years ago | |
package.json | 8 years ago | |
shams.js | 8 years ago |
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