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