REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.25 KB
Close
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/ip-address/src/v6/helpers.ts
Text
Base64
/** * @returns {String} the string with all zeroes contained in a <span> */ export function spanAllZeroes(s: string): string { return s.replace(/(0+)/g, '<span class="zero">$1</span>'); } /** * @returns {String} the string with each character contained in a <span> */ export function spanAll(s: string, offset: number = 0): string { const letters = s.split(''); return letters .map( (n, i) => `<span class="digit value-${n} position-${i + offset}">${spanAllZeroes(n)}</span>`, ) .join(''); } function spanLeadingZeroesSimple(group: string): string { return group.replace(/^(0+)/, '<span class="zero">$1</span>'); } /** * @returns {String} the string with leading zeroes contained in a <span> */ export function spanLeadingZeroes(address: string): string { const groups = address.split(':'); return groups.map((g) => spanLeadingZeroesSimple(g)).join(':'); } /** * Groups an address * @returns {String} a grouped address */ export function simpleGroup(addressString: string, offset: number = 0): string[] { const groups = addressString.split(':'); return groups.map((g, i) => { if (/group-v4/.test(g)) { return g; } return `<span class="hover-group group-${i + offset}">${spanLeadingZeroesSimple(g)}</span>`; }); }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 3
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
constants.ts
2.30 KB
lrw-r--r--
2026-02-03 15:06:20
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
helpers.ts
1.25 KB
lrw-r--r--
2026-02-03 15:06:20
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
regular-expressions.ts
2.33 KB
lrw-r--r--
2026-02-03 15:06:20
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).