Skip to content

eush77/object-pairs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

object-pairs Build Status Dependency Status

npm

Turn an object into list of [key, value] pairs for mapping, iterating or other purposes.

Example

> pairs = require('object-pairs')
[Function]
> pairs({ foo: 2, bar: 4 })
[ [ 'foo', 2 ],
  [ 'bar', 4 ] ]

API

pairs(obj)

Return list of key-value pairs.

See also

  • zipmap for the opposite transformation.

Install

npm install object-pairs

License

MIT

About

Object -> [[key0, value0], [key1, value1]...]

Resources

License

Stars

Watchers

Forks

Packages

No packages published