Comparing version 0.0.9-beta.7 to 0.0.9-beta.8
@@ -97,3 +97,3 @@ import { S, ignore, onClean, unwrap, root } from 'solid-js'; | ||
return map((newList) => { | ||
var d, end, i, indexedItems, item, itemIndex, j, k, l, len, len1, len2, m, newEnd, newLength, newListUnwrapped, newMapped, start, tempDisposables, tempSignals; | ||
var d, end, i, indexedItems, item, itemIndex, j, k, l, len, len1, len2, m, mappedFn, newEnd, newLength, newListUnwrapped, newMapped, start, tempDisposables, tempSignals; | ||
// non-arrays | ||
@@ -129,2 +129,9 @@ newListUnwrapped = unwrap(newList, true); | ||
} | ||
mappedFn = function(dispose) { | ||
disposables[j] = dispose; | ||
if (trackIndex) { | ||
return mapFn((typeof newList.peek === "function" ? newList.peek(j) : void 0) || newList[j], signals[j] = new Signal(j), newList); | ||
} | ||
return mapFn((typeof newList.peek === "function" ? newList.peek(j) : void 0) || newList[j]); | ||
}; | ||
newLength = newListUnwrapped.length; | ||
@@ -146,13 +153,7 @@ if (newLength === 0) { | ||
} else if (length === 0) { | ||
i = 0; | ||
while (i < newLength) { | ||
list[i] = newListUnwrapped[i]; | ||
mapped[i] = root(function(dispose) { | ||
disposables[i] = dispose; | ||
if (trackIndex) { | ||
return mapFn((typeof newList.peek === "function" ? newList.peek(i) : void 0) || newList[i], signals[i] = new Signal(i), newList); | ||
} | ||
return mapFn((typeof newList.peek === "function" ? newList.peek(i) : void 0) || newList[i]); | ||
}); | ||
i++; | ||
j = 0; | ||
while (j < newLength) { | ||
list[j] = newListUnwrapped[j]; | ||
mapped[j] = root(mappedFn); | ||
j++; | ||
} | ||
@@ -177,5 +178,5 @@ length = newLength; | ||
newMapped[newEnd] = mapped[end]; | ||
tempDisposables[newEnd] = disposables[newEnd]; | ||
tempDisposables[newEnd] = disposables[end]; | ||
if (trackIndex) { | ||
tempSignals[newEnd] = signals[newEnd]; | ||
tempSignals[newEnd] = signals[end]; | ||
} | ||
@@ -227,9 +228,3 @@ end--; | ||
} else { | ||
mapped[j] = root(function(dispose) { | ||
disposables[j] = dispose; | ||
if (trackIndex) { | ||
return mapFn((typeof newList.peek === "function" ? newList.peek(j) : void 0) || newList[j], signals[j] = new Signal(j), newList); | ||
} | ||
return mapFn((typeof newList.peek === "function" ? newList.peek(j) : void 0) || newList[j]); | ||
}); | ||
mapped[j] = root(mappedFn); | ||
} | ||
@@ -236,0 +231,0 @@ j++; |
@@ -350,3 +350,3 @@ import $$observable from 'symbol-observable'; | ||
if (this._value !== void 0) { | ||
(observer.next || observer)(this._value); | ||
(observer.next || observer).call(observer, this._value); | ||
} | ||
@@ -550,2 +550,5 @@ return d; | ||
var Signal$1 = S = function(payload, options = {}) { | ||
if (!((payload != null) && isObject(payload))) { | ||
return new Signal(payload); | ||
} | ||
if ('sid' in payload) { | ||
@@ -563,3 +566,3 @@ return payload; | ||
} | ||
return new Signal(payload, options); | ||
return new Signal(payload); | ||
}; | ||
@@ -566,0 +569,0 @@ |
@@ -101,3 +101,3 @@ 'use strict'; | ||
return map((newList) => { | ||
var d, end, i, indexedItems, item, itemIndex, j, k, l, len, len1, len2, m, newEnd, newLength, newListUnwrapped, newMapped, start, tempDisposables, tempSignals; | ||
var d, end, i, indexedItems, item, itemIndex, j, k, l, len, len1, len2, m, mappedFn, newEnd, newLength, newListUnwrapped, newMapped, start, tempDisposables, tempSignals; | ||
// non-arrays | ||
@@ -133,2 +133,9 @@ newListUnwrapped = solidJs.unwrap(newList, true); | ||
} | ||
mappedFn = function(dispose) { | ||
disposables[j] = dispose; | ||
if (trackIndex) { | ||
return mapFn((typeof newList.peek === "function" ? newList.peek(j) : void 0) || newList[j], signals[j] = new Signal(j), newList); | ||
} | ||
return mapFn((typeof newList.peek === "function" ? newList.peek(j) : void 0) || newList[j]); | ||
}; | ||
newLength = newListUnwrapped.length; | ||
@@ -150,13 +157,7 @@ if (newLength === 0) { | ||
} else if (length === 0) { | ||
i = 0; | ||
while (i < newLength) { | ||
list[i] = newListUnwrapped[i]; | ||
mapped[i] = solidJs.root(function(dispose) { | ||
disposables[i] = dispose; | ||
if (trackIndex) { | ||
return mapFn((typeof newList.peek === "function" ? newList.peek(i) : void 0) || newList[i], signals[i] = new Signal(i), newList); | ||
} | ||
return mapFn((typeof newList.peek === "function" ? newList.peek(i) : void 0) || newList[i]); | ||
}); | ||
i++; | ||
j = 0; | ||
while (j < newLength) { | ||
list[j] = newListUnwrapped[j]; | ||
mapped[j] = solidJs.root(mappedFn); | ||
j++; | ||
} | ||
@@ -181,5 +182,5 @@ length = newLength; | ||
newMapped[newEnd] = mapped[end]; | ||
tempDisposables[newEnd] = disposables[newEnd]; | ||
tempDisposables[newEnd] = disposables[end]; | ||
if (trackIndex) { | ||
tempSignals[newEnd] = signals[newEnd]; | ||
tempSignals[newEnd] = signals[end]; | ||
} | ||
@@ -231,9 +232,3 @@ end--; | ||
} else { | ||
mapped[j] = solidJs.root(function(dispose) { | ||
disposables[j] = dispose; | ||
if (trackIndex) { | ||
return mapFn((typeof newList.peek === "function" ? newList.peek(j) : void 0) || newList[j], signals[j] = new Signal(j), newList); | ||
} | ||
return mapFn((typeof newList.peek === "function" ? newList.peek(j) : void 0) || newList[j]); | ||
}); | ||
mapped[j] = solidJs.root(mappedFn); | ||
} | ||
@@ -240,0 +235,0 @@ j++; |
@@ -356,3 +356,3 @@ 'use strict'; | ||
if (this._value !== void 0) { | ||
(observer.next || observer)(this._value); | ||
(observer.next || observer).call(observer, this._value); | ||
} | ||
@@ -556,2 +556,5 @@ return d; | ||
var Signal$1 = S = function(payload, options = {}) { | ||
if (!((payload != null) && isObject(payload))) { | ||
return new Signal(payload); | ||
} | ||
if ('sid' in payload) { | ||
@@ -569,3 +572,3 @@ return payload; | ||
} | ||
return new Signal(payload, options); | ||
return new Signal(payload); | ||
}; | ||
@@ -572,0 +575,0 @@ |
{ | ||
"name": "solid-js", | ||
"description": "A declarative JavaScript library for building user interfaces.", | ||
"version": "0.0.9-beta.7", | ||
"version": "0.0.9-beta.8", | ||
"author": "Ryan Carniato", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -134,2 +134,3 @@ # Solid.js | ||
* [Observables](../master/documentation/observables.md) | ||
* [Operators](../master/documentation/operators.md) | ||
@@ -147,3 +148,3 @@ ## Related Projects | ||
This project is still a work in progress. Although I've been working on it for the past 2 years it's been evolving considerably. I've decided to open source this at this point to share the concept. It took discovering the approaches used by Surplus.js to fill the missing pieces this library needed to prove out it's concept. And now I believe we can have performance and a simple clean API. | ||
This project is still a work in progress. Although I've been working on it for the past 2 years it's been evolving considerably. I've decided to open source this at this point to share the concept. It took discovering the approaches used by [Surplus.js](https://github.com/adamhaile/surplus) to fill the missing pieces this library needed to prove out it's concept. And now I believe we can have performance and a simple clean API. | ||
@@ -150,0 +151,0 @@ Areas of Improvement: |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
152
141582
4073