https://github.com/qwtel/lilit
Florian's little iterator library.
https://github.com/qwtel/lilit
async-await async-iterators for-await-of iterator-library iterators library
Last synced: 2 months ago
JSON representation
Florian's little iterator library.
- Host: GitHub
- URL: https://github.com/qwtel/lilit
- Owner: qwtel
- Created: 2019-03-02T11:55:57.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-05T10:20:36.000Z (about 6 years ago)
- Last Synced: 2025-01-09T01:47:20.902Z (4 months ago)
- Topics: async-await, async-iterators, for-await-of, iterator-library, iterators, library
- Language: TypeScript
- Homepage: https://qwtel.com/posts/software/solving-advent-of-code-puzzles-with-es-generators/
- Size: 532 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Florian's Little Iterator Library
[![Build status][tr-svg]][travis]
An iterator library that is so simple you could have written it yourself.
ECMAScriopt's new (async) generator functions are powerful and almost seem to be designed to build libraries like these.
## What's Included
- [x] [Sync iterator version](./src/iter.ts)
- [x] [Async iterator version](./src/async-iter.ts)
- [ ] [itertools] Feature Parity
- [x] Type Declarations
- [ ] Typedoc
- [x] Basic Tests
- [ ] Advanced Tests
- [x] Usable everywhere
- [x] [Deno]
- [x] Node Modules
- [x] Node Require
- [x] Browser Imports
- [ ] 1.0 Release[deno]: https://deno.land
[itertools]: https://docs.python.org/2/library/itertools.html## How to Use
### Deno
```ts
// main.ts
import * as lilit from 'https://unpkg.com/lilit/ts/index.ts';
```
Run via `deno main.ts`### Node 11+ Modules
```js
// main.mjs
import * as lilit from 'lilit/mjs';
```Run via `node --experimental-modules main.mjs`
### Node Require
```js
// main.js
const lilit = require('lilit');
```Run via `node main.js`
### Browser Imports
```js
// main.js
import * as lilit from 'https://unpkg.com/lilit/mjs/index.mjs';
```Load via ``
### Other
To see what else is availabe, [browse the package contents](https://unpkg.com/lilit/).[tr-svg]: https://travis-ci.org/qwtel/lilit.svg?branch=master
[travis]: https://travis-ci.org/qwtel/lilit