Skip to content

Stream that transforms objects into strings using pre-defined format.

Notifications You must be signed in to change notification settings

vadimdemedes/formatter-stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Circle CI

$ npm test

License

formatter-stream is released under the MIT license.

About

Stream that transforms objects into strings using pre-defined format.

Resources

Code of conduct

Stars

Watchers

Forks

Packages

No packages published