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

0.0.8 • 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());
});

Readme

Keywords

Package Sidebar

Install

npm i aline

Weekly Downloads

1

Version

0.0.8

License

MIT

Unpacked Size

5.16 kB

Total Files

6

Last publish

Collaborators

  • tugrul