mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-22 02:35:56 +02:00
* Code cleanup and eslint since -- remove unused variables, clean up RegExs, so on...
This commit is contained in:
parent
a106050ba3
commit
ac1433e84b
112 changed files with 1375 additions and 1898 deletions
|
@ -10,7 +10,7 @@ exports.CRC32 = class CRC32 {
|
|||
}
|
||||
|
||||
update(input) {
|
||||
input = Buffer.isBuffer(input) ? input : Buffer.from(input, 'binary');
|
||||
input = Buffer.isBuffer(input) ? input : Buffer.from(input, 'binary');
|
||||
return input.length > 10240 ? this.update_8(input) : this.update_4(input);
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ exports.CRC32 = class CRC32 {
|
|||
this.crc = (this.crc >>> 8) ^ CRC32_TABLE[ (this.crc ^ input[i++] ) & 0xff ];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
finalize() {
|
||||
return (this.crc ^ (-1)) >>> 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue