maybe-extend
v1.0.0
Published
Extend an object with a defaults if the subject object's value is 'falsey'
Downloads
3
Readme
maybe-extend
Extend an object with a defaults if the subject object's value is 'falsey'
Install
npm install --save maybe-extend
Example
import extend from 'maybe-extend';
const subject = {
x: 30,
y: null
};
const defaults = {
x: 10,
y: 20
};
let obj = extend(subject, defaults);
/**
* {
* x: 30,
* y: 20
* }
*/
License
MIT