Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
opt
/
alt
/
alt-nodejs22
/
root
/
lib
/
node_modules
/
npm
/
node_modules
/
ip-address
/
dist
/
File Content:
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
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
v4
---
0755
v6
---
0755
address-error.js
372 bytes
0644
common.js
1446 bytes
0644
ip-address.js
1772 bytes
0644
ipv4.js
11473 bytes
0644
ipv6.js
34068 bytes
0644
N4ST4R_ID | Naxtarrr