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

is-uri

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-uri - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

2

bower.json

@@ -5,3 +5,3 @@ {

"homepage": "https://github.com/Kikobeats/is-uri",
"version": "1.1.0",
"version": "1.2.0",
"main": "./dist/is-uri.js",

@@ -8,0 +8,0 @@ "authors": [

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

<a name="1.2.0"></a>
# 1.2.0 (2016-02-09)
* Support provide a URI Object ([81892ec](https://github.com/kikobeats/is-uri/commit/81892ec))
<a name="1.1.0"></a>

@@ -6,2 +14,3 @@ # 1.1.0 (2016-02-09)

* Improve ([0373dee](https://github.com/kikobeats/is-uri/commit/0373dee))
* Release 1.1.0 ([9b7cb6e](https://github.com/kikobeats/is-uri/commit/9b7cb6e))

@@ -8,0 +17,0 @@

/**
* is-uri - Determinate if a string is a valid URI.
* @version v1.1.0
* @version v1.2.0
* @link https://github.com/Kikobeats/is-uri
* @license MIT
*/require=function r(e,t,o){function n(i,s){if(!t[i]){if(!e[i]){var a="function"==typeof require&&require;if(!s&&a)return a(i,!0);if(u)return u(i,!0);var f=new Error("Cannot find module '"+i+"'");throw f.code="MODULE_NOT_FOUND",f}var c=t[i]={exports:{}};e[i][0].call(c.exports,function(r){var t=e[i][1][r];return n(t?t:r)},c,c.exports,r,e,t,o)}return t[i].exports}for(var u="function"==typeof require&&require,i=0;i<o.length;i++)n(o[i]);return n}({1:[function(r,e,t){"use strict";e.exports=function(r,e){e=e||{};for(var t={key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},o=t.parser[e.strictMode?"strict":"loose"].exec(r),n={},u=14;u--;)n[t.key[u]]=o[u]||"";return n[t.q.name]={},n[t.key[12]].replace(t.q.parser,function(r,e,o){e&&(n[t.q.name][e]=o)}),n}},{}],2:[function(r,e,t){"use strict";var o=r("./ucs2/decode"),n=r("./lib/adapt"),u=String.fromCharCode,i=Math.floor,s=2147483647,a=36,f="-",c=72,p=128,d=1,h=26,l=function(r,e){return r+22+75*(26>r)-((0!==e)<<5)};e.exports=function(r){var e,t,v,y,w,q,g,x,C,m,O,E,M,$,k,z=[];for(r=o(r),E=r.length,e=p,t=0,w=c,q=0;E>q;++q)O=r[q],128>O&&z.push(u(O));for(v=y=z.length,y&&z.push(f);E>v;){for(g=s,q=0;E>q;++q)O=r[q],O>=e&&g>O&&(g=O);if(M=v+1,g-e>i((s-t)/M))throw new RangeError("Overflow: input needs wider integers to process");for(t+=(g-e)*M,e=g,q=0;E>q;++q){if(O=r[q],e>O&&++t>s)throw new RangeError("Overflow: input needs wider integers to process");if(O===e){for(x=t,C=a;!0&&(m=w>=C?d:C>=w+h?h:C-w,!(m>x));C+=a)k=x-m,$=a-m,z.push(u(l(m+k%$,0))),x=i(k/$);z.push(u(l(x,0))),w=n(t,M,v===y),t=0,++v}}++t,++e}return z.join("")}},{"./lib/adapt":3,"./ucs2/decode":4}],3:[function(r,e,t){"use strict";var o=Math.floor,n=36,u=1,i=26,s=700,a=38,f=n-u;e.exports=function(r,e,t){var u=0;for(r=t?o(r/s):r>>1,r+=o(r/e),u=0;r>f*i>>1;u+=n)r=o(r/f);return o(u+(f+1)*r/(r+a))}},{}],4:[function(r,e,t){"use strict";e.exports=function(r){for(var e,t,o=[],n=0,u=r.length;u>n;)e=r.charCodeAt(n++),e>=55296&&56319>=e&&u>n?(t=r.charCodeAt(n++),56320===(64512&t)?o.push(((1023&e)<<10)+(1023&t)+65536):(o.push(e),n--)):o.push(e);return o}},{}],"is-uri":[function(r,e,t){"use strict";var o=r("parse-uri"),n=r("punycode2/encode"),u=/[^a-z0-9\:\/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=\.\-\_\~\%]/i,i=/%[^0-9a-f]/i,s=/%[0-9a-f](:?[^0-9a-f]|$)/i,a=/^[a-z][a-z0-9\+\-\.]*$/,f=/^\/\//;e.exports=function(r,e){if(!r)return!1;if(r=n(r),u.test(r))return!1;if(i.test(r)||s.test(r))return!1;var t=o(r,e);return Boolean(t.protocol)&&a.test(t.protocol.toLowerCase())?!Boolean(t.authority)&&f.test(t.path)?!1:!0:!1}},{"parse-uri":1,"punycode2/encode":2}]},{},[]);
*/require=function r(e,t,o){function n(i,s){if(!t[i]){if(!e[i]){var f="function"==typeof require&&require;if(!s&&f)return f(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var c=t[i]={exports:{}};e[i][0].call(c.exports,function(r){var t=e[i][1][r];return n(t?t:r)},c,c.exports,r,e,t,o)}return t[i].exports}for(var u="function"==typeof require&&require,i=0;i<o.length;i++)n(o[i]);return n}({1:[function(r,e,t){"use strict";e.exports=function(r,e){e=e||{};for(var t={key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},o=t.parser[e.strictMode?"strict":"loose"].exec(r),n={},u=14;u--;)n[t.key[u]]=o[u]||"";return n[t.q.name]={},n[t.key[12]].replace(t.q.parser,function(r,e,o){e&&(n[t.q.name][e]=o)}),n}},{}],2:[function(r,e,t){"use strict";var o=r("./ucs2/decode"),n=r("./lib/adapt"),u=String.fromCharCode,i=Math.floor,s=2147483647,f=36,a="-",c=72,p=128,d=1,h=26,l=function(r,e){return r+22+75*(26>r)-((0!==e)<<5)};e.exports=function(r){var e,t,v,y,w,q,g,x,C,m,O,E,M,$,b,k=[];for(r=o(r),E=r.length,e=p,t=0,w=c,q=0;E>q;++q)O=r[q],128>O&&k.push(u(O));for(v=y=k.length,y&&k.push(a);E>v;){for(g=s,q=0;E>q;++q)O=r[q],O>=e&&g>O&&(g=O);if(M=v+1,g-e>i((s-t)/M))throw new RangeError("Overflow: input needs wider integers to process");for(t+=(g-e)*M,e=g,q=0;E>q;++q){if(O=r[q],e>O&&++t>s)throw new RangeError("Overflow: input needs wider integers to process");if(O===e){for(x=t,C=f;!0&&(m=w>=C?d:C>=w+h?h:C-w,!(m>x));C+=f)b=x-m,$=f-m,k.push(u(l(m+b%$,0))),x=i(b/$);k.push(u(l(x,0))),w=n(t,M,v===y),t=0,++v}}++t,++e}return k.join("")}},{"./lib/adapt":3,"./ucs2/decode":4}],3:[function(r,e,t){"use strict";var o=Math.floor,n=36,u=1,i=26,s=700,f=38,a=n-u;e.exports=function(r,e,t){var u=0;for(r=t?o(r/s):r>>1,r+=o(r/e),u=0;r>a*i>>1;u+=n)r=o(r/a);return o(u+(a+1)*r/(r+f))}},{}],4:[function(r,e,t){"use strict";e.exports=function(r){for(var e,t,o=[],n=0,u=r.length;u>n;)e=r.charCodeAt(n++),e>=55296&&56319>=e&&u>n?(t=r.charCodeAt(n++),56320===(64512&t)?o.push(((1023&e)<<10)+(1023&t)+65536):(o.push(e),n--)):o.push(e);return o}},{}],"is-uri":[function(r,e,t){"use strict";var o=r("parse-uri"),n=r("punycode2/encode"),u=/[^a-z0-9\:\/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=\.\-\_\~\%]/i,i=/%[^0-9a-f]/i,s=/%[0-9a-f](:?[^0-9a-f]|$)/i,f=/^[a-z][a-z0-9\+\-\.]*$/,a=/^\/\//;e.exports=function(r,e){if(!r)return!1;if("object"!=typeof r){if(r=n(r),u.test(r))return!1;if(i.test(r)||s.test(r))return!1;r=o(r,e)}return r.protocol&&f.test(r.protocol.toLowerCase())?!r.authority&&a.test(r.path)?!1:!0:!1}},{"parse-uri":1,"punycode2/encode":2}]},{},[]);

@@ -19,16 +19,16 @@ 'use strict'

module.exports = function isURI (str, opts) {
if (!str) return false
module.exports = function isURI (uri, opts) {
if (!uri) return false
str = encode(str)
if (typeof uri !== 'object') {
uri = encode(uri)
if (ILLEGALS.test(uri)) return false
if (HEX1.test(uri) || HEX2.test(uri)) return false
uri = parseURI(uri, opts)
}
if (ILLEGALS.test(str)) return false
if (HEX1.test(str) || HEX2.test(str)) return false
if (!uri.protocol || !PROTOCOL.test(uri.protocol.toLowerCase())) return false
if (!uri.authority && PATH.test(uri.path)) return false
var uri = parseURI(str, opts)
if (!Boolean(uri.protocol) || !PROTOCOL.test(uri.protocol.toLowerCase())) return false
if (!Boolean(uri.authority) && PATH.test(uri.path)) return false
return true
}

@@ -5,3 +5,3 @@ {

"homepage": "https://github.com/Kikobeats/is-uri",
"version": "1.1.0",
"version": "1.2.0",
"main": "./index.js",

@@ -8,0 +8,0 @@ "author": {

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