Merge pull request #1282 from lukeed/fix/assign

Performance boost for Assign utility
pull/1283/head
Rich Harris 7 years ago committed by GitHub
commit 6a15ebda72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -159,9 +159,9 @@ export default function dom(
? 'svelte/shared.js'
: options.shared || '';
const prototypeBase =
`${name}.prototype` +
(templateProperties.methods ? `, %methods` : '');
let prototypeBase = `${name}.prototype`;
templateProperties.methods && (prototypeBase = `@assign(${prototypeBase}, %methods)`);
const proto = sharedPath
? `@proto`
: deindent`
@ -335,7 +335,7 @@ export default function dom(
}
customElements.define("${generator.tag}", ${name});
@assign(${prototypeBase}, ${proto}, {
@assign(@assign(${prototypeBase}, ${proto}), {
_mount(target, anchor) {
target.insertBefore(this, anchor);
},

@ -125,7 +125,7 @@ export default class AwaitBlock extends Node {
${this.then.block.context ? deindent`
var state = #component.get();
${resolved} = { ${this.then.block.context}: ${value} };
${replace_await_block}(${token}, ${create_then_block}, @assign({}, state, ${resolved}));
${replace_await_block}(${token}, ${create_then_block}, @assign(@assign({}, state), ${resolved}));
` : deindent`
${replace_await_block}(${token}, null, null);
`}
@ -133,7 +133,7 @@ export default class AwaitBlock extends Node {
${this.catch.block.context ? deindent`
var state = #component.get();
${resolved} = { ${this.catch.block.context}: ${error} };
${replace_await_block}(${token}, ${create_catch_block}, @assign({}, state, ${resolved}));
${replace_await_block}(${token}, ${create_catch_block}, @assign(@assign({}, state), ${resolved}));
` : deindent`
${replace_await_block}(${token}, null, null);
`}
@ -147,7 +147,7 @@ export default class AwaitBlock extends Node {
} else {
${resolved} = { ${this.then.block.context}: ${promise} };
if (${await_block_type} !== ${create_then_block}) {
${replace_await_block}(${token}, ${create_then_block}, @assign({}, state, ${resolved}));
${replace_await_block}(${token}, ${create_then_block}, @assign(@assign({}, state), ${resolved}));
return true;
}
}
@ -190,7 +190,7 @@ export default class AwaitBlock extends Node {
if (${conditions.join(' && ')}) {
// nothing
} else {
${await_block}.p(changed, @assign({}, state, ${resolved}));
${await_block}.p(changed, @assign(@assign({}, state), ${resolved}));
}
`);
} else {

@ -267,7 +267,7 @@ export default class EachBlock extends Node {
block.builders.init.addBlock(deindent`
for (var #i = 0; #i < ${each_block_value}.${length}; #i += 1) {
var ${key} = ${each_block_value}[#i].${this.key};
${blocks}[#i] = ${lookup}[${key}] = ${create_each_block}(#component, ${key}, @assign({}, state, {
${blocks}[#i] = ${lookup}[${key}] = ${create_each_block}(#component, ${key}, @assign(@assign({}, state), {
${this.contextProps.join(',\n')}
}));
}
@ -297,7 +297,7 @@ export default class EachBlock extends Node {
var ${each_block_value} = ${snippet};
${blocks} = @updateKeyedEach(${blocks}, #component, changed, "${this.key}", ${dynamic}, ${each_block_value}, ${lookup}, ${updateMountNode}, ${String(this.block.hasOutroMethod)}, ${create_each_block}, "${mountOrIntro}", function(#i) {
return @assign({}, state, {
return @assign(@assign({}, state), {
${this.contextProps.join(',\n')}
});
});
@ -332,7 +332,7 @@ export default class EachBlock extends Node {
var ${iterations} = [];
for (var #i = 0; #i < ${each_block_value}.${length}; #i += 1) {
${iterations}[#i] = ${create_each_block}(#component, @assign({}, state, {
${iterations}[#i] = ${create_each_block}(#component, @assign(@assign({}, state), {
${this.contextProps.join(',\n')}
}));
}
@ -430,7 +430,7 @@ export default class EachBlock extends Node {
if (${condition}) {
for (var #i = ${start}; #i < ${each_block_value}.${length}; #i += 1) {
var ${this.each_context} = @assign({}, state, {
var ${this.each_context} = @assign(@assign({}, state), {
${this.contextProps.join(',\n')}
});

@ -163,7 +163,7 @@ export function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);

@ -1,14 +1,6 @@
export function noop() {}
export function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
export function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}

@ -133,7 +133,7 @@ assign(Store.prototype, {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
for (var i = 0; i < this._sortedComputedProperties.length; i += 1) {
this._sortedComputedProperties[i].update(this._state, changed);

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function insertNode(node, target, anchor) {
@ -143,7 +135,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function appendNode(node, target) {
@ -151,7 +143,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function blankObject() {
@ -135,7 +127,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function blankObject() {
@ -135,7 +127,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function blankObject() {
@ -131,7 +123,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function blankObject() {
@ -131,7 +123,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function appendNode(node, target) {
@ -147,7 +139,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function insertNode(node, target, anchor) {
@ -143,7 +135,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -234,7 +226,7 @@ class SvelteComponent extends HTMLElement {
}
customElements.define("custom-element", SvelteComponent);
assign(SvelteComponent.prototype, proto, {
assign(assign(SvelteComponent.prototype, proto), {
_mount(target, anchor) {
target.insertBefore(this, anchor);
},

@ -52,7 +52,7 @@ class SvelteComponent extends HTMLElement {
}
customElements.define("custom-element", SvelteComponent);
assign(SvelteComponent.prototype, proto, {
assign(assign(SvelteComponent.prototype, proto), {
_mount(target, anchor) {
target.insertBefore(this, anchor);
},

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function appendNode(node, target) {
@ -161,7 +153,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -209,7 +201,7 @@ function create_main_fragment(component, state) {
var each_blocks = [];
for (var i = 0; i < each_value.length; i += 1) {
each_blocks[i] = create_each_block(component, assign({}, state, {
each_blocks[i] = create_each_block(component, assign(assign({}, state), {
each_value: each_value,
node: each_value[i],
node_index: i
@ -238,7 +230,7 @@ function create_main_fragment(component, state) {
if (changed.createElement) {
for (var i = 0; i < each_value.length; i += 1) {
var each_context = assign({}, state, {
var each_context = assign(assign({}, state), {
each_value: each_value,
node: each_value[i],
node_index: i

@ -9,7 +9,7 @@ function create_main_fragment(component, state) {
var each_blocks = [];
for (var i = 0; i < each_value.length; i += 1) {
each_blocks[i] = create_each_block(component, assign({}, state, {
each_blocks[i] = create_each_block(component, assign(assign({}, state), {
each_value: each_value,
node: each_value[i],
node_index: i
@ -38,7 +38,7 @@ function create_main_fragment(component, state) {
if (changed.createElement) {
for (var i = 0; i < each_value.length; i += 1) {
var each_context = assign({}, state, {
var each_context = assign(assign({}, state), {
each_value: each_value,
node: each_value[i],
node_index: i

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function blankObject() {
@ -131,7 +123,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function appendNode(node, target) {
@ -183,7 +175,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function insertNode(node, target, anchor) {
@ -147,7 +139,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function insertNode(node, target, anchor) {
@ -151,7 +143,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function appendNode(node, target) {
@ -151,7 +143,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function appendNode(node, target) {
@ -163,7 +155,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -211,7 +203,7 @@ function create_main_fragment(component, state) {
var each_blocks = [];
for (var i = 0; i < each_value.length; i += 1) {
each_blocks[i] = create_each_block(component, assign({}, state, {
each_blocks[i] = create_each_block(component, assign(assign({}, state), {
each_value: each_value,
comment: each_value[i],
i: i
@ -244,7 +236,7 @@ function create_main_fragment(component, state) {
if (changed.comments || changed.elapsed || changed.time) {
for (var i = 0; i < each_value.length; i += 1) {
var each_context = assign({}, state, {
var each_context = assign(assign({}, state), {
each_value: each_value,
comment: each_value[i],
i: i

@ -9,7 +9,7 @@ function create_main_fragment(component, state) {
var each_blocks = [];
for (var i = 0; i < each_value.length; i += 1) {
each_blocks[i] = create_each_block(component, assign({}, state, {
each_blocks[i] = create_each_block(component, assign(assign({}, state), {
each_value: each_value,
comment: each_value[i],
i: i
@ -42,7 +42,7 @@ function create_main_fragment(component, state) {
if (changed.comments || changed.elapsed || changed.time) {
for (var i = 0; i < each_value.length; i += 1) {
var each_context = assign({}, state, {
var each_context = assign(assign({}, state), {
each_value: each_value,
comment: each_value[i],
i: i

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function insertNode(node, target, anchor) {
@ -143,7 +135,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -237,6 +229,6 @@ function SvelteComponent(options) {
}
}
assign(SvelteComponent.prototype, methods, proto);
assign(assign(SvelteComponent.prototype, methods), proto);
export default SvelteComponent;

@ -56,5 +56,5 @@ function SvelteComponent(options) {
}
}
assign(SvelteComponent.prototype, methods, proto);
assign(assign(SvelteComponent.prototype, methods), proto);
export default SvelteComponent;

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function appendNode(node, target) {
@ -143,7 +135,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function insertNode(node, target, anchor) {
@ -147,7 +139,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function insertNode(node, target, anchor) {
@ -147,7 +139,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function insertNode(node, target, anchor) {
@ -147,7 +139,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function insertNode(node, target, anchor) {
@ -147,7 +139,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function insertNode(node, target, anchor) {
@ -147,7 +139,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function insertNode(node, target, anchor) {
@ -147,7 +139,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function insertNode(node, target, anchor) {
@ -155,7 +147,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function appendNode(node, target) {
@ -165,7 +157,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function insertNode(node, target, anchor) {
@ -149,7 +141,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function insertNode(node, target, anchor) {
@ -166,7 +158,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function insertNode(node, target, anchor) {
@ -159,7 +151,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);

@ -2,17 +2,9 @@ import Imported from 'Imported.html';
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function insertNode(node, target, anchor) {
@ -145,7 +137,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function blankObject() {
@ -131,7 +123,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function blankObject() {
@ -131,7 +123,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
@ -214,7 +206,7 @@ function SvelteComponent(options) {
}
}
assign(SvelteComponent.prototype, methods, proto);
assign(assign(SvelteComponent.prototype, methods), proto);
setup(SvelteComponent);

@ -44,7 +44,7 @@ function SvelteComponent(options) {
}
}
assign(SvelteComponent.prototype, methods, proto);
assign(assign(SvelteComponent.prototype, methods), proto);
setup(SvelteComponent);
export default SvelteComponent;

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function appendNode(node, target) {
@ -151,7 +143,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function blankObject() {
@ -131,7 +123,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function appendNode(node, target) {
@ -155,7 +147,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);

@ -1,16 +1,8 @@
function noop() {}
function assign(target) {
var k,
source,
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
function assign(tar, src) {
for (var k in src) tar[k] = src[k];
return tar;
}
function appendNode(node, target) {
@ -151,7 +143,7 @@ function _set(newState) {
}
if (!dirty) return;
this._state = assign({}, oldState, newState);
this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);

Loading…
Cancel
Save