stluafed

merge two objects keys if absents from source object

defaults

Assigns enumerable properties of the default object(s) to the destination object for all destination properties that resolve to undefined.

$ component install avetisk/defaults

defaults({'x': 1}, {'x': 2, 'y': 2});
// > {'x': 1, 'y': 2} 

MIT