ipaddress 0.2.5 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/crunchy.d.ts +130 -0
- package/dist/src/crunchy.d.ts.map +1 -0
- package/dist/src/crunchy.js +616 -0
- package/dist/src/index.d.ts +13 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +21 -0
- package/{ip_bits.d.ts → dist/src/ip_bits.d.ts} +6 -7
- package/dist/src/ip_bits.d.ts.map +1 -0
- package/dist/src/ip_bits.js +133 -0
- package/{ip_version.d.ts → dist/src/ip_version.d.ts} +2 -1
- package/dist/src/ip_version.d.ts.map +1 -0
- package/dist/src/ip_version.js +6 -0
- package/{ipaddress.d.ts → dist/src/ipaddress.d.ts} +38 -35
- package/dist/src/ipaddress.d.ts.map +1 -0
- package/dist/src/ipaddress.js +1243 -0
- package/dist/src/ipv4.d.ts +15 -0
- package/dist/src/ipv4.d.ts.map +1 -0
- package/dist/src/ipv4.js +187 -0
- package/dist/src/ipv6.d.ts +13 -0
- package/dist/src/ipv6.d.ts.map +1 -0
- package/dist/src/ipv6.js +190 -0
- package/dist/src/ipv6_loopback.d.ts +6 -0
- package/dist/src/ipv6_loopback.d.ts.map +1 -0
- package/dist/src/ipv6_loopback.js +51 -0
- package/dist/src/ipv6_mapped.d.ts +6 -0
- package/dist/src/ipv6_mapped.d.ts.map +1 -0
- package/dist/src/ipv6_mapped.js +159 -0
- package/dist/src/ipv6_unspec.d.ts +6 -0
- package/dist/src/ipv6_unspec.d.ts.map +1 -0
- package/dist/src/ipv6_unspec.js +57 -0
- package/{prefix.d.ts → dist/src/prefix.d.ts} +10 -7
- package/dist/src/prefix.d.ts.map +1 -0
- package/dist/src/prefix.js +142 -0
- package/dist/src/prefix128.d.ts +7 -0
- package/dist/src/prefix128.d.ts.map +1 -0
- package/dist/src/prefix128.js +39 -0
- package/dist/src/prefix32.d.ts +7 -0
- package/dist/src/prefix32.d.ts.map +1 -0
- package/dist/src/prefix32.js +29 -0
- package/dist/src/rle.d.ts +19 -0
- package/dist/src/rle.d.ts.map +1 -0
- package/dist/src/rle.js +73 -0
- package/dist/test/test_crunchy_impls.d.ts +2 -0
- package/dist/test/test_crunchy_impls.d.ts.map +1 -0
- package/dist/test/test_crunchy_impls.js +150 -0
- package/dist/test/test_crunchy_with32bit.d.ts +2 -0
- package/dist/test/test_crunchy_with32bit.d.ts.map +1 -0
- package/dist/test/test_crunchy_with32bit.js +382 -0
- package/dist/test/test_ipaddress.d.ts +2 -0
- package/dist/test/test_ipaddress.d.ts.map +1 -0
- package/dist/test/test_ipaddress.js +182 -0
- package/dist/test/test_ipv4.d.ts +2 -0
- package/dist/test/test_ipv4.d.ts.map +1 -0
- package/dist/test/test_ipv4.js +561 -0
- package/dist/test/test_ipv6.d.ts +2 -0
- package/dist/test/test_ipv6.d.ts.map +1 -0
- package/dist/test/test_ipv6.js +313 -0
- package/dist/test/test_ipv6_loopback.d.ts +2 -0
- package/dist/test/test_ipv6_loopback.d.ts.map +1 -0
- package/dist/test/test_ipv6_loopback.js +40 -0
- package/dist/test/test_ipv6_mapped.d.ts +2 -0
- package/dist/test/test_ipv6_mapped.d.ts.map +1 -0
- package/dist/test/test_ipv6_mapped.js +89 -0
- package/dist/test/test_ipv6_unspec.d.ts +2 -0
- package/dist/test/test_ipv6_unspec.d.ts.map +1 -0
- package/dist/test/test_ipv6_unspec.js +39 -0
- package/dist/test/test_prefix128.d.ts +2 -0
- package/dist/test/test_prefix128.d.ts.map +1 -0
- package/dist/test/test_prefix128.js +35 -0
- package/dist/test/test_prefix32.d.ts +2 -0
- package/dist/test/test_prefix32.d.ts.map +1 -0
- package/dist/test/test_prefix32.js +126 -0
- package/dist/test/test_rle.d.ts +2 -0
- package/dist/test/test_rle.d.ts.map +1 -0
- package/dist/test/test_rle.js +141 -0
- package/dist/vitest.config.d.ts +3 -0
- package/dist/vitest.config.d.ts.map +1 -0
- package/dist/vitest.config.js +11 -0
- package/package.json +41 -37
- package/src/crunchy.ts +731 -0
- package/src/index.ts +23 -0
- package/src/ip_bits.ts +148 -0
- package/src/ip_version.ts +6 -0
- package/src/ipaddress.ts +1347 -0
- package/src/ipv4.ts +203 -0
- package/src/ipv6.ts +202 -0
- package/src/ipv6_loopback.ts +55 -0
- package/src/ipv6_mapped.ts +163 -0
- package/src/ipv6_unspec.ts +59 -0
- package/src/prefix.ts +170 -0
- package/src/prefix128.ts +42 -0
- package/src/prefix32.ts +32 -0
- package/src/rle.ts +85 -0
- package/test/test_crunchy_impls.ts +179 -0
- package/test/test_crunchy_with32bit.ts +510 -0
- package/test/test_ipaddress.ts +208 -0
- package/test/test_ipv4.ts +596 -0
- package/test/test_ipv6.ts +325 -0
- package/test/test_ipv6_loopback.ts +52 -0
- package/test/test_ipv6_mapped.ts +101 -0
- package/test/test_ipv6_unspec.ts +51 -0
- package/test/test_prefix128.ts +39 -0
- package/test/test_prefix32.ts +130 -0
- package/test/test_rle.ts +144 -0
- package/LICENSE +0 -20
- package/README.md +0 -960
- package/crunchy.d.ts +0 -55
- package/index.d.ts +0 -12
- package/ipaddress.js +0 -2869
- package/ipaddress.js.map +0 -1
- package/ipv4.d.ts +0 -14
- package/ipv6.d.ts +0 -12
- package/ipv6_loopback.d.ts +0 -5
- package/ipv6_mapped.d.ts +0 -5
- package/ipv6_unspec.d.ts +0 -5
- package/prefix128.d.ts +0 -6
- package/prefix32.d.ts +0 -6
- package/rle.d.ts +0 -14
package/crunchy.d.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* based
|
|
3
|
-
* Crunch - Arbitrary-precision integer arithmetic library
|
|
4
|
-
* Copyright (C) 2014 Nenad Vukicevic crunch.secureroom.net/license
|
|
5
|
-
*
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* @module Crunch
|
|
9
|
-
* Radix: 28 bits
|
|
10
|
-
* Endianness: Big
|
|
11
|
-
*
|
|
12
|
-
* @param {boolean} rawIn - expect 28-bit arrays
|
|
13
|
-
* @param {boolean} rawOut - return 28-bit arrays
|
|
14
|
-
*/
|
|
15
|
-
export declare class Crunchy {
|
|
16
|
-
num: number[];
|
|
17
|
-
negative: boolean;
|
|
18
|
-
static zeroes: number[];
|
|
19
|
-
clone(): Crunchy;
|
|
20
|
-
static removeLeadingZeros(inn: number[]): number[];
|
|
21
|
-
static from_14bit(a: number[]): Crunchy;
|
|
22
|
-
static from_8bit(a: number[]): Crunchy;
|
|
23
|
-
static parse(val: string): Crunchy;
|
|
24
|
-
static from_number(val: number): Crunchy;
|
|
25
|
-
static from_string(val: string, radix?: number): Crunchy;
|
|
26
|
-
to_8bit(): number[];
|
|
27
|
-
compare(y: Crunchy): number;
|
|
28
|
-
eq(oth: Crunchy): boolean;
|
|
29
|
-
lte(oth: Crunchy): boolean;
|
|
30
|
-
lt(oth: Crunchy): boolean;
|
|
31
|
-
gt(oth: Crunchy): boolean;
|
|
32
|
-
gte(oth: Crunchy): boolean;
|
|
33
|
-
add(y: Crunchy): Crunchy;
|
|
34
|
-
unsigned_add(_y: Crunchy): Crunchy;
|
|
35
|
-
sub(y: Crunchy): Crunchy;
|
|
36
|
-
unsigned_sub(_y: Crunchy, internal?: boolean): Crunchy;
|
|
37
|
-
lsh(s: number): Crunchy;
|
|
38
|
-
rsh(s: number): Crunchy;
|
|
39
|
-
mul(y: Crunchy): Crunchy;
|
|
40
|
-
static msb(x: number): number;
|
|
41
|
-
shr(s: number): Crunchy;
|
|
42
|
-
shl(s: number): Crunchy;
|
|
43
|
-
cut(): Crunchy;
|
|
44
|
-
div(y: Crunchy, internal?: boolean): Crunchy;
|
|
45
|
-
mod(y: Crunchy): Crunchy;
|
|
46
|
-
mds(n: number): number;
|
|
47
|
-
toString(radix?: number): string;
|
|
48
|
-
static _zero: Crunchy;
|
|
49
|
-
static zero(): Crunchy;
|
|
50
|
-
static _one: Crunchy;
|
|
51
|
-
static one(): Crunchy;
|
|
52
|
-
static _two: Crunchy;
|
|
53
|
-
static two(): Crunchy;
|
|
54
|
-
}
|
|
55
|
-
export default Crunchy;
|
package/index.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export * from './crunchy';
|
|
2
|
-
export * from './prefix';
|
|
3
|
-
export * from './ip_bits';
|
|
4
|
-
export * from './ip_version';
|
|
5
|
-
export * from './ipaddress';
|
|
6
|
-
export * from './ipv4';
|
|
7
|
-
export * from './ipv6';
|
|
8
|
-
export * from './ipv6_mapped';
|
|
9
|
-
export * from './ipv6_loopback';
|
|
10
|
-
export * from './ipv6_unspec';
|
|
11
|
-
import IPAddress from './ipaddress';
|
|
12
|
-
export default IPAddress;
|