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

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

@ -267,7 +267,7 @@ export default class EachBlock extends Node {
block.builders.init.addBlock(deindent` block.builders.init.addBlock(deindent`
for (var #i = 0; #i < ${each_block_value}.${length}; #i += 1) { for (var #i = 0; #i < ${each_block_value}.${length}; #i += 1) {
var ${key} = ${each_block_value}[#i].${this.key}; 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')} ${this.contextProps.join(',\n')}
})); }));
} }
@ -297,7 +297,7 @@ export default class EachBlock extends Node {
var ${each_block_value} = ${snippet}; 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) { ${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')} ${this.contextProps.join(',\n')}
}); });
}); });
@ -332,7 +332,7 @@ export default class EachBlock extends Node {
var ${iterations} = []; var ${iterations} = [];
for (var #i = 0; #i < ${each_block_value}.${length}; #i += 1) { 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')} ${this.contextProps.join(',\n')}
})); }));
} }
@ -430,7 +430,7 @@ export default class EachBlock extends Node {
if (${condition}) { if (${condition}) {
for (var #i = ${start}; #i < ${each_block_value}.${length}; #i += 1) { 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')} ${this.contextProps.join(',\n')}
}); });

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

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

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

@ -1,16 +1,8 @@
function noop() {} function noop() {}
function assign(target) { function assign(tar, src) {
var k, for (var k in src) tar[k] = src[k];
source, return tar;
i = 1,
len = arguments.length;
for (; i < len; i++) {
source = arguments[i];
for (k in source) target[k] = source[k];
}
return target;
} }
function insertNode(node, target, anchor) { function insertNode(node, target, anchor) {
@ -143,7 +135,7 @@ function _set(newState) {
} }
if (!dirty) return; if (!dirty) return;
this._state = assign({}, oldState, newState); this._state = assign(assign({}, oldState), newState);
this._recompute(changed, this._state); this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state); if (this._bind) this._bind(changed, this._state);
@ -184,7 +176,7 @@ var proto = {
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
function link(node) { function link(node) {
function onClick(event) { function onClick(event) {
event.preventDefault(); event.preventDefault();
history.pushState(null, null, event.target.href); history.pushState(null, null, event.target.href);

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

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

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

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

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

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

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

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

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

@ -9,7 +9,7 @@ function create_main_fragment(component, state) {
var each_blocks = []; var each_blocks = [];
for (var i = 0; i < each_value.length; i += 1) { 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, each_value: each_value,
node: each_value[i], node: each_value[i],
node_index: i node_index: i
@ -38,7 +38,7 @@ function create_main_fragment(component, state) {
if (changed.createElement) { if (changed.createElement) {
for (var i = 0; i < each_value.length; i += 1) { 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, each_value: each_value,
node: each_value[i], node: each_value[i],
node_index: i node_index: i
@ -121,4 +121,4 @@ function SvelteComponent(options) {
} }
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; export default SvelteComponent;

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

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

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

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

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

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

@ -9,7 +9,7 @@ function create_main_fragment(component, state) {
var each_blocks = []; var each_blocks = [];
for (var i = 0; i < each_value.length; i += 1) { 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, each_value: each_value,
comment: each_value[i], comment: each_value[i],
i: i i: i
@ -42,7 +42,7 @@ function create_main_fragment(component, state) {
if (changed.comments || changed.elapsed || changed.time) { if (changed.comments || changed.elapsed || changed.time) {
for (var i = 0; i < each_value.length; i += 1) { 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, each_value: each_value,
comment: each_value[i], comment: each_value[i],
i: i i: i
@ -166,4 +166,4 @@ function SvelteComponent(options) {
} }
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
export default SvelteComponent; export default SvelteComponent;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save