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

ip

Package Overview
Dependencies
Maintainers
5
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ip - npm Package Compare versions

Comparing version 1.1.6 to 2.0.0

8

lib/ip.js

@@ -11,3 +11,3 @@ const ip = exports;

if (this.isV4Format(ip)) {
result = buff || new Buffer(offset + 4);
result = buff || Buffer.alloc(offset + 4);
ip.split(/\./g).map((byte) => {

@@ -47,3 +47,3 @@ result[offset++] = parseInt(byte, 10) & 0xff;

result = buff || new Buffer(offset + 16);
result = buff || Buffer.alloc(offset + 16);
for (i = 0; i < sections.length; i++) {

@@ -119,3 +119,3 @@ const word = parseInt(sections[i], 16);

}
const buff = new Buffer(len);
const buff = Buffer.alloc(len);

@@ -139,3 +139,3 @@ for (let i = 0, n = buff.length; i < n; ++i) {

const result = new Buffer(Math.max(addr.length, mask.length));
const result = Buffer.alloc(Math.max(addr.length, mask.length));

@@ -142,0 +142,0 @@ // Same protocol - do bitwise and

{
"name": "ip",
"version": "1.1.6",
"version": "2.0.0",
"author": "Fedor Indutny <fedor@indutny.com>",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/indutny/node-ip",

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