@types/ip-subnet-calculator
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/ip-subnet-calculator

Weekly Downloads

2,231

Version

1.1.3

License

MIT

Unpacked Size

4.25 kB

Total Files

5

Last publish

Collaborators

  • types