Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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;
};