mirror of
https://git.stupid.fish/teidesu/scripts.git
synced 2025-07-28 02:32:11 +10:00
chore: update public repo
This commit is contained in:
parent
f02ccb6029
commit
655e5a8e15
3 changed files with 32 additions and 26 deletions
|
@ -12,28 +12,4 @@ export const ffetchShiki = ffetchBase.extend({
|
|||
...(rateLimitBypass as any),
|
||||
})
|
||||
|
||||
export function counterIter(start = 0, end = Infinity) {
|
||||
let i = start
|
||||
let ended = false
|
||||
|
||||
const iter: IterableIterator<number> = {
|
||||
[Symbol.iterator]: () => iter,
|
||||
next() {
|
||||
if (ended) {
|
||||
return { value: undefined, done: true }
|
||||
}
|
||||
|
||||
if (i > end) {
|
||||
return { value: undefined, done: true }
|
||||
}
|
||||
|
||||
return { value: i++, done: false }
|
||||
},
|
||||
}
|
||||
return {
|
||||
iter,
|
||||
end: () => {
|
||||
ended = true
|
||||
},
|
||||
}
|
||||
}
|
||||
export { counterIter } from '../../../utils/counter.ts'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue