put _differs on prototype, remove runtime option

pull/1182/head
Rich Harris 7 years ago
parent 81b12e030e
commit 1b599bd57b

@ -626,10 +626,6 @@ export default class Generator {
addDeclaration('store', templateProperties.store.value); addDeclaration('store', templateProperties.store.value);
} }
if (templateProperties.immutable) {
addDeclaration('immutable', templateProperties.immutable.value);
}
if (templateProperties.tag) { if (templateProperties.tag) {
this.tag = templateProperties.tag.value.value; this.tag = templateProperties.tag.value.value;
} }

@ -174,7 +174,7 @@ export default function dom(
? `@proto` ? `@proto`
: deindent` : deindent`
{ {
${['destroy', 'get', 'fire', 'observe', 'on', 'set', 'teardown', '_set', '_mount', '_unmount'] ${['destroy', 'get', 'fire', 'observe', 'on', 'set', 'teardown', '_set', '_mount', '_unmount', '_differs']
.map(n => `${n}: @${n === 'teardown' ? 'destroy' : n}`) .map(n => `${n}: @${n === 'teardown' ? 'destroy' : n}`)
.join(',\n')} .join(',\n')}
}`; }`;
@ -208,10 +208,6 @@ export default function dom(
${options.dev && !generator.customElement && ${options.dev && !generator.customElement &&
`if (!options || (!options.target && !options.root)) throw new Error("'target' is a required option");`} `if (!options || (!options.target && !options.root)) throw new Error("'target' is a required option");`}
@init(this, options); @init(this, options);
${options.immutable && deindent`
if (options.immutable !== undefined ? options.immutable : ${templateProperties.immutable && '%immutable' || 'this.root.options.immutable'}) {
this._differs = @differsImmutable;
}`}
${templateProperties.store && `this.store = %store();`} ${templateProperties.store && `this.store = %store();`}
${generator.usesRefs && `this.refs = {};`} ${generator.usesRefs && `this.refs = {};`}
this._state = @assign(${initialState.join(', ')}); this._state = @assign(${initialState.join(', ')});
@ -364,6 +360,8 @@ export default function dom(
`); `);
} }
const immutable = templateProperties.immutable ? templateProperties.immutable.value.value : options.immutable;
builder.addBlock(deindent` builder.addBlock(deindent`
${options.dev && deindent` ${options.dev && deindent`
${name}.prototype._checkReadOnly = function _checkReadOnly(newState) { ${name}.prototype._checkReadOnly = function _checkReadOnly(newState) {
@ -383,6 +381,8 @@ export default function dom(
${templateProperties.setup && `%setup(${name});`} ${templateProperties.setup && `%setup(${name});`}
${templateProperties.preload && `${name}.preload = %preload;`} ${templateProperties.preload && `${name}.preload = %preload;`}
${immutable && `${name}.prototype._differs = @_differsImmutable;`}
`); `);
const usedHelpers = new Set(); const usedHelpers = new Set();

@ -25,11 +25,11 @@ export function destroyDev(detach) {
}; };
} }
export function differs(a, b) { export function _differs(a, b) {
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
} }
export function differsImmutable(a, b) { export function _differsImmutable(a, b) {
return a != a ? b == b : a !== b; return a != a ? b == b : a !== b;
} }
@ -72,7 +72,6 @@ export function init(component, options) {
component._observers = { pre: blankObject(), post: blankObject() }; component._observers = { pre: blankObject(), post: blankObject() };
component._handlers = blankObject(); component._handlers = blankObject();
component._bind = options._bind; component._bind = options._bind;
component._differs = differs;
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
@ -216,7 +215,8 @@ export var proto = {
_recompute: noop, _recompute: noop,
_set: _set, _set: _set,
_mount: _mount, _mount: _mount,
_unmount: _unmount _unmount: _unmount,
_differs: _differs
}; };
export var protoDev = { export var protoDev = {
@ -230,5 +230,6 @@ export var protoDev = {
_recompute: noop, _recompute: noop,
_set: _set, _set: _set,
_mount: _mount, _mount: _mount,
_unmount: _unmount _unmount: _unmount,
_differs: _differs
}; };

@ -1,8 +1,8 @@
import { import {
assign, assign,
blankObject, blankObject,
differs, _differs,
differsImmutable, _differsImmutable,
dispatchObservers, dispatchObservers,
get, get,
observe observe
@ -17,7 +17,7 @@ function Store(state, options) {
this._sortedComputedProperties = []; this._sortedComputedProperties = [];
this._state = assign({}, state); this._state = assign({}, state);
this._differs = options && options.immutable ? differsImmutable : differs; this._differs = options && options.immutable ? _differsImmutable : _differs;
} }
assign(Store.prototype, { assign(Store.prototype, {

@ -51,7 +51,7 @@ function destroy(detach) {
this._fragment = this._state = null; this._fragment = this._state = null;
} }
function differs(a, b) { function _differs(a, b) {
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
} }
@ -94,7 +94,6 @@ function init(component, options) {
component._observers = { pre: blankObject(), post: blankObject() }; component._observers = { pre: blankObject(), post: blankObject() };
component._handlers = blankObject(); component._handlers = blankObject();
component._bind = options._bind; component._bind = options._bind;
component._differs = differs;
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
@ -190,7 +189,8 @@ var proto = {
_recompute: noop, _recompute: noop,
_set: _set, _set: _set,
_mount: _mount, _mount: _mount,
_unmount: _unmount _unmount: _unmount,
_differs: _differs
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */

@ -27,11 +27,11 @@ function destroy(detach) {
this._fragment = this._state = null; this._fragment = this._state = null;
} }
function differs(a, b) { function _differs(a, b) {
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
} }
function differsImmutable(a, b) { function _differsImmutable(a, b) {
return a != a ? b == b : a !== b; return a != a ? b == b : a !== b;
} }
@ -74,7 +74,6 @@ function init(component, options) {
component._observers = { pre: blankObject(), post: blankObject() }; component._observers = { pre: blankObject(), post: blankObject() };
component._handlers = blankObject(); component._handlers = blankObject();
component._bind = options._bind; component._bind = options._bind;
component._differs = differs;
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
@ -170,14 +169,13 @@ var proto = {
_recompute: noop, _recompute: noop,
_set: _set, _set: _set,
_mount: _mount, _mount: _mount,
_unmount: _unmount _unmount: _unmount,
_differs: _differs
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
var Nested = window.Nested; var Nested = window.Nested;
var immutable = true;
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var nested = new Nested({ var nested = new Nested({
@ -208,9 +206,6 @@ function create_main_fragment(state, component) {
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
if (options.immutable !== undefined ? options.immutable : immutable) {
this._differs = differsImmutable;
}
this._state = assign({}, options.data); this._state = assign({}, options.data);
if (!options.root) { if (!options.root) {
@ -235,4 +230,6 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
SvelteComponent.prototype._differs = _differsImmutable;
export default SvelteComponent; export default SvelteComponent;

@ -1,10 +1,8 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, callAll, differsImmutable, init, noop, proto } from "svelte/shared.js"; import { _differsImmutable, assign, callAll, init, noop, proto } from "svelte/shared.js";
var Nested = window.Nested; var Nested = window.Nested;
var immutable = true;
function create_main_fragment(state, component) { function create_main_fragment(state, component) {
var nested = new Nested({ var nested = new Nested({
@ -35,9 +33,6 @@ function create_main_fragment(state, component) {
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
if (options.immutable !== undefined ? options.immutable : immutable) {
this._differs = differsImmutable;
}
this._state = assign({}, options.data); this._state = assign({}, options.data);
if (!options.root) { if (!options.root) {
@ -61,4 +56,6 @@ function SvelteComponent(options) {
} }
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
SvelteComponent.prototype._differs = _differsImmutable;
export default SvelteComponent; export default SvelteComponent;

@ -27,11 +27,11 @@ function destroy(detach) {
this._fragment = this._state = null; this._fragment = this._state = null;
} }
function differs(a, b) { function _differs(a, b) {
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
} }
function differsImmutable(a, b) { function _differsImmutable(a, b) {
return a != a ? b == b : a !== b; return a != a ? b == b : a !== b;
} }
@ -74,7 +74,6 @@ function init(component, options) {
component._observers = { pre: blankObject(), post: blankObject() }; component._observers = { pre: blankObject(), post: blankObject() };
component._handlers = blankObject(); component._handlers = blankObject();
component._bind = options._bind; component._bind = options._bind;
component._differs = differs;
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
@ -170,7 +169,8 @@ var proto = {
_recompute: noop, _recompute: noop,
_set: _set, _set: _set,
_mount: _mount, _mount: _mount,
_unmount: _unmount _unmount: _unmount,
_differs: _differs
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
@ -206,9 +206,6 @@ function create_main_fragment(state, component) {
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
if (options.immutable !== undefined ? options.immutable : this.root.options.immutable) {
this._differs = differsImmutable;
}
this._state = assign({}, options.data); this._state = assign({}, options.data);
if (!options.root) { if (!options.root) {
@ -233,4 +230,6 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
SvelteComponent.prototype._differs = _differsImmutable;
export default SvelteComponent; export default SvelteComponent;

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */
import { assign, callAll, differsImmutable, init, noop, proto } from "svelte/shared.js"; import { _differsImmutable, assign, callAll, init, noop, proto } from "svelte/shared.js";
var Nested = window.Nested; var Nested = window.Nested;
@ -33,9 +33,6 @@ function create_main_fragment(state, component) {
function SvelteComponent(options) { function SvelteComponent(options) {
init(this, options); init(this, options);
if (options.immutable !== undefined ? options.immutable : this.root.options.immutable) {
this._differs = differsImmutable;
}
this._state = assign({}, options.data); this._state = assign({}, options.data);
if (!options.root) { if (!options.root) {
@ -59,4 +56,6 @@ function SvelteComponent(options) {
} }
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
SvelteComponent.prototype._differs = _differsImmutable;
export default SvelteComponent; export default SvelteComponent;

@ -27,7 +27,7 @@ function destroy(detach) {
this._fragment = this._state = null; this._fragment = this._state = null;
} }
function differs(a, b) { function _differs(a, b) {
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
} }
@ -70,7 +70,6 @@ function init(component, options) {
component._observers = { pre: blankObject(), post: blankObject() }; component._observers = { pre: blankObject(), post: blankObject() };
component._handlers = blankObject(); component._handlers = blankObject();
component._bind = options._bind; component._bind = options._bind;
component._differs = differs;
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
@ -166,7 +165,8 @@ var proto = {
_recompute: noop, _recompute: noop,
_set: _set, _set: _set,
_mount: _mount, _mount: _mount,
_unmount: _unmount _unmount: _unmount,
_differs: _differs
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */

@ -27,7 +27,7 @@ function destroy(detach) {
this._fragment = this._state = null; this._fragment = this._state = null;
} }
function differs(a, b) { function _differs(a, b) {
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
} }
@ -70,7 +70,6 @@ function init(component, options) {
component._observers = { pre: blankObject(), post: blankObject() }; component._observers = { pre: blankObject(), post: blankObject() };
component._handlers = blankObject(); component._handlers = blankObject();
component._bind = options._bind; component._bind = options._bind;
component._differs = differs;
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
@ -166,7 +165,8 @@ var proto = {
_recompute: noop, _recompute: noop,
_set: _set, _set: _set,
_mount: _mount, _mount: _mount,
_unmount: _unmount _unmount: _unmount,
_differs: _differs
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */

@ -47,7 +47,7 @@ function destroy(detach) {
this._fragment = this._state = null; this._fragment = this._state = null;
} }
function differs(a, b) { function _differs(a, b) {
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
} }
@ -90,7 +90,6 @@ function init(component, options) {
component._observers = { pre: blankObject(), post: blankObject() }; component._observers = { pre: blankObject(), post: blankObject() };
component._handlers = blankObject(); component._handlers = blankObject();
component._bind = options._bind; component._bind = options._bind;
component._differs = differs;
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
@ -186,7 +185,8 @@ var proto = {
_recompute: noop, _recompute: noop,
_set: _set, _set: _set,
_mount: _mount, _mount: _mount,
_unmount: _unmount _unmount: _unmount,
_differs: _differs
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */

@ -39,7 +39,7 @@ function destroy(detach) {
this._fragment = this._state = null; this._fragment = this._state = null;
} }
function differs(a, b) { function _differs(a, b) {
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
} }
@ -82,7 +82,6 @@ function init(component, options) {
component._observers = { pre: blankObject(), post: blankObject() }; component._observers = { pre: blankObject(), post: blankObject() };
component._handlers = blankObject(); component._handlers = blankObject();
component._bind = options._bind; component._bind = options._bind;
component._differs = differs;
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
@ -178,7 +177,8 @@ var proto = {
_recompute: noop, _recompute: noop,
_set: _set, _set: _set,
_mount: _mount, _mount: _mount,
_unmount: _unmount _unmount: _unmount,
_differs: _differs
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */

@ -27,7 +27,7 @@ function destroy(detach) {
this._fragment = this._state = null; this._fragment = this._state = null;
} }
function differs(a, b) { function _differs(a, b) {
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
} }
@ -70,7 +70,6 @@ function init(component, options) {
component._observers = { pre: blankObject(), post: blankObject() }; component._observers = { pre: blankObject(), post: blankObject() };
component._handlers = blankObject(); component._handlers = blankObject();
component._bind = options._bind; component._bind = options._bind;
component._differs = differs;
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
@ -166,7 +165,8 @@ var proto = {
_recompute: noop, _recompute: noop,
_set: _set, _set: _set,
_mount: _mount, _mount: _mount,
_unmount: _unmount _unmount: _unmount,
_differs: _differs
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */

@ -43,7 +43,7 @@ function destroy(detach) {
this._fragment = this._state = null; this._fragment = this._state = null;
} }
function differs(a, b) { function _differs(a, b) {
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
} }
@ -86,7 +86,6 @@ function init(component, options) {
component._observers = { pre: blankObject(), post: blankObject() }; component._observers = { pre: blankObject(), post: blankObject() };
component._handlers = blankObject(); component._handlers = blankObject();
component._bind = options._bind; component._bind = options._bind;
component._differs = differs;
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
@ -182,7 +181,8 @@ var proto = {
_recompute: noop, _recompute: noop,
_set: _set, _set: _set,
_mount: _mount, _mount: _mount,
_unmount: _unmount _unmount: _unmount,
_differs: _differs
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */

@ -47,7 +47,7 @@ function destroy(detach) {
this._fragment = this._state = null; this._fragment = this._state = null;
} }
function differs(a, b) { function _differs(a, b) {
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
} }
@ -90,7 +90,6 @@ function init(component, options) {
component._observers = { pre: blankObject(), post: blankObject() }; component._observers = { pre: blankObject(), post: blankObject() };
component._handlers = blankObject(); component._handlers = blankObject();
component._bind = options._bind; component._bind = options._bind;
component._differs = differs;
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
@ -186,7 +185,8 @@ var proto = {
_recompute: noop, _recompute: noop,
_set: _set, _set: _set,
_mount: _mount, _mount: _mount,
_unmount: _unmount _unmount: _unmount,
_differs: _differs
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */

@ -47,7 +47,7 @@ function destroy(detach) {
this._fragment = this._state = null; this._fragment = this._state = null;
} }
function differs(a, b) { function _differs(a, b) {
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
} }
@ -90,7 +90,6 @@ function init(component, options) {
component._observers = { pre: blankObject(), post: blankObject() }; component._observers = { pre: blankObject(), post: blankObject() };
component._handlers = blankObject(); component._handlers = blankObject();
component._bind = options._bind; component._bind = options._bind;
component._differs = differs;
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
@ -186,7 +185,8 @@ var proto = {
_recompute: noop, _recompute: noop,
_set: _set, _set: _set,
_mount: _mount, _mount: _mount,
_unmount: _unmount _unmount: _unmount,
_differs: _differs
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */

@ -59,7 +59,7 @@ function destroy(detach) {
this._fragment = this._state = null; this._fragment = this._state = null;
} }
function differs(a, b) { function _differs(a, b) {
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
} }
@ -102,7 +102,6 @@ function init(component, options) {
component._observers = { pre: blankObject(), post: blankObject() }; component._observers = { pre: blankObject(), post: blankObject() };
component._handlers = blankObject(); component._handlers = blankObject();
component._bind = options._bind; component._bind = options._bind;
component._differs = differs;
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
@ -198,7 +197,8 @@ var proto = {
_recompute: noop, _recompute: noop,
_set: _set, _set: _set,
_mount: _mount, _mount: _mount,
_unmount: _unmount _unmount: _unmount,
_differs: _differs
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */

@ -39,7 +39,7 @@ function destroy(detach) {
this._fragment = this._state = null; this._fragment = this._state = null;
} }
function differs(a, b) { function _differs(a, b) {
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
} }
@ -82,7 +82,6 @@ function init(component, options) {
component._observers = { pre: blankObject(), post: blankObject() }; component._observers = { pre: blankObject(), post: blankObject() };
component._handlers = blankObject(); component._handlers = blankObject();
component._bind = options._bind; component._bind = options._bind;
component._differs = differs;
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
@ -178,7 +177,8 @@ var proto = {
_recompute: noop, _recompute: noop,
_set: _set, _set: _set,
_mount: _mount, _mount: _mount,
_unmount: _unmount _unmount: _unmount,
_differs: _differs
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */

@ -39,7 +39,7 @@ function destroy(detach) {
this._fragment = this._state = null; this._fragment = this._state = null;
} }
function differs(a, b) { function _differs(a, b) {
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
} }
@ -82,7 +82,6 @@ function init(component, options) {
component._observers = { pre: blankObject(), post: blankObject() }; component._observers = { pre: blankObject(), post: blankObject() };
component._handlers = blankObject(); component._handlers = blankObject();
component._bind = options._bind; component._bind = options._bind;
component._differs = differs;
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
@ -178,7 +177,8 @@ var proto = {
_recompute: noop, _recompute: noop,
_set: _set, _set: _set,
_mount: _mount, _mount: _mount,
_unmount: _unmount _unmount: _unmount,
_differs: _differs
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */

@ -43,7 +43,7 @@ function destroy(detach) {
this._fragment = this._state = null; this._fragment = this._state = null;
} }
function differs(a, b) { function _differs(a, b) {
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
} }
@ -86,7 +86,6 @@ function init(component, options) {
component._observers = { pre: blankObject(), post: blankObject() }; component._observers = { pre: blankObject(), post: blankObject() };
component._handlers = blankObject(); component._handlers = blankObject();
component._bind = options._bind; component._bind = options._bind;
component._differs = differs;
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
@ -182,7 +181,8 @@ var proto = {
_recompute: noop, _recompute: noop,
_set: _set, _set: _set,
_mount: _mount, _mount: _mount,
_unmount: _unmount _unmount: _unmount,
_differs: _differs
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */

@ -43,7 +43,7 @@ function destroy(detach) {
this._fragment = this._state = null; this._fragment = this._state = null;
} }
function differs(a, b) { function _differs(a, b) {
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
} }
@ -86,7 +86,6 @@ function init(component, options) {
component._observers = { pre: blankObject(), post: blankObject() }; component._observers = { pre: blankObject(), post: blankObject() };
component._handlers = blankObject(); component._handlers = blankObject();
component._bind = options._bind; component._bind = options._bind;
component._differs = differs;
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
@ -182,7 +181,8 @@ var proto = {
_recompute: noop, _recompute: noop,
_set: _set, _set: _set,
_mount: _mount, _mount: _mount,
_unmount: _unmount _unmount: _unmount,
_differs: _differs
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */

@ -43,7 +43,7 @@ function destroy(detach) {
this._fragment = this._state = null; this._fragment = this._state = null;
} }
function differs(a, b) { function _differs(a, b) {
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
} }
@ -86,7 +86,6 @@ function init(component, options) {
component._observers = { pre: blankObject(), post: blankObject() }; component._observers = { pre: blankObject(), post: blankObject() };
component._handlers = blankObject(); component._handlers = blankObject();
component._bind = options._bind; component._bind = options._bind;
component._differs = differs;
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
@ -182,7 +181,8 @@ var proto = {
_recompute: noop, _recompute: noop,
_set: _set, _set: _set,
_mount: _mount, _mount: _mount,
_unmount: _unmount _unmount: _unmount,
_differs: _differs
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */

@ -43,7 +43,7 @@ function destroy(detach) {
this._fragment = this._state = null; this._fragment = this._state = null;
} }
function differs(a, b) { function _differs(a, b) {
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
} }
@ -86,7 +86,6 @@ function init(component, options) {
component._observers = { pre: blankObject(), post: blankObject() }; component._observers = { pre: blankObject(), post: blankObject() };
component._handlers = blankObject(); component._handlers = blankObject();
component._bind = options._bind; component._bind = options._bind;
component._differs = differs;
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
@ -182,7 +181,8 @@ var proto = {
_recompute: noop, _recompute: noop,
_set: _set, _set: _set,
_mount: _mount, _mount: _mount,
_unmount: _unmount _unmount: _unmount,
_differs: _differs
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */

@ -43,7 +43,7 @@ function destroy(detach) {
this._fragment = this._state = null; this._fragment = this._state = null;
} }
function differs(a, b) { function _differs(a, b) {
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
} }
@ -86,7 +86,6 @@ function init(component, options) {
component._observers = { pre: blankObject(), post: blankObject() }; component._observers = { pre: blankObject(), post: blankObject() };
component._handlers = blankObject(); component._handlers = blankObject();
component._bind = options._bind; component._bind = options._bind;
component._differs = differs;
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
@ -182,7 +181,8 @@ var proto = {
_recompute: noop, _recompute: noop,
_set: _set, _set: _set,
_mount: _mount, _mount: _mount,
_unmount: _unmount _unmount: _unmount,
_differs: _differs
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */

@ -43,7 +43,7 @@ function destroy(detach) {
this._fragment = this._state = null; this._fragment = this._state = null;
} }
function differs(a, b) { function _differs(a, b) {
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
} }
@ -86,7 +86,6 @@ function init(component, options) {
component._observers = { pre: blankObject(), post: blankObject() }; component._observers = { pre: blankObject(), post: blankObject() };
component._handlers = blankObject(); component._handlers = blankObject();
component._bind = options._bind; component._bind = options._bind;
component._differs = differs;
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
@ -182,7 +181,8 @@ var proto = {
_recompute: noop, _recompute: noop,
_set: _set, _set: _set,
_mount: _mount, _mount: _mount,
_unmount: _unmount _unmount: _unmount,
_differs: _differs
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */

@ -47,7 +47,7 @@ function destroy(detach) {
this._fragment = this._state = null; this._fragment = this._state = null;
} }
function differs(a, b) { function _differs(a, b) {
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
} }
@ -90,7 +90,6 @@ function init(component, options) {
component._observers = { pre: blankObject(), post: blankObject() }; component._observers = { pre: blankObject(), post: blankObject() };
component._handlers = blankObject(); component._handlers = blankObject();
component._bind = options._bind; component._bind = options._bind;
component._differs = differs;
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
@ -186,7 +185,8 @@ var proto = {
_recompute: noop, _recompute: noop,
_set: _set, _set: _set,
_mount: _mount, _mount: _mount,
_unmount: _unmount _unmount: _unmount,
_differs: _differs
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */

@ -45,7 +45,7 @@ function destroy(detach) {
this._fragment = this._state = null; this._fragment = this._state = null;
} }
function differs(a, b) { function _differs(a, b) {
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
} }
@ -88,7 +88,6 @@ function init(component, options) {
component._observers = { pre: blankObject(), post: blankObject() }; component._observers = { pre: blankObject(), post: blankObject() };
component._handlers = blankObject(); component._handlers = blankObject();
component._bind = options._bind; component._bind = options._bind;
component._differs = differs;
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
@ -184,7 +183,8 @@ var proto = {
_recompute: noop, _recompute: noop,
_set: _set, _set: _set,
_mount: _mount, _mount: _mount,
_unmount: _unmount _unmount: _unmount,
_differs: _differs
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */

@ -62,7 +62,7 @@ function destroy(detach) {
this._fragment = this._state = null; this._fragment = this._state = null;
} }
function differs(a, b) { function _differs(a, b) {
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
} }
@ -105,7 +105,6 @@ function init(component, options) {
component._observers = { pre: blankObject(), post: blankObject() }; component._observers = { pre: blankObject(), post: blankObject() };
component._handlers = blankObject(); component._handlers = blankObject();
component._bind = options._bind; component._bind = options._bind;
component._differs = differs;
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
@ -201,7 +200,8 @@ var proto = {
_recompute: noop, _recompute: noop,
_set: _set, _set: _set,
_mount: _mount, _mount: _mount,
_unmount: _unmount _unmount: _unmount,
_differs: _differs
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */

@ -55,7 +55,7 @@ function destroy(detach) {
this._fragment = this._state = null; this._fragment = this._state = null;
} }
function differs(a, b) { function _differs(a, b) {
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
} }
@ -98,7 +98,6 @@ function init(component, options) {
component._observers = { pre: blankObject(), post: blankObject() }; component._observers = { pre: blankObject(), post: blankObject() };
component._handlers = blankObject(); component._handlers = blankObject();
component._bind = options._bind; component._bind = options._bind;
component._differs = differs;
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
@ -194,7 +193,8 @@ var proto = {
_recompute: noop, _recompute: noop,
_set: _set, _set: _set,
_mount: _mount, _mount: _mount,
_unmount: _unmount _unmount: _unmount,
_differs: _differs
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */

@ -41,7 +41,7 @@ function destroy(detach) {
this._fragment = this._state = null; this._fragment = this._state = null;
} }
function differs(a, b) { function _differs(a, b) {
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
} }
@ -84,7 +84,6 @@ function init(component, options) {
component._observers = { pre: blankObject(), post: blankObject() }; component._observers = { pre: blankObject(), post: blankObject() };
component._handlers = blankObject(); component._handlers = blankObject();
component._bind = options._bind; component._bind = options._bind;
component._differs = differs;
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
@ -180,7 +179,8 @@ var proto = {
_recompute: noop, _recompute: noop,
_set: _set, _set: _set,
_mount: _mount, _mount: _mount,
_unmount: _unmount _unmount: _unmount,
_differs: _differs
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */

@ -27,7 +27,7 @@ function destroy(detach) {
this._fragment = this._state = null; this._fragment = this._state = null;
} }
function differs(a, b) { function _differs(a, b) {
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
} }
@ -70,7 +70,6 @@ function init(component, options) {
component._observers = { pre: blankObject(), post: blankObject() }; component._observers = { pre: blankObject(), post: blankObject() };
component._handlers = blankObject(); component._handlers = blankObject();
component._bind = options._bind; component._bind = options._bind;
component._differs = differs;
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
@ -166,7 +165,8 @@ var proto = {
_recompute: noop, _recompute: noop,
_set: _set, _set: _set,
_mount: _mount, _mount: _mount,
_unmount: _unmount _unmount: _unmount,
_differs: _differs
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */

@ -27,7 +27,7 @@ function destroy(detach) {
this._fragment = this._state = null; this._fragment = this._state = null;
} }
function differs(a, b) { function _differs(a, b) {
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
} }
@ -70,7 +70,6 @@ function init(component, options) {
component._observers = { pre: blankObject(), post: blankObject() }; component._observers = { pre: blankObject(), post: blankObject() };
component._handlers = blankObject(); component._handlers = blankObject();
component._bind = options._bind; component._bind = options._bind;
component._differs = differs;
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
@ -166,7 +165,8 @@ var proto = {
_recompute: noop, _recompute: noop,
_set: _set, _set: _set,
_mount: _mount, _mount: _mount,
_unmount: _unmount _unmount: _unmount,
_differs: _differs
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */

@ -47,7 +47,7 @@ function destroy(detach) {
this._fragment = this._state = null; this._fragment = this._state = null;
} }
function differs(a, b) { function _differs(a, b) {
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
} }
@ -90,7 +90,6 @@ function init(component, options) {
component._observers = { pre: blankObject(), post: blankObject() }; component._observers = { pre: blankObject(), post: blankObject() };
component._handlers = blankObject(); component._handlers = blankObject();
component._bind = options._bind; component._bind = options._bind;
component._differs = differs;
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
@ -186,7 +185,8 @@ var proto = {
_recompute: noop, _recompute: noop,
_set: _set, _set: _set,
_mount: _mount, _mount: _mount,
_unmount: _unmount _unmount: _unmount,
_differs: _differs
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */

@ -27,7 +27,7 @@ function destroy(detach) {
this._fragment = this._state = null; this._fragment = this._state = null;
} }
function differs(a, b) { function _differs(a, b) {
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
} }
@ -70,7 +70,6 @@ function init(component, options) {
component._observers = { pre: blankObject(), post: blankObject() }; component._observers = { pre: blankObject(), post: blankObject() };
component._handlers = blankObject(); component._handlers = blankObject();
component._bind = options._bind; component._bind = options._bind;
component._differs = differs;
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
@ -166,7 +165,8 @@ var proto = {
_recompute: noop, _recompute: noop,
_set: _set, _set: _set,
_mount: _mount, _mount: _mount,
_unmount: _unmount _unmount: _unmount,
_differs: _differs
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */

@ -51,7 +51,7 @@ function destroy(detach) {
this._fragment = this._state = null; this._fragment = this._state = null;
} }
function differs(a, b) { function _differs(a, b) {
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
} }
@ -94,7 +94,6 @@ function init(component, options) {
component._observers = { pre: blankObject(), post: blankObject() }; component._observers = { pre: blankObject(), post: blankObject() };
component._handlers = blankObject(); component._handlers = blankObject();
component._bind = options._bind; component._bind = options._bind;
component._differs = differs;
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
@ -190,7 +189,8 @@ var proto = {
_recompute: noop, _recompute: noop,
_set: _set, _set: _set,
_mount: _mount, _mount: _mount,
_unmount: _unmount _unmount: _unmount,
_differs: _differs
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */

@ -47,7 +47,7 @@ function destroy(detach) {
this._fragment = this._state = null; this._fragment = this._state = null;
} }
function differs(a, b) { function _differs(a, b) {
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
} }
@ -90,7 +90,6 @@ function init(component, options) {
component._observers = { pre: blankObject(), post: blankObject() }; component._observers = { pre: blankObject(), post: blankObject() };
component._handlers = blankObject(); component._handlers = blankObject();
component._bind = options._bind; component._bind = options._bind;
component._differs = differs;
component.options = options; component.options = options;
component.root = options.root || component; component.root = options.root || component;
@ -186,7 +185,8 @@ var proto = {
_recompute: noop, _recompute: noop,
_set: _set, _set: _set,
_mount: _mount, _mount: _mount,
_unmount: _unmount _unmount: _unmount,
_differs: _differs
}; };
/* generated by Svelte vX.Y.Z */ /* generated by Svelte vX.Y.Z */

@ -161,8 +161,7 @@ describe("runtime", () => {
target, target,
hydrate, hydrate,
data: config.data, data: config.data,
store: (config.store !== true && config.store), store: (config.store !== true && config.store)
immutable: config.immutable
}, config.options || {}); }, config.options || {});
const component = new SvelteComponent(options); const component = new SvelteComponent(options);

Loading…
Cancel
Save