Socket
Socket
Sign inDemoInstall

ip

Package Overview
Dependencies
0
Maintainers
3
Versions
26
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

2

lib/ip.js

@@ -288,3 +288,3 @@ 'use strict';

ip.isLoopback = function isLoopback(addr) {
return /^127\.0\.0\.1$/.test(addr) ||
return /^127\.\d+\.\d+\.\d+$/.test(addr) ||
/^fe80::1$/.test(addr) ||

@@ -291,0 +291,0 @@ /^::1$/.test(addr) ||

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

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

@@ -289,4 +289,10 @@ 'use strict';

describe('8.8.8.8', function() {
it('should respond with false', function() {
describe('127.8.8.8', function () {
it('should respond with true', function () {
assert.ok(ip.isLoopback('127.8.8.8'))
});
});
describe('8.8.8.8', function () {
it('should respond with false', function () {
assert.equal(ip.isLoopback('8.8.8.8'), false);

@@ -293,0 +299,0 @@ });

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc