soft-extend
1.0.0 • Public • Published Soft-extend
Extend any object softly, i. e. do not replace existing properties, just append the new ones.
var sextend = require('soft-extend');
var defaults = {
intensity: 100,
hold: true,
coords: {
x: 0,
y: 0
},
data: [1, 2, 3]
}
function MyClass(options){
this.options = sextend(options || {}, defaults);
}
Versions
Current Tags
- VersionDownloads (Last 7 Days)
- 1.0.0
2
Version History
Package Sidebar
Install
Weekly Downloads