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

ip-cidr

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ip-cidr - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

12

index.js

@@ -109,3 +109,3 @@ "use strict";

getChunkInfo(length, options) {
let from, limit, to;
let from, limit, to, maxLength;

@@ -130,6 +130,8 @@ if(options.from !== undefined) {

if(limit.compareTo(length) > 0) {
limit = length.subtract(from);
maxLength = length.subtract(from);
if(limit.compareTo(maxLength) > 0) {
limit = maxLength;
}
to = from.add(limit);

@@ -142,3 +144,3 @@

length: length
}
};
}

@@ -145,0 +147,0 @@ }

{
"name": "ip-cidr",
"version": "1.1.0",
"version": "1.1.1",
"description": "Module for working with CIDR (v4, v6)",

@@ -5,0 +5,0 @@ "main": "./index.js",

@@ -30,5 +30,7 @@ # Install

cidr.toRange(); // get array of start and end ip as string [startIpAsString, endIpAsString]
```
## Client side
Load __/dist/ip-cidr.js__ as script and get the library in window.IPCIDR
# API

@@ -35,0 +37,0 @@ ### .formatIP(address, [options])

Sorry, the diff of this file is too big to display

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