formatter-stream

1.0.0 • Public • Published

formatter-stream

Stream that transforms objects into strings using pre-defined format. Useful for streaming logs.

Installation

$ npm install formatter-stream --save

Usage

var FormatterStream = require('formatter-stream');
 
var stream = new FormatterStream(':author wrote ":book"');
 
stream.on('data', function (data) {
    data.toString() === 'Arthur Conan Doyle wrote "Sherlock Holmes"'; // true
});
 
stream.write({
    author: 'Arthur Conan Doyle',
    book: 'Sherlock Holmes'
});
 
stream.end();

Tests

$ npm test

License

formatter-stream is released under the MIT license.

Readme

Keywords

Package Sidebar

Install

npm i formatter-stream

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • vdemedes