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

@sideway/address

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sideway/address - npm Package Compare versions

Comparing version 4.1.2 to 4.1.3

18

lib/domain.js

@@ -20,2 +20,6 @@ 'use strict';

if (!domain) { // Catch null / undefined
return Errors.code('DOMAIN_NON_EMPTY_STRING');
}
if (typeof domain !== 'string') {

@@ -25,6 +29,2 @@ throw new Error('Invalid input: domain must be a string');

if (!domain) {
return Errors.code('DOMAIN_NON_EMPTY_STRING');
}
if (domain.length > 256) {

@@ -51,2 +51,8 @@ return Errors.code('DOMAIN_TOO_LONG');

if (options.allowFullyQualified &&
domain[domain.length - 1] === '.') {
domain = domain.slice(0, -1);
}
const minDomainSegments = options.minDomainSegments || internals.minDomainSegments;

@@ -110,2 +116,6 @@

if (domain.includes('%')) {
domain = domain.replace(/%/g, '%25');
}
try {

@@ -112,0 +122,0 @@ return new internals.URL(`http://${domain}`).host;

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

raw = `(?=.)(?!https?\:/$)${raw}`; // Require at least one character and explicitly forbid 'http:/'
raw = `(?=.)(?!https?\:/(?:$|[^/]))(?!https?\:///)(?!https?\:[^/])${raw}`; // Require at least one character and explicitly forbid 'http:/' or HTTP with empty domain

@@ -185,0 +185,0 @@ return {

{
"name": "@sideway/address",
"description": "Email address and domain validation",
"version": "4.1.2",
"version": "4.1.3",
"repository": "git://github.com/sideway/address",

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

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