Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickkunka committed Jan 6, 2018
2 parents b2c717c + 2f517ac commit dc07c81
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ import merge from 'helpful-merge';

// Configuration interface with defaults:
const target = Object.seal({
animationDuration: 50
easing: 'ease-in-out'
foo: 50
bar: false
});

// Arbitrary consumer-provided options:
const source = {
animatonDuration: 300
Foo: 300
};

// Merge consumer options over defaults:
merge(target, source);
```
For the above example, Helpful Merge would throw the following exception:

**TypeError: Unknown property "animatonDuration". Did you mean "animationDuration"?**
**TypeError: Unknown property "Foo". Did you mean "foo"?**

Helpful Merge is great for creating robust and helpful entry points for JavaScript libraries and APIs and also includes efficient and customizable implementations of deep recursive merge, array merge, and more.

Expand Down

0 comments on commit dc07c81

Please sign in to comment.