Releases: cyclejs/time
Releases · cyclejs/time
Custom equality functions
Thanks to the wonderful @raquelxmoss, we now support using custom equality functions.
v0.6.1
- Fix an issue where the virtual scheduler would advance one frame further than expected
v0.6.0
- Add support for simultaneous events
E.g:
it("handles multiple events in a single frame", (done) => {
const Time = mockTimeSource();
const a = Time.diagram('---a------');
const b = Time.diagram('---b------');
const expected = Time.diagram('---(ab)---');
Time.assertEqual(xs.merge(a, b), expected);
Time.run(done);
});
- Fail if streams complete at different times
- Allow testing infinite streams (like
.periodic()
) without using.take()
or completion
it("creates a stream that emits every period ms", (done) => {
const Time = mockTimeSource();
const stream = Time.periodic(80);
const expected = Time.diagram(
`----0---1---2---`
);
Time.assertEqual(
stream,
expected
);
Time.run(done);
});
This is nice because the previous behavior was to timeout when an infinite stream was used without .take
Unified
Add support for rxjs
and most
.
For rxjs
users:
import {timeDriver, mockTimeSource} from '@cycle/time/rxjs';
For most
users:
import {timeDriver, mockTimeSource} from '@cycle/time/most';
Types specific to each stream library are included for TypeScript users.
v0.2.1
- Use any
xstream
version - Fix module not loading on linux
v0.2.0
Add animationFrames
and throttleAnimation
.