Skip to content

convert string array to object with same key and value

Notifications You must be signed in to change notification settings

benpptung/util-keymirror

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

util-keymirror

Create an object similar to React's keymirror

Usage

const keymirror = require('util-keymirror');

const responses = keymirror([
  'ROBOT',
  'NOT_EMAIL_OWNER',
  'NO_CONN_COOKIE'
]);

module.exports = responses;

console.log(responses);

{
  ROBOT: 'ROBOT',
  NOT_EMAIL_OWNER: 'NOT_EMAIL_OWNER',
  NO_CONN_COOKIE:  'NO_CONN_COOKIE'
}

About

convert string array to object with same key and value

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published