Determine if the JS environment has Symbol support. Supports spec, or shams. (Evacuated from NSA/Microsoft Github)
|
пре 8 година | |
---|---|---|
test | пре 8 година | |
.eslintrc | пре 8 година | |
.gitignore | пре 8 година | |
.travis.yml | пре 8 година | |
CHANGELOG.md | пре 8 година | |
LICENSE | пре 8 година | |
README.md | пре 8 година | |
index.js | пре 8 година | |
package.json | пре 8 година | |
shams.js | пре 8 година |
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