symbol-keymirror

0.1.3 • Public • Published

symbol-keymirror NPM TravisCI

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')

Package Sidebar

Install

npm i symbol-keymirror

Weekly Downloads

26

Version

0.1.3

License

MIT

Last publish

Collaborators

  • jsoulet