Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/stagas/object-map

maps an object using a function
https://github.com/stagas/object-map

Last synced: 14 days ago
JSON representation

maps an object using a function

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