Iterator is a package that provide iteratable instances for JavaScript / TypeScript.
yarn add @sudoo/iterator
# Or
npm install @sudoo/iterator --save
All class exported from this package implements the Iterable
interface. So you can use it as a iterable object.
const iterable = SomeIterator.create() // Iterable instance
for(const each of iterable) {
// Do Something
}
const iterable = SomeIterator.create() // Iterable instance
const values = [...iterable];
This section is currently work in progress.
- Numeric