to-pairs
v1.0.1
Published
Convert an object into an array.
Downloads
7
Maintainers
Readme
to-pairs
Convert an object into an array.
Inspired by _.pairs
. 😄
Install
Install with npm
$ npm install to-pairs
Or unpkg
<script src="https://unpkg.com/[email protected]/umd/index.js" />
Check out the unit tests on CodePen.
Usage
const toPairs = require('to-pairs');
toPairs({one: 1, two: 2, three: 3});
//=> [["one", 1], ["two", 2], ["three", 3]]
| Like us a lot? Help others know why you like us! Review this package on pkgreview.dev | ➡ | | | ----------------------------------------------------------------------------------------------------------------------------------------- | --- | --------------------------------------------------------------------------------------------------------------------- |
API
toPairs(object)
list
Type: object
Default: none
The object to convert.
License
MIT