Skip to content

Commit

Permalink
Going for v0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
arguiot committed Jul 11, 2017
1 parent 3d63002 commit 2da639b
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 37 deletions.
22 changes: 11 additions & 11 deletions dist/display.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,20 +376,20 @@ class DisplayJS {
}
}());
}
extend(out = {}) {
for (let i = 1; i < arguments.length; i++) {
if (!arguments[i]) {
continue;
extend( defaults, options ) {
const extended = {};
let prop;
for (prop in defaults) {
if (Object.prototype.hasOwnProperty.call(defaults, prop)) {
extended[prop] = defaults[prop];
}

for (const key in arguments[i]) {
if (arguments[i].hasOwnProperty(key)) {
out[key] = arguments[i][key];
}
}
for (prop in options) {
if (Object.prototype.hasOwnProperty.call(options, prop)) {
extended[prop] = options[prop];
}
}

return out;
return extended;
}
// Math and array manipulation
arange(start, end, step, offset) {
Expand Down
24 changes: 11 additions & 13 deletions dist/display.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,22 +491,20 @@ var DisplayJS = function () {
}
}, {
key: "extend",
value: function extend() {
var out = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

for (var i = 1; i < arguments.length; i++) {
if (!arguments[i]) {
continue;
value: function extend(defaults, options) {
var extended = {};
var prop = void 0;
for (prop in defaults) {
if (Object.prototype.hasOwnProperty.call(defaults, prop)) {
extended[prop] = defaults[prop];
}

for (var key in arguments[i]) {
if (arguments[i].hasOwnProperty(key)) {
out[key] = arguments[i][key];
}
}
for (prop in options) {
if (Object.prototype.hasOwnProperty.call(options, prop)) {
extended[prop] = options[prop];
}
}

return out;
return extended;
}
// Math and array manipulation

Expand Down
Loading

0 comments on commit 2da639b

Please sign in to comment.