Upgrade to new simple-source API

master
Sven Slootweg 4 years ago
parent 17b27b04ec
commit 3737104161

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

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

Loading…
Cancel
Save