PHP 8.2.30
Preview: common.js Size: 1.41 KB
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/ip-address/dist/common.js

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isInSubnet = isInSubnet;
exports.isCorrect = isCorrect;
exports.numberToPaddedHex = numberToPaddedHex;
exports.stringToPaddedHex = stringToPaddedHex;
exports.testBit = testBit;
function isInSubnet(address) {
    if (this.subnetMask < address.subnetMask) {
        return false;
    }
    if (this.mask(address.subnetMask) === address.mask()) {
        return true;
    }
    return false;
}
function isCorrect(defaultBits) {
    return function () {
        if (this.addressMinusSuffix !== this.correctForm()) {
            return false;
        }
        if (this.subnetMask === defaultBits && !this.parsedSubnet) {
            return true;
        }
        return this.parsedSubnet === String(this.subnetMask);
    };
}
function numberToPaddedHex(number) {
    return number.toString(16).padStart(2, '0');
}
function stringToPaddedHex(numberString) {
    return numberToPaddedHex(parseInt(numberString, 10));
}
/**
 * @param binaryValue Binary representation of a value (e.g. `10`)
 * @param position Byte position, where 0 is the least significant bit
 */
function testBit(binaryValue, position) {
    const { length } = binaryValue;
    if (position > length) {
        return false;
    }
    const positionInString = length - position;
    return binaryValue.substring(positionInString, positionInString + 1) === '1';
}
//# sourceMappingURL=common.js.map

Directory Contents

Dirs: 2 × Files: 20

Name Size Perms Modified Actions
v4 DIR
- drwxr-xr-x 2026-02-03 15:06:18
Edit Download
v6 DIR
- drwxr-xr-x 2026-02-03 15:06:20
Edit Download
179 B lrw-r--r-- 2026-02-03 15:06:18
Edit Download
228 B lrw-r--r-- 2026-02-03 15:06:18
Edit Download
372 B lrw-r--r-- 2026-02-03 15:06:14
Edit Download
301 B lrw-r--r-- 2026-02-03 15:06:18
Edit Download
737 B lrw-r--r-- 2026-02-03 15:06:18
Edit Download
568 B lrw-r--r-- 2026-02-03 15:06:18
Edit Download
1.41 KB lrw-r--r-- 2026-02-03 15:06:14
Edit Download
1.23 KB lrw-r--r-- 2026-02-03 15:06:18
Edit Download
258 B lrw-r--r-- 2026-02-03 15:06:20
Edit Download
305 B lrw-r--r-- 2026-02-03 15:06:18
Edit Download
1.73 KB lrw-r--r-- 2026-02-03 15:06:18
Edit Download
295 B lrw-r--r-- 2026-02-03 15:06:18
Edit Download
5.22 KB lrw-r--r-- 2026-02-03 15:06:20
Edit Download
1.50 KB lrw-r--r-- 2026-02-03 15:06:18
Edit Download
10.00 KB lrw-r--r-- 2026-02-03 15:06:18
Edit Download
5.60 KB lrw-r--r-- 2026-02-03 15:06:18
Edit Download
11.83 KB lrw-r--r-- 2026-02-03 15:06:20
Edit Download
3.48 KB lrw-r--r-- 2026-02-03 15:06:18
Edit Download
33.27 KB lrw-r--r-- 2026-02-03 15:06:18
Edit Download
22.84 KB lrw-r--r-- 2026-02-03 15:06:18
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).