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

one-validation

Package Overview
Dependencies
Maintainers
2
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

one-validation - npm Package Compare versions

Comparing version 0.2.16 to 0.2.17

2

package.json

@@ -14,3 +14,3 @@ {

"description": "Regexp based validation collection for common internet validation tasks",
"version": "0.2.16",
"version": "0.2.17",
"repository": {

@@ -17,0 +17,0 @@ "url": "git://github.com/One-com/one-validation.git"

@@ -58,4 +58,7 @@ // THIS FILE IS AUTOGENERATED! See lib/validation.js.tpl

fragments.subdomain = new RegExp("(?:" + fragments.domainPart.source + "\\.)*" + fragments.domain.source, "i");
fragments.subdomainRelaxed = new RegExp("(?:" + fragments.domainPart.source + "\\.)+" + fragments.domainPart.source, "i");
fragments.email = new RegExp(fragments.localpart.source + "@" + fragments.subdomain.source, "i");
fragments.emailRelaxed = new RegExp(fragments.localpart.source + "@" + fragments.subdomainRelaxed.source, "i");
fragments.mailtoUrl = new RegExp("mailto:" + fragments.email.source, "i"); // TODO: This needs to be improved
fragments.mailtoUrlRelaxed = new RegExp("mailto:" + fragments.emailRelaxed.source, "i"); // TODO: This needs to be improved

@@ -70,3 +73,3 @@ // Same as location.pathname + location.search + location.hash in the browser:

function createHttpishUrlRegExp(schemeRegExp) {
function createHttpishUrlRegExp(schemeRegExp, isRelaxed) {
// [protocol"://"[username[":"password]"@"]hostname[":"port]"/"?][path]["?"querystring]["#"fragment]

@@ -82,3 +85,3 @@ return new RegExp(concatRegExps(

"(?:",
fragments.subdomain,
isRelaxed ? fragments.subdomainRelaxed : fragments.subdomain,
"|",

@@ -93,3 +96,5 @@ fragments.ipv4,

fragments.httpUrl = createHttpishUrlRegExp(/https?/);
fragments.httpUrlRelaxed = createHttpishUrlRegExp(/https?/, true);
fragments.ftpUrl = createHttpishUrlRegExp(/ftp/);
fragments.ftpUrlRelaxed = createHttpishUrlRegExp(/ftp/, true);

@@ -96,0 +101,0 @@ // Alias 'httpUrl' as 'url' for backwards compatibility:

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

(function(e,t){typeof exports=="object"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e.one=e.one||{},e.one.validation=t())})(this,function(){"use strict";function e(){var e="",t=0;for(;t<arguments.length;t+=1)Object.prototype.toString.call(arguments[t])==="[object RegExp]"?e+=arguments[t].source:e+=arguments[t];return e}function s(t){return new RegExp(e(t,"://","(?:",r.user,"(?::",r.password,")?@",")?","(?:",r.subdomain,"|",r.ipv4,")","(?::",r.port,")?",r.pathnameSearchHash),"i")}var t=/([0-9]|1?[0-9][0-9]|2[0-4][0-9]|25[0-5])/.source,n={functions:{}},r={tld:/(?:xn--(?:0zwm56d|11b5bs3a9aj6g|3e0b707e|45brj9c|80akhbyknj4f|80ao21a|90a3ac|9t4b11yi5a|clchc0ea0b2g2a9gcd|deba0ad|fiqs8s|fiqz9s|fpcrj9c3d|fzc2c9e2c|g6w251d|gecrj9c|h2brj9c|hgbk6aj7f53bba|hlcj6aya9esc7a|j6w193g|jxalpdlp|kgbechtv|kprw13d|kpry57d|lgbbat1ad8j|mgb9awbf|mgbaam7a8h|mgbayh7gpa|mgbbh1a71e|mgbc0a9azcg|mgberp4a5d4ar|mgbx4cd0ab|o3cw4h|ogbpf8fl|p1ai|pgbs0dh|s9brj9c|wgbh1c|wgbl6a|xkc2al3hye2a|xkc2dl3a5ee0h|yfro4i67o|ygbi2ammx|zckzah)|சிங்கப்பூர்|испытание|السعودية|பரிட்சை|இந்தியா|परीक्षा|الجزائر|آزمایشی|இலங்கை|مليسيا|فلسطين|امارات|المغرب|الاردن|إختبار|δοκιμή|travel|museum|భారత్|سورية|بھارت|ලංකා|ભારત|ਭਾਰਤ|ভারত|भारत|عمان|تونس|טעסט|post|name|mobi|jobs|info|coop|asia|arpa|aero|테스트|新加坡|テスト|ไทย|مصر|قطر|қаз|срб|xxx|tel|pro|org|net|mil|int|gov|edu|com|cat|biz|한국|香港|測試|测试|台灣|台湾|中國|中国|рф|z[amw]|y[et]|w[fs]|v[aceginu]|u[agksyz]|t[cdfghjklmnoprtvwz]|s[abcdeghijklmnortuvxyz]|r[eosuw]|qa|p[aefghklmnrstwy]|om|n[acefgilopruz]|m[acdeghklmnopqrstuvwxyz]|l[abcikrstuvy]|k[eghimnprwyz]|j[emop]|i[delmnoqrst]|h[kmnrtu]|g[abdefghilmnpqrstuwy]|f[ijkmor]|e[cegrstu]|d[ejkmoz]|c[acdfghiklmnoruvwxyz]|b[abdefghijmnorstvwyz]|a[cdefgilmnoqrstuwxz])/i,domainPart:/[a-z0-9](?:[\-a-z0-9]*[a-z0-9])?/i,port:/\d{1,5}/,localpart:/[a-z0-9!#$%&'*+\/=?\^_`{|}~\-]+(?:\.[a-z0-9!#$%&'*+\/=?\^_`{|}~\-]+)*/i,user:/[^:@\/]+/i,uuid:/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/i,lowerCaseUuid:/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/,upperCaseUuid:/[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}/,password:/[^@\/]+?/i,pathname:/[\w\-\.~%!$&'\(\)*+,;=:@\/]*/,search:/[\w\-\.~%!$&'\(\)*+,;=:@\/?]*/,hash:/[\w\-\.~%!$&'\(\)*+,;=:@\/?#]*/,ipv4:new RegExp("(?:"+t+"\\.){3}"+t)},i;r.domain=new RegExp(r.domainPart.source+"\\."+r.tld.source,"i"),r.subdomain=new RegExp("(?:"+r.domainPart.source+"\\.)*"+r.domain.source,"i"),r.email=new RegExp(r.localpart.source+"@"+r.subdomain.source,"i"),r.mailtoUrl=new RegExp("mailto:"+r.email.source,"i"),r.pathnameSearchHash=new RegExp(e("(?:/",r.pathname,"(?:\\?",r.search,")?","(?:#",r.hash,")?",")?")),r.httpUrl=s(/https?/),r.ftpUrl=s(/ftp/),r.url=r.httpUrl;for(i in r)r.hasOwnProperty(i)&&(n[i]=new RegExp("^"+r[i].source+"$","i"),n.functions[i]=function(e){return function(t){return n[e].test(t)}}(i));return n.fragments=r,n});
(function(e,t){typeof exports=="object"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e.one=e.one||{},e.one.validation=t())})(this,function(){"use strict";function e(){var e="",t=0;for(;t<arguments.length;t+=1)Object.prototype.toString.call(arguments[t])==="[object RegExp]"?e+=arguments[t].source:e+=arguments[t];return e}function s(t,n){return new RegExp(e(t,"://","(?:",r.user,"(?::",r.password,")?@",")?","(?:",n?r.subdomainRelaxed:r.subdomain,"|",r.ipv4,")","(?::",r.port,")?",r.pathnameSearchHash),"i")}var t=/([0-9]|1?[0-9][0-9]|2[0-4][0-9]|25[0-5])/.source,n={functions:{}},r={tld:/(?:xn--(?:0zwm56d|11b5bs3a9aj6g|3e0b707e|45brj9c|80akhbyknj4f|80ao21a|90a3ac|9t4b11yi5a|clchc0ea0b2g2a9gcd|deba0ad|fiqs8s|fiqz9s|fpcrj9c3d|fzc2c9e2c|g6w251d|gecrj9c|h2brj9c|hgbk6aj7f53bba|hlcj6aya9esc7a|j6w193g|jxalpdlp|kgbechtv|kprw13d|kpry57d|lgbbat1ad8j|mgb9awbf|mgbaam7a8h|mgbayh7gpa|mgbbh1a71e|mgbc0a9azcg|mgberp4a5d4ar|mgbx4cd0ab|o3cw4h|ogbpf8fl|p1ai|pgbs0dh|s9brj9c|wgbh1c|wgbl6a|xkc2al3hye2a|xkc2dl3a5ee0h|yfro4i67o|ygbi2ammx|zckzah)|சிங்கப்பூர்|испытание|السعودية|பரிட்சை|இந்தியா|परीक्षा|الجزائر|آزمایشی|இலங்கை|مليسيا|فلسطين|امارات|المغرب|الاردن|إختبار|δοκιμή|travel|museum|భారత్|سورية|بھارت|ලංකා|ભારત|ਭਾਰਤ|ভারত|भारत|عمان|تونس|טעסט|post|name|mobi|jobs|info|coop|asia|arpa|aero|테스트|新加坡|テスト|ไทย|مصر|قطر|қаз|срб|xxx|tel|pro|org|net|mil|int|gov|edu|com|cat|biz|한국|香港|測試|测试|台灣|台湾|中國|中国|рф|z[amw]|y[et]|w[fs]|v[aceginu]|u[agksyz]|t[cdfghjklmnoprtvwz]|s[abcdeghijklmnortuvxyz]|r[eosuw]|qa|p[aefghklmnrstwy]|om|n[acefgilopruz]|m[acdeghklmnopqrstuvwxyz]|l[abcikrstuvy]|k[eghimnprwyz]|j[emop]|i[delmnoqrst]|h[kmnrtu]|g[abdefghilmnpqrstuwy]|f[ijkmor]|e[cegrstu]|d[ejkmoz]|c[acdfghiklmnoruvwxyz]|b[abdefghijmnorstvwyz]|a[cdefgilmnoqrstuwxz])/i,domainPart:/[a-z0-9](?:[\-a-z0-9]*[a-z0-9])?/i,port:/\d{1,5}/,localpart:/[a-z0-9!#$%&'*+\/=?\^_`{|}~\-]+(?:\.[a-z0-9!#$%&'*+\/=?\^_`{|}~\-]+)*/i,user:/[^:@\/]+/i,uuid:/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/i,lowerCaseUuid:/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/,upperCaseUuid:/[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}/,password:/[^@\/]+?/i,pathname:/[\w\-\.~%!$&'\(\)*+,;=:@\/]*/,search:/[\w\-\.~%!$&'\(\)*+,;=:@\/?]*/,hash:/[\w\-\.~%!$&'\(\)*+,;=:@\/?#]*/,ipv4:new RegExp("(?:"+t+"\\.){3}"+t)},i;r.domain=new RegExp(r.domainPart.source+"\\."+r.tld.source,"i"),r.subdomain=new RegExp("(?:"+r.domainPart.source+"\\.)*"+r.domain.source,"i"),r.subdomainRelaxed=new RegExp("(?:"+r.domainPart.source+"\\.)+"+r.domainPart.source,"i"),r.email=new RegExp(r.localpart.source+"@"+r.subdomain.source,"i"),r.emailRelaxed=new RegExp(r.localpart.source+"@"+r.subdomainRelaxed.source,"i"),r.mailtoUrl=new RegExp("mailto:"+r.email.source,"i"),r.mailtoUrlRelaxed=new RegExp("mailto:"+r.emailRelaxed.source,"i"),r.pathnameSearchHash=new RegExp(e("(?:/",r.pathname,"(?:\\?",r.search,")?","(?:#",r.hash,")?",")?")),r.httpUrl=s(/https?/),r.httpUrlRelaxed=s(/https?/,!0),r.ftpUrl=s(/ftp/),r.ftpUrlRelaxed=s(/ftp/,!0),r.url=r.httpUrl;for(i in r)r.hasOwnProperty(i)&&(n[i]=new RegExp("^"+r[i].source+"$","i"),n.functions[i]=function(e){return function(t){return n[e].test(t)}}(i));return n.fragments=r,n});

Sorry, the diff of this file is not supported yet

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