How to extend object in gulp without installing npm?
var a = {a: 1};
var b = {b: 2};
var c = extend({}, a, b, {c:3});
c is {a: 1, b: 2, c: 3}
How to extend object in gulp without installing npm?
var a = {a: 1};
var b = {b: 2};
var c = extend({}, a, b, {c:3});
c is {a: 1, b: 2, c: 3}
Not that I know of. I would recommend that you use object-assign, a forward compatible module that will delegate to the ES6 Object.assign
if available. It's extremely lightweight at 26 lines (as of this writing).
var assign = require('object-assign');
var a = {a: 1};
var b = {b: 2};
var c = assign(a, b, {c:3});
console.log(c);
// => {a: 1, b: 2, c: 3}