Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

webpack-merge() vs Object.assign()

node v8.17.0
version: master
endpointsharetweet
const webpackMerge = require("webpack-merge") const object1 = { 'x': [{'a': 'a' }, { 'b': 'b' }] } const object2 = { 'x': [{'c': 'c' }, { 'd': 'd' }] } console.log('result webpackMerge: ', webpackMerge(object1, object2) ) console.log('result Object.assign: ', Object.assign({}, object1, object2) ) console.log('result Object spread: ', {...object1, ...object2} )
Loading…

no comments

    sign in to comment