mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
lint: 0 warnings left
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user