Projekt

Obecné

Profil

Stáhnout (1.76 KB) Statistiky
| Větev: | Revize:
1
# has-symbols <sup>[![Version Badge][2]][1]</sup>
2

    
3
[![Build Status][3]][4]
4
[![dependency status][5]][6]
5
[![dev dependency status][7]][8]
6
[![License][license-image]][license-url]
7
[![Downloads][downloads-image]][downloads-url]
8

    
9
[![npm badge][11]][1]
10

    
11
Determine if the JS environment has Symbol support. Supports spec, or shams.
12

    
13
## Example
14

    
15
```js
16
var hasSymbols = require('has-symbols');
17

    
18
hasSymbols() === true; // if the environment has native Symbol support. Not polyfillable, not forgeable.
19

    
20
var hasSymbolsKinda = require('has-symbols/shams');
21
hasSymbolsKinda() === true; // if the environment has a Symbol sham that mostly follows the spec.
22
```
23

    
24
## Supported Symbol shams
25
 - get-own-property-symbols [npm](https://www.npmjs.com/package/get-own-property-symbols) | [github](https://github.com/WebReflection/get-own-property-symbols)
26
 - core-js [npm](https://www.npmjs.com/package/core-js) | [github](https://github.com/zloirock/core-js)
27

    
28
## Tests
29
Simply clone the repo, `npm install`, and run `npm test`
30

    
31
[1]: https://npmjs.org/package/has-symbols
32
[2]: http://versionbadg.es/ljharb/has-symbols.svg
33
[3]: https://travis-ci.org/ljharb/has-symbols.svg
34
[4]: https://travis-ci.org/ljharb/has-symbols
35
[5]: https://david-dm.org/ljharb/has-symbols.svg
36
[6]: https://david-dm.org/ljharb/has-symbols
37
[7]: https://david-dm.org/ljharb/has-symbols/dev-status.svg
38
[8]: https://david-dm.org/ljharb/has-symbols#info=devDependencies
39
[9]: https://ci.testling.com/ljharb/has-symbols.png
40
[10]: https://ci.testling.com/ljharb/has-symbols
41
[11]: https://nodei.co/npm/has-symbols.png?downloads=true&stars=true
42
[license-image]: http://img.shields.io/npm/l/has-symbols.svg
43
[license-url]: LICENSE
44
[downloads-image]: http://img.shields.io/npm/dm/has-symbols.svg
45
[downloads-url]: http://npm-stat.com/charts.html?package=has-symbols
(5-5/8)