Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/kalambet/object-augmenter

Small utility to augment one JS object by another
https://github.com/kalambet/object-augmenter

Last synced: 12 days ago
JSON representation

Small utility to augment one JS object by another

Awesome Lists containing this project

README

        

# Object Augmenter [![Build Status](https://travis-ci.org/kalambet/object-augmenter.svg?branch=master)](https://travis-ci.org/kalambet/object-augmenter)
###### Small utility to augment one JS object with another

The idea here that we are merging two JS objects like a trees (in depth). There are no special rules or arguments. The augmenter can contain only the fields that are needs to be updated plus extrs ones if needed.

## Installation
```
npm install object-augmenter
```

## Usage
```
var augment = require('object-augmenter');

var person = {
name: {
first: "John",
second: "Dough"
}
};

augment(person, {name: {second: "Doe"}, dob: "01.01.1970"});
```

## License
MIT