array-into-object

Convert an array into an object (odd entries are keys, even entries are values)

Usage no npm install needed!

<script type="module">
  import arrayIntoObject from 'https://cdn.skypack.dev/array-into-object';
</script>

README

array-into-object

Build Status

Converts an array into an object -- where odd values are keys, and even values are values.

Confused?

let a2o = require('array-into-object')

a2o([1, 2, 3, 4]) // {1: 2, 3: 4}