mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-09 07:45:00 -04:00
Fixed compilation errors
This commit is contained in:
parent
ea8acc6035
commit
05f51b30d0
1 changed files with 4 additions and 4 deletions
|
@ -398,11 +398,11 @@ export function strToIpv6(ipStr, retArr=true) {
|
|||
export function expandIpv6(ipStr) {
|
||||
const compactIndex = ipStr.search("::");
|
||||
let expandedStr = ipStr.substring(0, compactIndex); // 1234:5678::..
|
||||
const insertOffset = compactIndex == 0;
|
||||
const insertOffset = compactIndex === 0; // 0 / 1
|
||||
const ipEnd = ipStr.substring(compactIndex + 1); // :7ABC:DEFG:...
|
||||
const missingChars = 39 - (expandedStr.length + ipEnd.length);
|
||||
for (let i = insertOffset; i < missingChars + insertOffset; i++) {
|
||||
if (i % 5 == 0) {
|
||||
if (i % 5 === 0) {
|
||||
expandedStr += ":";
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue