Permalink
Browse files

Use object spread in lieu of object-assign

  • Loading branch information...
bregenspan committed Aug 31, 2017
1 parent bf72fb1 commit a02903bb6f086d081e6f613b62aa663d039b4912
Showing with 11 additions and 9 deletions.
  1. +2 −1 .babelrc
  2. +5 −3 .eslintrc.js
  3. +2 −1 package.json
  4. +2 −4 src/js/connector/polyline.js
View
@@ -8,6 +8,7 @@
],
"plugins": [
"dynamic-import-webpack",
"transform-class-properties"
"transform-class-properties",
"transform-object-rest-spread"
]
}
View
@@ -12,10 +12,12 @@ module.exports = {
'parser': 'babel-eslint',
'plugins': [
'standard',
'promise'
'promise',
'prefer-object-spread'
],
'rules': {
'semi': ['error', 'always'],
'no-var': 'error'
'no-var': 'error',
'prefer-object-spread/prefer-object-spread': 2,
'semi': ['error', 'always']
}
};
View
@@ -17,13 +17,15 @@
"babel-loader": "^7.1.2",
"babel-plugin-dynamic-import-webpack": "^1.0.1",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-preset-env": "^1.6.0",
"css-loader": "^0.28.6",
"debounce": "^1.0.2",
"eslint": "^4.5.0",
"eslint-config-standard": "^10.2.1",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-node": "^5.1.1",
"eslint-plugin-prefer-object-spread": "^1.2.1",
"eslint-plugin-promise": "^3.5.0",
"eslint-plugin-standard": "^3.0.1",
"extract-text-webpack-plugin": "^3.0.0",
@@ -37,7 +39,6 @@
"html-webpack-plugin": "^2.30.1",
"htmllint-loader": "^1.3.8",
"node-sass": "^4.5.3",
"object-assign": "^4.1.1",
"postcss-loader": "^2.0.6",
"sass-loader": "^6.0.6",
"style-loader": "^0.18.2",
@@ -1,5 +1,3 @@
import objectAssign from 'object-assign'; // Object.assign is missing in e.g. IE11
// TODO: just use ES6 class...
const AnimatedPolyline = function (options) {
options = options || {};
@@ -8,9 +6,9 @@ const AnimatedPolyline = function (options) {
strokeStyle: '#f1dbce',
lineWidth: 4,
animated: true,
animateAmount: 4
animateAmount: 4,
...options
};
objectAssign(this.options, options);
this.finished = false;
this.segments = options.segments;

0 comments on commit a02903b

Please sign in to comment.