1.0.0 • Published 8 years ago

symbol-key v1.0.0

Weekly downloads
7
License
MIT
Repository
github
Last release
8 years ago

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