UNPKG

dbmaster-cli

Version:

Tool for converting tables between Fifa Soccer Games

27 lines (26 loc) 663 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SkipTransform = void 0; const stream_1 = require("stream"); class SkipTransform extends stream_1.Transform { constructor(opts) { super(opts); this.line = 0; this.opts = opts; } _transform(chunk, encoding, callback) { if (this.opts.skip && this.line < this.opts.skip) { this.line++; callback(); return; } this.push(chunk); this.line++; callback(); } _flush(callback) { this.line = 0; callback(); } } exports.SkipTransform = SkipTransform;