https://github.com/haykam821/pair-into-object
Merges two pairs of arrays into a single object.
https://github.com/haykam821/pair-into-object
array merge object pair
Last synced: 9 months ago
JSON representation
Merges two pairs of arrays into a single object.
- Host: GitHub
- URL: https://github.com/haykam821/pair-into-object
- Owner: haykam821
- Created: 2018-02-25T19:26:06.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-03-26T01:08:01.000Z (over 6 years ago)
- Last Synced: 2025-10-02T22:28:05.879Z (9 months ago)
- Topics: array, merge, object, pair
- Language: JavaScript
- Size: 15.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pair Into Object [](https://travis-ci.org/haykam821/Pair-Into-Object)
This single-function library merges two arrays of keys and values respectively into a single object.
For example, with the input key array being `["a", "b", "c"]` and the input value array being `[1, 2, 3]`, you would get the object `{"a": 1, "b": 2, "c": 3}`.
## Errors
If your key or value input is *not* an array, a TypeError will be thrown. If the key and value input arrays do not match in length, an Error will be thrown.