Skip to content

Commit 5437af4

Browse files
committed
add usage with custom config section
1 parent 00e489e commit 5437af4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

readme.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ mergeOptions({[Symbol.for('key')]: 0}, {[Symbol.for('key')]: 42})
2626
//=> {Symbol(key): 42}
2727
```
2828

29+
### Usage with custom config
30+
31+
```js
32+
const mergeOptions = require('merge-options').bind({ignoreUndefined: true});
33+
34+
mergeOptions({foo: 'bar'}, {foo: undefined})
35+
//=> {foo: 'bar'}
36+
```
37+
2938
## API
3039

3140
### mergeOptions(option1, ...options)<br/>mergeOptions.call(config, option1, ...options)<br/>mergeOptions.apply(config, [option1, ...options])

0 commit comments

Comments
 (0)