node package manager
Loosely couple your services. Use Orgs to version and reuse your code. Create a free org ยป

objzip

Build Status

browser support

objzip

objzip zips together keys and values into objects. example: objzip(['a', 'b', 'c'], ['d', 'e', 'f']) -> { a: 'd', b: 'e', c: 'f' }

objzip(keys, values, obj)

For each (key, value) pair, assign value to obj[key]. obj defaults to a fresh object.

objzip.sparse(keys, values, obj)

Like objzip, but ignores (key, value) pairs where key or value equal null or undefined.

objzip.sparseKeys(keys, values, obj)

Like objzip, but ignores (key, value) pairs where key equals null or undefined.

objzip.sparseValues(keys, values, obj)

Like objzip, but ignores (key, value) pairs where value equals null or undefined.