symbol-key

1.0.0 • Public • Published

symbol-key Build Status

Symbol or a string. Nothing else.

Install

$ npm install --save symbol-key

Usage

var Symbol = require('symbol-key')
var symbol = Symbol('my_symbol')
 
var myObj = {}
myObj[symbol] = 1

API

Symbol(name) -> Symbol|string

Returns a symbol, or a string if symbols aren't supported.

If symbols aren't supported, the returned string is guaranteed to be unique.

License

MIT © Andrew Joslin

Readme

Keywords

Package Sidebar

Install

npm i symbol-key

Weekly Downloads

2

Version

1.0.0

License

MIT

Last publish

Collaborators

  • andytjoslin