0.0.3 • Published 2 years ago

geninq v0.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

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.