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

swiz

Package Overview
Dependencies
Maintainers
7
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swiz - npm Package Compare versions

Comparing version 0.4.56 to 0.5.0

21

lib/validators.js

@@ -1,2 +0,2 @@

var check = require('validator').check;
var check = require('validator');

@@ -29,10 +29,21 @@ var utils = require('./util');

exports.isHostname = function(value) {
var pattern = /^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$/;
try {
check(value).regex(pattern);
var pattern = /^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$/,
labels;
if (!pattern.test(value)) {
return false;
}
catch (e) {
if (value.length > 255) {
return false;
}
labels = value.split('.');
for (i=0; i < labels.length; i++) {
if (labels[i].length > 63) {
return false;
}
}
return true;

@@ -39,0 +50,0 @@ };

@@ -15,3 +15,3 @@ {

"description": "Serialization and Validation Framework for objects in RESTful APIs",
"version": "0.4.56",
"version": "0.5.0",
"homepage": "https://github.com/racker/node-swiz",

@@ -32,5 +32,5 @@ "repository": {

},
"dependencies" : {
"dependencies": {
"async": "0.1.18",
"validator": "0.4.9",
"validator": "3.5.0",
"ipv6": "2.0.2",

@@ -37,0 +37,0 @@ "elementtree": "0.1.1",

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

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