mirror of
https://github.com/abrendan/l00kup.git
synced 2025-08-25 14:02:08 +02:00
Initial commit
This commit is contained in:
26
node_modules/ip-address/dist/common.js
generated
vendored
Normal file
26
node_modules/ip-address/dist/common.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.isCorrect = exports.isInSubnet = void 0;
|
||||
function isInSubnet(address) {
|
||||
if (this.subnetMask < address.subnetMask) {
|
||||
return false;
|
||||
}
|
||||
if (this.mask(address.subnetMask) === address.mask()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
exports.isInSubnet = isInSubnet;
|
||||
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);
|
||||
};
|
||||
}
|
||||
exports.isCorrect = isCorrect;
|
||||
//# sourceMappingURL=common.js.map
|
Reference in New Issue
Block a user