Skip to content

Commit

Permalink
chore: readonly
Browse files Browse the repository at this point in the history
  • Loading branch information
Bugs5382 committed Nov 2, 2024
1 parent 33b02d1 commit 563764f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/utils/codec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ export class MLLPCodec {
/** @internal */
private dataBuffer: Buffer = Buffer.alloc(0)
/** @internal */
private _encoding: BufferEncoding;
private readonly _encoding: BufferEncoding
/** @internal */
private _returnCharacter: string;
private readonly _returnCharacter: string

/**
* @since 3.1.0
* @param encoding
* @param returnCharcter
* @param returnCharacter
*/
constructor(encoding: BufferEncoding = 'utf-8', returnCharcter: string = '\r') {
constructor (encoding: BufferEncoding = 'utf-8', returnCharacter: string = '\r') {
this._encoding = encoding
this._returnCharacter = returnCharcter
this._returnCharacter = returnCharacter
}

/**
Expand All @@ -29,7 +29,6 @@ export class MLLPCodec {
* @private
*/
private processMessage (): void {

const messages: string[] = []
const dataString = this.dataBuffer.toString(this._encoding)
const messageParts = dataString.split('\u001c\r')
Expand Down

0 comments on commit 563764f

Please sign in to comment.