npm.io
3.1.4 • Published yesterday

ip-utilties

Licence
0BSD
Version
3.1.4
Deps
0
Size
15 kB
Vulns
0
Weekly
0

npm License Typed with TypeScript bundlejs downloads GitHub Issues Build Status Styled with prettier Commitizen friendly Known Vulnerabilities

ip-v4/v6 utility functions

Three different representations

const ip4AsString = "10.0.0.1";
const ip4AsArray = new Uint8Array([10,0,0,1]);
const ip4or6AsBigInt = 10n << 24n | 1n;


encodeIPv4("10.0.0.1") // -> 10n << 24n | 1n;

API

install

With npm do:

npm install ip-utilties

license

BSD-2-Clause

Keywords