taoyuan/memstreams

View on GitHub
examples/rounder.ts

Summary

Maintainability
A
0 mins
Test Coverage
import {Transform} from 'readable-stream';

export class Rounder extends Transform {
  _transform(chunk, encoding, callback) {
    this.push(Math.round(chunk));
    callback();
  }
}