How to use the stream-browserify.Stream.Writable function in stream-browserify

To help you get started, we’ve selected a few stream-browserify examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hdmchl / NaiveBayesClassifier / src / learn.js View on Github external
export function createLearnStreamForCategory(category) {
	return Stream ? new Stream.Writable({
		decodeStrings: false,
		write: function write(chunk, encoding, next) {
			var text = chunk.toString('utf8');

			this.learn(text, category);

			next();
		}.bind(this)
	}) : undefined;
};

stream-browserify

the stream module from node core for browsers

MIT
Latest version published 4 years ago

Package Health Score

71 / 100
Full package analysis