Upgrade to new simple-source API

master
Sven Slootweg 4 years ago
parent 17b27b04ec
commit 3737104161

@ -7,15 +7,13 @@ module.exports = function rangeNumbers(start, end, step = 1) {
/* End is exclusive */
let i = start;
return simpleSource({
onRequest: () => {
if (i >= end) {
throw new EndOfStream();
} else {
let number = i;
i += step;
return number;
}
return simpleSource(() => {
if (i >= end) {
throw new EndOfStream();
} else {
let number = i;
i += step;
return number;
}
});
};

@ -17,9 +17,9 @@
create-error "^0.3.1"
"@ppstreams/simple-source@^0.1.0":
version "0.1.0"
resolved "https://registry.yarnpkg.com/@ppstreams/simple-source/-/simple-source-0.1.0.tgz#8d0cd546f1752a565da5ef4767a4e08f93a9143d"
integrity sha512-uoIzWFfU3oaptibd3JnqDOVTBzbrUKu2DpnUAjvnUEn6qM18ghoKWNtpAX4mGGqMl7huYUhABpB7YpILvpBwng==
version "0.1.1"
resolved "https://registry.yarnpkg.com/@ppstreams/simple-source/-/simple-source-0.1.1.tgz#a8f276f2b6a27632edc0f123dc64c183414c4f9e"
integrity sha512-q0jpPZSGmld9VIhM+GmMRqwE9PXRiEJSXf3jhypf5VqiEs1JfrSNENvFeLYL/OxaF5PV+Jh0Up1hRfBWVK4+Sw==
dependencies:
"@ppstreams/aborted" "^0.1.0"
"@validatem/core" "^0.3.12"

Loading…
Cancel
Save