symbol-keymirror
v0.1.3
Published
Takes an array of string and returns an object with the string as key, and Symbol(key) as the value
Downloads
54
Readme
symbol-keymirror
How to install?
$ npm install --save symbol-keymirror
How to use?
object: symbolKeyMirror([String]) Takes an array of string and returns an object with the string as key, and Symbol(key) as the value
const symbolKeyMirror = require('symbol-keymirror');
const keys = [
'ADD_ITEM',
'REMOVE_ITEM'
];
const symbols = symbolKeyMirror(keys);
symbols.ADD_ITEM; //Symbol('ADD_ITEM')