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

lil-uri

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lil-uri - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

2

bower.json
{
"name": "lil-uri",
"description": "Tiny URI parser and builder with chainable API",
"version": "0.2.1",
"version": "0.2.2",
"license": "MIT",

@@ -6,0 +6,0 @@ "repository": "lil-js/uri",

{
"name": "lil-uri",
"description": "Tiny URI parser and builder",
"version": "0.2.1",
"version": "0.2.2",
"license": "MIT",

@@ -6,0 +6,0 @@ "repository": "lil-js/uri",

{
"name": "lil-uri",
"description": "Tiny URI parser and builder with chainable API",
"version": "0.2.1",
"version": "0.2.2",
"license": "MIT",

@@ -27,6 +27,4 @@ "repository": "lil-js/uri",

"mocha": "^1.21.3",
"mocha-phantomjs": "^3.4.1",
"phantomjs": "^1.9.7-9",
"uglify-js": "^2.4.15"
}
}

@@ -12,3 +12,3 @@ # [lil](http://lil-js.github.io)'-uri [![Build Status](https://api.travis-ci.org/lil-js/uri.svg?branch=master)][travis] [![Stories in Ready](https://badge.waffle.io/lil-js/uri.png?label=ready&title=Ready)](https://waffle.io/lil-js/uri) [![Code Climate](https://codeclimate.com/github/lil-js/uri/badges/gpa.svg)](https://codeclimate.com/github/lil-js/uri) [![Gitter chat](https://badges.gitter.im/lil-js/uri.png)](https://gitter.im/lil-js/uri)

<tr>
<td><b>Version</b></td><td>0.2.0</td>
<td><b>Version</b></td><td>0.2.2</td>
</tr>

@@ -50,3 +50,3 @@ <tr>

```html
<script src="//cdn.rawgit.com/lil-js/uri/0.2.0/uri.js"></script>
<script src="//cdn.rawgit.com/lil-js/uri/0.2.2/uri.js"></script>
```

@@ -53,0 +53,0 @@

/*! lil-uri - v0.2.0 - MIT License - https://github.com/lil-js/uri */
(function (root, factory) {
;(function (root, factory) {
if (typeof define === 'function' && define.amd) {

@@ -15,3 +15,4 @@ define(['exports'], factory)

'use strict'
var VERSION = '0.2.1'
var VERSION = '0.2.2'
var REGEX = /^(?:([^:\/?#]+):\/\/)?((?:([^\/?#@]*)@)?([^\/?#:]*)(?:\:(\d*))?)?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n)*))?/i

@@ -182,2 +183,2 @@

return exports.uri = uri
}))
}));

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

/*! lil-uri - v0.2.0 - MIT License - https://github.com/lil-js/uri */
(function(t,r){if(typeof define==="function"&&define.amd){define(["exports"],r)}else if(typeof exports==="object"){r(exports);if(typeof module==="object"&&module!==null){module.exports=exports=exports.uri}}else{r(t.lil=t.lil||{})}})(this,function(t){"use strict";var r="0.2.0";var e=/^(?:([^:\/?#]+):\/\/)?((?:([^\/?#@]*)@)?([^\/?#:]*)(?:\:(\d*))?)?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n)*))?/i;function o(t){return typeof t==="string"}function s(t){return decodeURIComponent(escape(t))}function n(t){var r={};if(typeof t==="string"){t.split("&").forEach(function(t){t=t.split("=");if(r.hasOwnProperty(t[0])){r[t[0]]=Array.isArray(r[t[0]])?r[t[0]]:[r[t[0]]];r[t[0]].push(t[1])}else{r[t[0]]=t[1]}});return r}}function i(t){return function(r){if(r){this.parts[t]=o(r)?s(r):r;return this}this.parts=this.parse(this.build());return this.parts[t]}}function u(t){this.uri=t||null;if(o(t)&&t.length){this.parts=this.parse(t)}else{this.parts={}}}u.prototype.parse=function(t){var r=s(t||"").match(e);var o=(r[3]||"").split(":");var i=o.length?(r[2]||"").replace(/(.*\@)/,""):r[2];return{uri:r[0],protocol:r[1],host:i,hostname:r[4],port:r[5],auth:r[3],user:o[0],password:o[1],path:r[6],search:r[7],query:n(r[7]),hash:r[8]}};u.prototype.protocol=function(t){return i("protocol").call(this,t)};u.prototype.host=function(t){return i("host").call(this,t)};u.prototype.hostname=function(t){return i("hostname").call(this,t)};u.prototype.port=function(t){return i("port").call(this,t)};u.prototype.auth=function(t){return i("host").call(this,t)};u.prototype.user=function(t){return i("user").call(this,t)};u.prototype.password=function(t){return i("password").call(this,t)};u.prototype.path=function(t){return i("path").call(this,t)};u.prototype.search=function(t){return i("search").call(this,t)};u.prototype.query=function(t){return t&&typeof t==="object"?i("query").call(this,t):this.parts.query};u.prototype.hash=function(t){return i("hash").call(this,t)};u.prototype.get=function(t){return this.parts[t]||""};u.prototype.build=u.prototype.toString=u.prototype.valueOf=function(){var t=this.parts,r=[];if(t.protocol)r.push(t.protocol+"://");if(t.auth)r.push(t.auth+"@");else if(t.user)r.push(t.user+(t.password?":"+t.password:"")+"@");if(t.host){r.push(t.host)}else{if(t.hostname)r.push(t.hostname);if(t.port)r.push(":"+t.port)}if(t.path)r.push(t.path);if(t.query&&typeof t.query==="object"){if(!t.path)r.push("/");r.push("?"+Object.keys(t.query).map(function(r){if(Array.isArray(t.query[r])){return t.query[r].map(function(t){return r+(t?"="+t:"")}).join("&")}else{return r+(t.query[r]?"="+t.query[r]:"")}}).join("&"))}else if(t.search){r.push("?"+t.search)}if(t.hash){if(!t.path)r.push("/");r.push("#"+t.hash)}return this.url=r.filter(function(t){return o(t)}).join("")};function p(t){return new u(t)}function h(t){return typeof t==="string"&&e.test(t)}p.VERSION=r;p.is=p.isURL=h;p.URI=u;return t.uri=p});
//# sourceMappingURL=http://cdn.rawgit.com/lil-js/uri/0.2.0/uri.min.js.map
/*! lil-uri - v0.2.2 - MIT License - https://github.com/lil-js/uri */
(function(t,r){if(typeof define==="function"&&define.amd){define(["exports"],r)}else if(typeof exports==="object"){r(exports);if(typeof module==="object"&&module!==null){module.exports=exports=exports.uri}}else{r(t.lil=t.lil||{})}})(this,function(t){"use strict";var r="0.2.2";var e=/^(?:([^:\/?#]+):\/\/)?((?:([^\/?#@]*)@)?([^\/?#:]*)(?:\:(\d*))?)?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n)*))?/i;function o(t){return typeof t==="string"}function s(t){return decodeURIComponent(escape(t))}function n(t){var r={};if(typeof t==="string"){t.split("&").forEach(function(t){t=t.split("=");if(r.hasOwnProperty(t[0])){r[t[0]]=Array.isArray(r[t[0]])?r[t[0]]:[r[t[0]]];r[t[0]].push(t[1])}else{r[t[0]]=t[1]}});return r}}function i(t){return function(r){if(r){this.parts[t]=o(r)?s(r):r;return this}this.parts=this.parse(this.build());return this.parts[t]}}function u(t){this.uri=t||null;if(o(t)&&t.length){this.parts=this.parse(t)}else{this.parts={}}}u.prototype.parse=function(t){var r=s(t||"").match(e);var o=(r[3]||"").split(":");var i=o.length?(r[2]||"").replace(/(.*\@)/,""):r[2];return{uri:r[0],protocol:r[1],host:i,hostname:r[4],port:r[5],auth:r[3],user:o[0],password:o[1],path:r[6],search:r[7],query:n(r[7]),hash:r[8]}};u.prototype.protocol=function(t){return i("protocol").call(this,t)};u.prototype.host=function(t){return i("host").call(this,t)};u.prototype.hostname=function(t){return i("hostname").call(this,t)};u.prototype.port=function(t){return i("port").call(this,t)};u.prototype.auth=function(t){return i("host").call(this,t)};u.prototype.user=function(t){return i("user").call(this,t)};u.prototype.password=function(t){return i("password").call(this,t)};u.prototype.path=function(t){return i("path").call(this,t)};u.prototype.search=function(t){return i("search").call(this,t)};u.prototype.query=function(t){return t&&typeof t==="object"?i("query").call(this,t):this.parts.query};u.prototype.hash=function(t){return i("hash").call(this,t)};u.prototype.get=function(t){return this.parts[t]||""};u.prototype.build=u.prototype.toString=u.prototype.valueOf=function(){var t=this.parts,r=[];if(t.protocol)r.push(t.protocol+"://");if(t.auth)r.push(t.auth+"@");else if(t.user)r.push(t.user+(t.password?":"+t.password:"")+"@");if(t.host){r.push(t.host)}else{if(t.hostname)r.push(t.hostname);if(t.port)r.push(":"+t.port)}if(t.path)r.push(t.path);if(t.query&&typeof t.query==="object"){if(!t.path)r.push("/");r.push("?"+Object.keys(t.query).map(function(r){if(Array.isArray(t.query[r])){return t.query[r].map(function(t){return r+(t?"="+t:"")}).join("&")}else{return r+(t.query[r]?"="+t.query[r]:"")}}).join("&"))}else if(t.search){r.push("?"+t.search)}if(t.hash){if(!t.path)r.push("/");r.push("#"+t.hash)}return this.url=r.filter(function(t){return o(t)}).join("")};function p(t){return new u(t)}function h(t){return typeof t==="string"&&e.test(t)}p.VERSION=r;p.is=p.isURL=h;p.URI=u;return t.uri=p});
//# sourceMappingURL=uri.min.js.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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