1.0.0 • Published 8 years ago

arraymirror v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

arraymirror

Build Status Dependencies Dev Dependencies

Create mirror-object from array. A mirror-object is an object with values equal to it's key names.

It's just like keymirror but using array instead.

INSTALLATION

npm install arraymirror

USAGE

const am = require('arraymirror');
const COLORS = am(['RED', 'GREEN', 'BLUE', 'BLACK', 'WHITE']);
console.log(COLORS);

// the output will be:
// {
//   RED: 'RED',
//   GREEN: 'GREEN',
//   BLUE: 'BLUE',
//   BLACK: 'BLACK',
//   WHITE: 'WHITE'
// }