geninq
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

GenInq

This is an implementation of the Linq feature set using JavaScript Generators. It also works using AsyncGenerators and is fully types and tested for your convenience.

Using the library is simple. Just import the code and your autocomplete will do the request. There is also a handy utility attached to arrays to turn them into Generators for processing.

import "geninq";
import fs from "fs-extra";

for await (const pointless_file of [1, 2, 3, 4]
  .geninq()
  .select((i) => i + 4)
  .where((i) => i % 2 !== 0)
  .async()
  .select((i) => fs.readJson(PATH_FROM_INTEGER(i)))
  .take(2)) {
  // Do something with your file
}

This project has only just been started and I will be using it in professional work as well as personal projects to expect to see more updates to the ReadMe bug fixes to come.

Until then, please feel free to use this library and report any issues on the GitHub page or make contributions yourself. All pull requests will be considered.

Package Sidebar

Install

npm i geninq

Weekly Downloads

0

Version

0.0.3

License

ISC

Unpacked Size

304 kB

Total Files

178

Last publish

Collaborators

  • paulpopat