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