https://github.com/stagas/object-map
maps an object using a function
https://github.com/stagas/object-map
Last synced: 3 months ago
JSON representation
maps an object using a function
- Host: GitHub
- URL: https://github.com/stagas/object-map
- Owner: stagas
- Created: 2015-11-21T07:12:59.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-21T07:13:44.000Z (over 9 years ago)
- Last Synced: 2025-02-11T08:48:13.336Z (5 months ago)
- Language: JavaScript
- Size: 1000 Bytes
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# object-map
## install
```
npm install stagas/object-map
```## usage
### map(obj, fn)
Example:
```js
import map from 'object-map';const result = map({ a: 2, b: 3, c: 4 }, x => x * 2);
console.log(result);
// => { a: 4, b: 6, c: 8 }
```## license MIT