https://github.com/parro-it/map-array
Map object keys and values into an array.
https://github.com/parro-it/map-array
Last synced: 11 months ago
JSON representation
Map object keys and values into an array.
- Host: GitHub
- URL: https://github.com/parro-it/map-array
- Owner: parro-it
- License: mit
- Created: 2016-02-08T23:10:37.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2020-06-03T09:20:35.000Z (over 5 years ago)
- Last Synced: 2024-10-04T13:16:57.018Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 1.08 MB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
- awesome-micro-npm-packages-zh - map-array
- awesome-micro-npm-packages - map-array - Map object keys and values into an array. (Modules / Array)
- awesome-micro-npm-packages - map-array - Map object keys and values into an array. (Modules / Array)
- fucking-awesome-micro-npm-packages - map-array - Map object keys and values into an array. (Modules / Array)
README
# map-array
[](https://greenkeeper.io/)
> Map object keys and values into an array
[](http://travis-ci.org/parro-it/map-array)
[](https://npmjs.org/package/map-array)
[](https://npmjs.org/package/map-array)
# Installation
```bash
npm install --save map-array
```
# Usage
```javascript
const mapArray = require('map-array');
const obj = {
giorgio: 'Bianchi',
gino: 'Rossi'
};
console.log(mapArray(obj, (key, value) => key + ' ' + value));
```
> ['giorgio Bianchi', 'gino Rossi']
# Related
* [map-obj](https://github.com/sindresorhus/map-obj) - Map object keys and values into a new object
# License
The MIT License (MIT)
Copyright (c) 2017 parro-it