lint: 0 warnings left

This commit is contained in:
Rajeh Taher
2024-10-14 05:15:10 +03:00
parent 61a0ff3178
commit 18ac07df8e
32 changed files with 652 additions and 1006 deletions

View File

@@ -28,9 +28,12 @@ const encodeBinaryNodeInner = (
}
}
const pushBytes = (bytes: Uint8Array | Buffer | number[]) => (
bytes.forEach (b => buffer.push(b))
)
const pushBytes = (bytes: Uint8Array | Buffer | number[]) => {
for(const b of bytes) {
buffer.push(b)
}
}
const pushInt16 = (value: number) => {
pushBytes([(value >> 8) & 0xff, value & 0xff])
}
@@ -151,8 +154,7 @@ const encodeBinaryNodeInner = (
return false
}
for(let i = 0;i < str.length;i++) {
const char = str[i]
for(const char of str) {
const isInNibbleRange = char >= '0' && char <= '9'
if(!isInNibbleRange && char !== '-' && char !== '.') {
return false
@@ -167,8 +169,7 @@ const encodeBinaryNodeInner = (
return false
}
for(let i = 0;i < str.length;i++) {
const char = str[i]
for(const char of str) {
const isInNibbleRange = char >= '0' && char <= '9'
if(!isInNibbleRange && !(char >= 'A' && char <= 'F') && !(char >= 'a' && char <= 'f')) {
return false