0.0.7 • Published 2 years ago

jetl v0.0.7

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

jetl

npm version ci release docs

JavaScript data processing with asynchronous iterators.

Documentation

Check out the documentation website.

Setup

npm i jetl

Usage

The example below comments out each line of the current file and prints the result

const fs = require('fs')

const { pipeline } = require('jetl')
const { first } = require('jetl/operators')
const { joinStrings, map, split } = require('jetl/operations')

const result = new pipeline()             // instantiate pipeline
  .add(fs.createReadStream(__filename))   // read file
  .add(split())                           // split into multiple lines
  .add(map(line => `// ${line}`))         // prepend each line with a comment
  .add(joinStrings('\n'))                 // join the lines together
  .run()                                  // execute  the pipeline

console.log(await first(result))          // print the first (only) result
0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago