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