Simon Priet e69a613a37 feat: Created a mini nodeJS server with NewMan for testing without PostMan GUI.
This will mimic a run in a CD/CI environment or docker container.
2021-09-08 14:01:19 +02:00

20 lines
519 B
Markdown

# Symbols
[![NPM version](https://badge.fury.io/js/symbol.png)](http://badge.fury.io/js/symbol)
[ES6 Symbols](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-symbol-objects), in your ES5.
If `Symbol` is already defined, it will be used. Otherwise, this implements as much of the `Symbol` spec as is possible with plain JavaScript.
## Usage
```js
var Symbol = require('symbol');
var key = Symbol();
var obj = {};
obj[key] = 'foo';
console.log(obj[key]); // 'foo'
console.log(Object.keys(obj)); // []
```