keymirror-symbol
v1.0.2
Published
a function to mirror object keys as symbol
Downloads
12
Readme
keymirror-symbol
install
$ npm install keymirror-symbol
require
var keyMirrorSymbol = require("keymirror-symbol")
api
object: keyMirrorSymbol(object)
takes an object, and creates a new one having,
for each object
's key
a key
property set to
Symbol(key)
.
example
var constants = keyMirror({
GET_DATA : null,
RECEIVED_DATA : null
})
constants.GET_DATA // Symbol("GET_DATA")