diff --git a/dist/index.d.ts b/dist/index.d.ts index c91f2e9..af749d0 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -6,7 +6,6 @@ export declare class StreamLineReader { value: string; nextValue: string; lineNumber: number; - charset: any; it?: AsyncIterableIterator; eof: number; init(readStream: stream.Readable): Promise; diff --git a/dist/index.js b/dist/index.js index 0eb8727..88527b0 100644 --- a/dist/index.js +++ b/dist/index.js @@ -12,7 +12,6 @@ class StreamLineReader { this.value = ''; this.nextValue = ''; this.lineNumber = -1; - this.charset = 'utf8'; this.eof = -1; } async init(readStream) { @@ -68,9 +67,7 @@ class TextFileDiff extends events_1.EventEmitter { async diffStream(stream1, stream2) { const lineReader1 = await (new StreamLineReader()).init(stream1); const lineReader2 = await (new StreamLineReader()).init(stream2); - const { compareFn, charset } = this.options; - lineReader1.charset = charset; - lineReader2.charset = charset; + const { compareFn } = this.options; if (this.options.skipHeader) { await lineReader1.moveNext(); await lineReader2.moveNext(); @@ -130,4 +127,4 @@ class TextFileDiff extends events_1.EventEmitter { } } exports.default = TextFileDiff; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsbUNBQW9DO0FBQ3BDLG1DQUEyQztBQUMzQywyQkFBOEM7QUFDOUMsdUNBQW9EO0FBR3BELGlDQUFrQztBQUVsQyxNQUFNLEtBQUssR0FBRyxPQUFPLENBQUMsZ0JBQWdCLENBQUMsQ0FBQztBQUV4QyxNQUFhLGdCQUFnQjtJQUE3QjtRQUNFLFVBQUssR0FBVyxFQUFFLENBQUM7UUFDbkIsY0FBUyxHQUFXLEVBQUUsQ0FBQztRQUN2QixlQUFVLEdBQVcsQ0FBQyxDQUFDLENBQUM7UUFDeEIsWUFBTyxHQUFRLE1BQU0sQ0FBQztRQUV0QixR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VJlYWRlcjIubW92ZU5leHQoKTtcbiAgICB9IGVsc2UgaWYgKGNtcCA8IDApIHtcbiAgICAgIC8vIGxpbmUxIDwgbGluZTI6IGRlbGV0ZWQgbGluZVxuICAgICAgaWYgKGNtcCA9PT0gLTEpIHtcbiAgICAgICAgLy8gaWYgZmlsZTEgZW5kZWQgYmVmb3JlIGZpbGUyLCB0aGVuIGZpbGUyIGhhcyBuZXcgbGluZVxuICAgICAgICAvLyBlbHNlIGZpbGUxIGxvc3QgYSBsaW5lXG4gICAgICAgIGlmIChsaW5lUmVhZGVyMS5lb2YgPiBsaW5lUmVhZGVyMi5lb2YpIHtcbiAgICAgICAgICB0aGlzLmVtaXQoJysnLCBsaW5lMiwgbGluZVJlYWRlcjEsIGxpbmVSZWFkZXIyKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICB0aGlzLmVtaXQoJy0nLCBsaW5lMSwgbGluZVJlYWRlcjEsIGxpbmVSZWFkZXIyKTtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICAvLyBpbmNyIEZpbGUxIHRvIG5leHQgbGluZVxuICAgICAgYXdhaXQgbGluZVJlYWRlcjEubW92ZU5leHQoKTtcbiAgICB9XG4gIH1cbn1cbiJdfQ== \ No newline at end of file diff --git a/dist/types.d.ts b/dist/types.d.ts index 149e32f..5a9680f 100644 --- a/dist/types.d.ts +++ b/dist/types.d.ts @@ -1,5 +1,4 @@ export declare class TextFileDiffOption { skipHeader: boolean; - charset: any; compareFn(line1: string, line2: string): 1 | -1 | 0; } diff --git a/dist/types.js b/dist/types.js index a8d8209..1fc07fa 100644 --- a/dist/types.js +++ b/dist/types.js @@ -4,11 +4,10 @@ exports.TextFileDiffOption = void 0; class TextFileDiffOption { constructor() { this.skipHeader = false; - this.charset = 'utf8'; } compareFn(line1, line2) { return line1 > line2 ? 1 : (line1 < line2 ? -1 : 0); } } exports.TextFileDiffOption = TextFileDiffOption; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW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VksS0FBSyxDQUFDO0lBSTlCLENBQUM7SUFIQyxTQUFTLENBQUMsS0FBYSxFQUFFLEtBQWE7UUFDcEMsT0FBTyxLQUFLLEdBQUcsS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsS0FBSyxHQUFHLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO0lBQ3RELENBQUM7Q0FDRjtBQUxELGdEQUtDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtFdmVudEVtaXR0ZXJ9IGZyb20gJ2V2ZW50cyc7XG5cbmV4cG9ydCBjbGFzcyBUZXh0RmlsZURpZmZPcHRpb24ge1xuICBza2lwSGVhZGVyOiBib29sZWFuID0gZmFsc2U7XG4gIGNvbXBhcmVGbihsaW5lMTogc3RyaW5nLCBsaW5lMjogc3RyaW5nKSB7XG4gICAgcmV0dXJuIGxpbmUxID4gbGluZTIgPyAxIDogKGxpbmUxIDwgbGluZTIgPyAtMSA6IDApO1xuICB9XG59XG4iXX0= \ No newline at end of file diff --git a/package.json b/package.json index 748b83b..8123828 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "text-file-diff", - "version": "1.4.2", + "version": "1.4.3", "description": "line by line diff of two large files", "license": "MIT", "repository": "niiknow/text-file-diff", diff --git a/src/types.ts b/src/types.ts index 567e71a..b1778cf 100644 --- a/src/types.ts +++ b/src/types.ts @@ -2,7 +2,6 @@ import {EventEmitter} from 'events'; export class TextFileDiffOption { skipHeader: boolean = false; - charset: any = 'utf8'; compareFn(line1: string, line2: string) { return line1 > line2 ? 1 : (line1 < line2 ? -1 : 0); }