Skip to content
This repository has been archived by the owner on Oct 26, 2021. It is now read-only.

Commit

Permalink
Review all RxJS operators to remove deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre Medeiros committed Jan 30, 2015
1 parent 656b757 commit a2191cf
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion TODO
Original file line number Diff line number Diff line change
Expand Up @@ -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 (?)
Expand Down
24 changes: 12 additions & 12 deletions dist/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
}
Expand Down Expand Up @@ -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);
});
}
Expand Down
12 changes: 6 additions & 6 deletions src/data/boolean-examples.js
Original file line number Diff line number Diff line change
@@ -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));
}
},

Expand Down
12 changes: 6 additions & 6 deletions src/data/transform-examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
);
}
Expand Down

0 comments on commit a2191cf

Please sign in to comment.