npm.io
0.1.3 • Published 2 years ago

@types/ipcheck

Licence
MIT
Version
0.1.3
Deps
0
Size
3 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/ipcheck

Summary

This package contains type definitions for ipcheck (https://github.com/gosquared/ipcheck).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ipcheck.

index.d.ts

declare const ipcheck: ipcheck.IPCheckStatic;
export = ipcheck;
export as namespace ipcheck;

declare namespace ipcheck {
    interface IPCheck {
        address: number[];
        input: string;
        ipv: 4 | 6 | 0;
        mask: number;
        valid: boolean;

        match(cidr: IPCheck | string): boolean;
    }

    interface IPCheckConstructor {
        new(input: string): IPCheck;
    }

    interface IPCheckStatic extends IPCheckConstructor {
        match(ip: IPCheck | string, cidr: IPCheck | string): boolean;
    }
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 0337 GMT
  • Dependencies: none

Credits

These definitions were written by Ben Grynhaus.