based-on
v0.0.2
Published
Create new object based on another
Downloads
3
Readme
based-on
var settings = basedOn({
key: 'value',
other: 'value2'
});
settings();
// { key: 'value', other: 'value2' }
settings({ test: 'ing' })
// { key: 'value', other: 'value2', test: 'ing' }
var otherSettings = settings.with({ other: 'true' });
otherSettings();
// { key: 'value', other: 'true' }
otherSettings({ key: 'test' });
// { key: 'test', other: 'true' }
Install
npm:
npm install based-on
Bower:
bower install based-on
Or just download from here