Skip to content

Latest commit

 

History

7 Commits

Folders and files

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

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages