timepiece/node_modules/lit-html/node/development/directives/range.js

16 lines
397 B
JavaScript
Raw Normal View History

2024-05-14 14:54:12 +00:00
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
function* range(startOrEnd, end, step = 1) {
const start = end === undefined ? 0 : startOrEnd;
end !== null && end !== void 0 ? end : (end = startOrEnd);
for (let i = start; step > 0 ? i < end : end < i; i += step) {
yield i;
}
}
export { range };
//# sourceMappingURL=range.js.map