Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ip-bigint

Package Overview
Dependencies
Maintainers
0
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ip-bigint - npm Package Compare versions

Comparing version 8.1.0 to 8.1.1

dist/index.d.ts.map

1

dist/index.d.ts

@@ -19,1 +19,2 @@ export declare const max4: bigint;

export {};
//# sourceMappingURL=index.d.ts.map

11

dist/index.js

@@ -8,4 +8,3 @@ const max4 = 2n ** 32n - 1n;

const version = ipVersion(ip);
if (!version)
throw new Error(`Invalid IP address: ${ip}`);
if (!version) throw new Error(`Invalid IP address: ${ip}`);
let number = 0n;

@@ -33,3 +32,3 @@ let exp = 0n;

let scopeid;
[, ip, scopeid] = /(.+)%(.+)/.exec(ip);
[, ip, scopeid] = /(.+)%(.+)/.exec(ip) || [];
res.scopeid = scopeid;

@@ -94,4 +93,4 @@ }

function compressIPv6(parts) {
let longest;
let current;
let longest = null;
let current = null;
for (const [index, part] of parts.entries()) {

@@ -113,3 +112,3 @@ if (part === "0") {

}
if (!longest && current || current && current.size > longest.size) {
if (!longest && current || current && longest && current.size > longest.size) {
longest = current;

@@ -116,0 +115,0 @@ }

{
"name": "ip-bigint",
"version": "8.1.0",
"version": "8.1.1",
"description": "Convert IPv4 and IPv6 addresses to and from BigInt",

@@ -20,11 +20,11 @@ "author": "silverwind <me@silverwind.io>",

"devDependencies": {
"@types/node": "20.12.12",
"@types/node": "20.14.7",
"eslint": "8.57.0",
"eslint-config-silverwind": "85.1.3",
"eslint-config-silverwind-typescript": "3.2.5",
"typescript-config-silverwind": "4.2.0",
"updates": "16.1.1",
"versions": "12.0.2",
"vite": "5.2.11",
"vite-plugin-dts": "3.9.1",
"eslint-config-silverwind": "88.1.0",
"eslint-config-silverwind-typescript": "4.0.2",
"typescript-config-silverwind": "5.1.1",
"updates": "16.2.0",
"versions": "12.1.2",
"vite": "5.3.1",
"vite-config-silverwind": "2.2.2",
"vitest": "1.6.0",

@@ -31,0 +31,0 @@ "vitest-config-silverwind": "9.0.6"

@@ -19,3 +19,2 @@ # ip-bigint

// => "2001:db8::1"
```

@@ -22,0 +21,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc