Skip to content

apax-software/constant-key

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

constant-key

Build Status

Simple library that takes an array of keys and creates an object with keys

Example

var APP_STATES = constantKey(['init', 'loading', 'running', 'unloading']);

/*
APP_STATES = {
    init: 'init',
    loading: 'loading',
    running: 'running',
    unloading: 'unloading'
};
*/

About

Turn an array into object to be used as constants

Resources

Stars

0 stars

Watchers

2 watching

Forks

Packages

 
 
 

Contributors