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

0.0.9 • Public • Published

node-aline

Align last bytes to newline boundary of stream chunks

Install

NPM

npm install aline

Yarn

yarn add aline

Sample

const Aline = require('aline');
const {Readable} = require('stream');

async function* generate() {
    yield 'foo\nba';
    yield 'ar\nbaz';
}

const stream = Readable.from(generate()).pipe(new Aline());

stream.on('data', function(chunk) {
    console.log(chunk.toString());
});

Dependents (0)

Package Sidebar

Install

npm i aline

Weekly Downloads

4

Version

0.0.9

License

MIT

Unpacked Size

8.79 kB

Total Files

12

Last publish

Collaborators

  • tugrul