Skip to content

Commit

Permalink
Merge pull request #191 from apertureless/feature/deepmerge
Browse files Browse the repository at this point in the history
Replace Object.assign with deepmerge
  • Loading branch information
apertureless authored Sep 8, 2017
2 parents 46569a8 + 3d29199 commit 5dc655a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"presets": ["es2015", "stage-2"],
"plugins": ["transform-runtime", "transform-object-assign"],
"plugins": ["transform-runtime"],
"comments": false
}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@
"release": "webpack --progress --hide-modules --config ./build/webpack.release.js && NODE_ENV=production webpack --progress --hide-modules --config ./build/webpack.release.min.js && webpack --progress --hide-modules --config ./build/webpack.release.full.js && NODE_ENV=production webpack --progress --hide-modules --config ./build/webpack.release.full.min.js",
"prepublish": "yarn run lint && yarn run test && yarn run build"
},
"dependencies": {},
"dependencies": {
"deepmerge": "^1.5.1"
},
"peerDependencies": {
"chart.js": "^2.6.0",
"vue": "^2.4.2"
Expand Down
5 changes: 3 additions & 2 deletions src/helpers/options.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import merge from 'deepmerge'

export function mergeOptions (obj, src) {
let mutableObj = Object.assign({}, obj)
return Object.assign(mutableObj, src)
return merge(obj, src)
}
4 changes: 4 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1663,6 +1663,10 @@ deep-is@~0.1.3:
version "0.1.3"
resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"

deepmerge@^1.5.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-1.5.1.tgz#c053bf06fd7276f1994f70c09a0760cb61a56237"

defined@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693"
Expand Down

0 comments on commit 5dc655a

Please sign in to comment.