Remove usage of == and !=
This commit is contained in:
parent
205a617c51
commit
b67cd10c64
21 changed files with 79 additions and 78 deletions
|
@ -25,12 +25,12 @@ export function encode(data) {
|
|||
out += alphabet[u24 & 0x3F];
|
||||
}
|
||||
|
||||
if (trailing == 1) {
|
||||
if (trailing === 1) {
|
||||
let u8 = bytes[bytes.length - 1];
|
||||
out += alphabet[u8 >> 2];
|
||||
out += alphabet[(u8 << 4) & 0x3F];
|
||||
out += "==";
|
||||
} else if (trailing == 2) {
|
||||
} else if (trailing === 2) {
|
||||
let u16 = (bytes[bytes.length - 2] << 8) + bytes[bytes.length - 1];
|
||||
out += alphabet[u16 >> 10];
|
||||
out += alphabet[(u16 >> 4) & 0x3F];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue