diff --git a/TODO b/TODO index 4889071..b316801 100644 --- a/TODO +++ b/TODO @@ -60,7 +60,7 @@ DONE Bug: slowly dragging should change marble time DONE Cycle.js rewrite DONE Fix throttleWithSelector DONE Add withLatestFrom example -TODO Review all RxJS operators to remove deprecated +DONE Review all RxJS operators to remove deprecated >>> v1.2.0 TODO Build scripts to replace gulp (?) diff --git a/dist/js/app.js b/dist/js/app.js index 8ff1676..d3e0d3d 100644 --- a/dist/js/app.js +++ b/dist/js/app.js @@ -24191,21 +24191,21 @@ module.exports = { var Rx = require("cyclejs").Rx; module.exports = { - all: { - label: "all(x => x < 10)", + every: { + label: "every(x => x < 10)", inputs: [[{ t: 5, d: 1 }, { t: 15, d: 2 }, { t: 25, d: 3 }, { t: 35, d: 4 }, { t: 65, d: 5 }, 80]], apply: function (inputs) { - return inputs[0].all(function (x) { + return inputs[0].every(function (x) { return x.get("content") < 10; }); } }, - any: { - label: "any(x => x > 10)", + some: { + label: "some(x => x > 10)", inputs: [[{ t: 5, d: 2 }, { t: 15, d: 30 }, { t: 25, d: 22 }, { t: 35, d: 5 }, { t: 45, d: 60 }, { t: 55, d: 1 }]], apply: function (inputs) { - return inputs[0].any(function (x) { + return inputs[0].some(function (x) { return x.get("content") > 10; }); } @@ -24639,19 +24639,19 @@ module.exports = { } }, - throttle: { - label: "throttle", + debounce: { + label: "debounce", inputs: [[{ t: 0, d: 1 }, { t: 26, d: 2 }, { t: 34, d: 3 }, { t: 40, d: 4 }, { t: 45, d: 5 }, { t: 79, d: 6 }]], apply: function (inputs, scheduler) { - return inputs[0].throttle(10, scheduler); + return inputs[0].debounce(10, scheduler); } }, - throttleWithSelector: { - label: "throttleWithSelector(x => Rx.Observable.timer(10 * x))", + debounceWithSelector: { + label: "debounceWithSelector(x => Rx.Observable.timer(10 * x))", inputs: [[{ t: 0, d: 1 }, { t: 26, d: 2 }, { t: 34, d: 1 }, { t: 40, d: 1 }, { t: 45, d: 2 }, { t: 79, d: 1 }]], apply: function (inputs, scheduler) { - return inputs[0].throttleWithSelector(function (x) { + return inputs[0].debounceWithSelector(function (x) { return Rx.Observable.timer(Number(x.get("content")) * 10, 1000, scheduler); }); } diff --git a/src/data/boolean-examples.js b/src/data/boolean-examples.js index 530f48b..8069c70 100644 --- a/src/data/boolean-examples.js +++ b/src/data/boolean-examples.js @@ -1,23 +1,23 @@ var Rx = require('cyclejs').Rx; module.exports = { - "all": { - "label": "all(x => x < 10)", + "every": { + "label": "every(x => x < 10)", "inputs": [ [{t:5, d:1}, {t:15, d:2}, {t:25, d:3}, {t:35, d:4}, {t:65, d:5}, 80] ], "apply": function(inputs) { - return inputs[0].all(x => (x.get('content') < 10)); + return inputs[0].every(x => (x.get('content') < 10)); } }, - "any": { - "label": "any(x => x > 10)", + "some": { + "label": "some(x => x > 10)", "inputs": [ [{t:5, d:2}, {t:15, d:30}, {t:25, d:22}, {t:35, d:5}, {t:45, d:60}, {t:55, d:1}] ], "apply": function(inputs) { - return inputs[0].any(x => (x.get('content') > 10)); + return inputs[0].some(x => (x.get('content') > 10)); } }, diff --git a/src/data/transform-examples.js b/src/data/transform-examples.js index fd570d7..8d4b9f6 100644 --- a/src/data/transform-examples.js +++ b/src/data/transform-examples.js @@ -56,23 +56,23 @@ module.exports = { } }, - "throttle": { - "label": "throttle", + "debounce": { + "label": "debounce", "inputs": [ [{t:0, d:1}, {t:26, d:2}, {t:34, d:3}, {t:40, d:4}, {t:45, d:5}, {t:79, d:6}] ], "apply": function(inputs, scheduler) { - return inputs[0].throttle(10, scheduler); + return inputs[0].debounce(10, scheduler); } }, - "throttleWithSelector": { - "label": "throttleWithSelector(x => Rx.Observable.timer(10 * x))", + "debounceWithSelector": { + "label": "debounceWithSelector(x => Rx.Observable.timer(10 * x))", "inputs": [ [{t:0, d:1}, {t:26, d:2}, {t:34, d:1}, {t:40, d:1}, {t:45, d:2}, {t:79, d:1}] ], "apply": function(inputs, scheduler) { - return inputs[0].throttleWithSelector(x => + return inputs[0].debounceWithSelector(x => Rx.Observable.timer(Number(x.get('content')) * 10, 1000, scheduler) ); }