Home

Awesome

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

Install

npm install object-pairs

License

MIT