arraymirror

Create mirror-object from array

Usage no npm install needed!

<script type="module">
  import arraymirror from 'https://cdn.skypack.dev/arraymirror';
</script>

README

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'
// }