Skip to content

Javascript library: Takes an array of string and returns an object with the string as key, and Symbol(key) as the value

License

Notifications You must be signed in to change notification settings

jsoulet/symbol-keymirror

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Javascript library: Takes an array of string and returns an object with the string as key, and Symbol(key) as the value

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published