Installation
npm install --save @types/ip-subnet-calculator
Summary
This package contains type definitions for ip-subnet-calculator (https://github.com/franksrevenge/IPSubnetCalculator).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ip-subnet-calculator.
index.d.ts
export as namespace IpSubnetCalculator;
export function calculate(ipStart: string | number, ipEnd: string | number): SubnetResult[];
export function calculateSubnetMask(ip: string | number, prefixSize: number): SubnetResult;
export function calculateCIDRPrefix(ip: string | number, subnetMask: string | number): SubnetResult;
export function isIp(ipStr: string): boolean;
export function isDecimalIp(ipNum: number): boolean;
export function toDecimal(ip: string | number): number;
export function toString(num: string | number): string;
export interface SubnetResult {
ipLow: number;
ipLowStr: string;
ipHigh: number;
ipHighStr: string;
prefixMask: number;
prefixMaskStr: string;
prefixSize: number;
invertedMask: number;
invertedMaskStr: string;
invertedSize: number;
}
Additional Details
- Last updated: Tue, 07 Nov 2023 03:09:37 GMT
- Dependencies: none
Credits
These definitions were written by dahool.