diff options
| author | TheMas3212 <mas3212@gmail.com> | 2025-02-02 17:34:27 +1100 |
|---|---|---|
| committer | TheMas3212 <mas3212@gmail.com> | 2025-02-02 17:34:27 +1100 |
| commit | 981a5a2c7edecc2239dda1bc3321003f939a7450 (patch) | |
| tree | e328af15169d75ead4ce262f1cae36a2be6ba6d4 /src/file.ts | |
| parent | acf7a79d0e6d3d09f4fc029d3eb35dd905d2b3ea (diff) | |
| download | tasd-js-981a5a2c7edecc2239dda1bc3321003f939a7450.tar.gz tasd-js-981a5a2c7edecc2239dda1bc3321003f939a7450.zip | |
Apply and fix new eslint ruleset
Diffstat (limited to 'src/file.ts')
| -rw-r--r-- | src/file.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/file.ts b/src/file.ts index f95c8ff..139aa76 100644 --- a/src/file.ts +++ b/src/file.ts @@ -38,8 +38,8 @@ export class TASD { return concatUint8Array(packets); } pprint() { - console.log('VERSION', this.version); - console.log('G_KEYLEN', this.g_keylen); + console.log("VERSION", this.version); + console.log("G_KEYLEN", this.g_keylen); for (const packet of this.packets) { console.log(packet.toString()); } @@ -64,14 +64,14 @@ export class TASD { this.markDirty(); } static parseFile(buffer: Uint8Array) { - if (buffer.length < 7) throw new Error('Input Too Short'); + if (buffer.length < 7) throw new Error("Input Too Short"); for (let i = 0; i < TASD.MAGIC.length; i++) { - if (buffer[i] !== TASD.MAGIC[i]) throw new Error('Invalid Magic Bytes'); + if (buffer[i] !== TASD.MAGIC[i]) throw new Error("Invalid Magic Bytes"); } const version = readUint16(buffer, 4); - if (version !== 1) throw new Error('Unsupported Version'); + if (version !== 1) throw new Error("Unsupported Version"); const g_keylen = readUint8(buffer, 6); - if (g_keylen !== 2) throw new Error('G_KEYLEN not equal to 2, unsupported'); + if (g_keylen !== 2) throw new Error("G_KEYLEN not equal to 2, unsupported"); const file = new TASD(version, g_keylen); let index = 7; while (index < buffer.length) { |
