Commit graph

24 commits

Author SHA1 Message Date
Isiah Meadows
b98ab29efd
Make errors and their messages more accurate and helpful (#2536)
Also, I normalized them to all be sentences for consistency, and I moved
the reentrancy check from `m.mount` to `m.render` to be a little more
helpful. The router change during mounting is inconsequential and only
to avoid the new modified error, and the change to the update loop is to
send the original error if an error occurred while initializing the
default route. (This is all around more useful anyways.)

And while I was at it, I fixed an obscure bug with sync redraws.
2019-09-30 16:08:04 -04:00
spacejack
61b087ea20 Conform stream.map to FL spec and clarify stream internal properties (#2481)
* Conform stream.map to FL spec. Clarify stream internal properties.

* Streamline ignoreInitial logic, code style edit
2019-07-23 02:35:50 -04:00
Ivan Kupalov
7eea1b1e62 Fix Stream.end() (#2369) 2019-02-07 03:44:31 -05:00
Isiah Meadows
2a9b3964ca Fix the Stream.HALT warning's condition
Previously, it warned on all *but* the first use, which is obviously
wrong. This corrects it to correctly fire on only the first use.
2019-02-05 11:03:50 -05:00
Isiah Meadows
f30cf0afaa
Streams should be in ES5 2019-01-17 03:29:50 -05:00
Adam Gamble
23fe0a5ab1 Fixed scan with skip (#2357)
* Fixed bad test for scan

The previous test didn't catch the fact that the accumulator had been
broke, it's value became the special value `SKIP`.

* Fixed Stream.scan() to accept SKIP value

* Update stream/stream.js

Dropped unnecessary ternary as suggested by @isiahmeadows

Co-Authored-By: gamb <adam@gamb.co>
2019-01-09 23:10:02 -05:00
Rasmus Porsager
58c86f7546 Rewrite stream (#2207)
* Rewrite stream

* Rename HALT to SKIP

* Rename HALT to SKIP

* Remove valueOf and toString

* Update docs for HALT to SKIP

* Rename halt to skip in test

* Add test for combining nested streams atomically

* Update change-log.md

* Test basic SKIP

* Add deprecated HALT

* Combine continues with ended streams

* Fix fantasy-land/of to match spec

* Don't use arrow function

* Improve scan description

* Fix merge artifact
2018-11-27 15:11:24 -05:00
spacejack
76e585c523 Add Stream.lift (#1950)
* Add stream.lift and tests

* Add docs

* Add to change-log
2018-11-13 18:55:45 -05:00
Rasmus Porsager
d64e0a950f Fix #1714 conditionally halting stream (#2200)
* Fix #1714 conditionally halting stream

* Add note in changelog
2018-08-08 15:06:21 +01:00
Barney Carroll
e1a50890e9 stream: Removed valueOf & toString methods (fixes #2150) (#2151)
* stream: Removed `valueOf` & `toString` methods (fixes #2150)

* Update stream documentation
2018-05-16 00:01:30 +02:00
Adam Gamble
fb3c344055 Scan with halt (#1957)
* HALT if scan reducer doesn't change value

* Updated docs to reflect new scan behaviour with HALT
2018-05-03 16:52:33 +01:00
Pierre-Yves Gérardy
bc21be0880 Move "use strict" directive inside the stream IIFE #1831 2017-07-11 10:07:33 +02:00
Pierre-Yves Gérardy
f272e36de0 Merge pull request #1738 from pygy/fix-stream-end-map
Fix stream end map
2017-03-26 21:31:13 +02:00
calainos
9d3d8774ac docs: Remove m.prop reference in error message (#1742)
Changing m.prop.combine and m.prop.merge to stream.combine and stream.merge
2017-03-24 15:32:11 -07:00
Pierre-Yves Gerardy
f22f884b1e Unregister the end streams after their dependents have run fix #1736 2017-03-24 22:29:43 +01:00
spacejack
683d85a952 refactor: Move scan and scanMerge to stream module (#1718) 2017-03-15 17:22:06 -07:00
Pierre-Yves Gerardy
c3d015be28 IICE => IIFE 2017-03-04 23:24:21 +01:00
Pierre-Yves Gérardy
273d3d4740 Merge branch 'next' into next 2017-03-04 16:34:15 +01:00
Patrik Johnson
59ed3c7d48 Always expose stream on m.stream, use unpkg for docs (#1535)
... and document how streams are exposed in when loaded as <script> in global context
2017-03-04 16:27:02 +01:00
RobertAKARobin
23e4a57114 Put Stream in IIFE so variables aren't global
...when imported into the browser via <script> tags.
2017-03-03 20:44:41 -06:00
Mikkel Bergmann
d1a3f7fe9b Make it work in a browser 2016-12-21 10:02:21 +11:00
eladzlot
3a1124f3ec simplify array operators in stream 2016-11-20 14:13:35 +02:00
Leo Horie
5552ef31b1 lint 2016-11-15 23:20:22 -05:00
Leo Horie
6ce2a384ec simplify streams, lint docs 2016-11-15 23:13:38 -05:00