Comparing version 2.0.5 to 2.0.6
@@ -1,49 +0,48 @@ | ||
export = ipcidr; | ||
export as namespace ipcidr; | ||
import { Address4, Address6 } from "ip-address"; | ||
import { BigInteger } from "jsbn"; | ||
import {Address4, Address6} from "ip-address"; | ||
import {BigInteger} from "jsbn"; | ||
declare class IPCIDR { | ||
constructor(cidr: string); | ||
declare namespace ipcidr { | ||
type Address = Address4 | Address6; | ||
type FormatResult = BigInteger | Address | string; | ||
formatIP<T = IPCIDR.FormatResult>(address: IPCIDR.Address, options?: any): T; | ||
interface FormatOptions { | ||
type: "bigInteger" | "addressObject", | ||
from: number | BigInteger; | ||
limit: number | BigInteger; | ||
} | ||
start<T = IPCIDR.FormatResult>(options?: IPCIDR.FormatOptions): T; | ||
interface ChunkInfo { | ||
from: BigInteger; | ||
to: BigInteger; | ||
limit: number; | ||
length: number; | ||
} | ||
end<T = IPCIDR.FormatResult>(options?: IPCIDR.FormatOptions): T; | ||
interface IPCIDR { | ||
constructor(cidr: string): IPCIDR; | ||
toRange<T = IPCIDR.FormatResult>(options?: IPCIDR.FormatOptions): [T, T]; | ||
formatIP<T = FormatResult>(address: Address, options?: any): T; | ||
loop<T = IPCIDR.FormatResult, R = any>(fn: (ip: T) => Promise<R>, options: IPCIDR.FormatOptions, results?: IPCIDR.ChunkInfo): Promise<R>[]; | ||
start<T = FormatResult>(options?: FormatOptions): T; | ||
getChunkInfo(length: number, options: IPCIDR.FormatOptions): IPCIDR.ChunkInfo; | ||
end<T = FormatResult>(options?: FormatOptions): T; | ||
contains(address: IPCIDR.Address | string): boolean; | ||
toRange<T = FormatResult>(options?: FormatOptions): [T, T]; | ||
isValid(): boolean; | ||
loop<T = FormatResult, R = any>(fn: (ip: T) => Promise<R>, options: FormatOptions, results?: ChunkInfo): Promise<R>[]; | ||
toString(): string; | ||
getChunkInfo(length: number, options: FormatOptions): ChunkInfo; | ||
toArray(): string[]; | ||
contains(address: Address | string): boolean; | ||
toObject(): { start: string, end: string }; | ||
} | ||
isValid(): boolean; | ||
declare namespace IPCIDR { | ||
type Address = Address4 | Address6; | ||
type FormatResult = BigInteger | Address | string; | ||
toString(): string; | ||
interface FormatOptions { | ||
type: "bigInteger" | "addressObject", | ||
from: number | BigInteger; | ||
limit: number | BigInteger; | ||
} | ||
toArray(): string[]; | ||
interface ChunkInfo { | ||
from: BigInteger; | ||
to: BigInteger; | ||
limit: number; | ||
length: number; | ||
} | ||
} | ||
toObject(): { start: string, end: string }; | ||
} | ||
} | ||
export = IPCIDR; |
{ | ||
"name": "ip-cidr", | ||
"version": "2.0.5", | ||
"version": "2.0.6", | ||
"description": "Module for working with CIDR (v4, v6)", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
696469
20694