0.0.2 • Published 6 years ago

object-from-pairs v0.0.2

Weekly downloads
2
License
CC0 OR UNLICENSE ...
Repository
-
Last release
6 years ago

object from pairs

Create an object from an array of pairs

Can be used as a partial ponyfill or prollyfil for tc39 / proposal-object-from-entries

Author: @brodybits (Christopher J. Brody)

License: CC0 OR UNLICENSE OR ISC OR Apache-2.0 OR CC-BY-SA-3.0 OR CC-BY-SA-4.0

Sample

const objectFromPairs = require('object-from-pairs')

console.log(objectFromPairs([
  [ 'first' + 'Key',        'first value' ],
  [ 'second' + '-' + 'key', 'second value' ],
]))

outputs the following:

{ firstKey: 'first value', 'second-key': 'second value' }

(see quick-demo.js)

TODO

FUTURE TBD

See also