https://github.com/dashed/issymbol
Test if something is a Symbol. Works with either native or polyfill Symbols.
https://github.com/dashed/issymbol
Last synced: 7 months ago
JSON representation
Test if something is a Symbol. Works with either native or polyfill Symbols.
- Host: GitHub
- URL: https://github.com/dashed/issymbol
- Owner: dashed
- License: mit
- Created: 2015-12-22T09:44:32.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-12-22T10:32:00.000Z (about 10 years ago)
- Last Synced: 2025-06-13T15:19:11.965Z (8 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# issymbol [](https://travis-ci.org/Dashed/issymbol)
> `issymbol` tests if something is a Symbol. Works with either native Symbol or polyfill Symbol.
## Usage
```
npm install --save issymbol
```
```js
const issymbol = require('issymbol');
// works with any native Symbol implementation
issymbol(Symbol());
// → true
// also works with your favourite polyfill
const core = require('core-js/library');
issymbol(core.Symbol());
// → true
// returns false any input that is not a Symbol
issymbol('not a symbol');
// → false
```
## Credit
Code for `issymbol` originated from https://github.com/medikoo/es6-symbol/.
## License
MIT