You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
226 B
JavaScript
12 lines
226 B
JavaScript
2 years ago
|
"use strict";
|
||
|
|
||
|
const { until } = require("../operations");
|
||
|
|
||
|
module.exports = function untilDelimiter(rule) {
|
||
|
return function* () {
|
||
|
let value = yield until(rule);
|
||
|
yield rule; // Consume the delimiter
|
||
|
return value;
|
||
|
}
|
||
|
};
|