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.1.2 to 0.2.0

2

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

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

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

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

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

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

@@ -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.1.2</td>
<td><b>Version</b></td><td>0.2.0</td>
</tr>

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

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

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

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

/*! lil-uri - v0.1.2 - MIT License - https://github.com/lil-js/uri */
/*! lil-uri - v0.2.0 - MIT License - https://github.com/lil-js/uri */
(function (root, factory) {

@@ -15,3 +15,3 @@ if (typeof define === 'function' && define.amd) {

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

@@ -78,3 +78,3 @@

}
URI.prototype.protocol = function (host) {

@@ -178,3 +178,3 @@ return accessor('protocol').call(this, host)

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

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

/*! lil-uri - v0.1.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.1.2";var e=/^(?:([^:\/?#]+):\/\/)?((?:([^\/?#@]*)@)?([^\/?#:]*)(?:\:(\d*))?)?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n)*))?/i;function o(t){return typeof t==="string"}function s(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 n(t){return function(r){if(r){this.parts[t]=o(r)?decodeURIComponent(r):r;return this}this.parts=this.parse(this.build());return this.parts[t]}}function i(t){this.uri=t||null;if(o(t)&&t.length){this.parts=this.parse(t)}else{this.parts={}}}i.prototype.parse=function(t){var r=decodeURIComponent(t||"").match(e);var o=(r[3]||"").split(":");var n=o.length?(r[2]||"").replace(/(.*\@)/,""):r[2];return{uri:r[0],protocol:r[1],host:n,hostname:r[4],port:r[5],auth:r[3],user:o[0],password:o[1],path:r[6],search:r[7],query:s(r[7]),hash:r[8]}};i.prototype.protocol=function(t){return n("protocol").call(this,t)};i.prototype.host=function(t){return n("host").call(this,t)};i.prototype.hostname=function(t){return n("hostname").call(this,t)};i.prototype.port=function(t){return n("port").call(this,t)};i.prototype.auth=function(t){return n("host").call(this,t)};i.prototype.user=function(t){return n("user").call(this,t)};i.prototype.password=function(t){return n("password").call(this,t)};i.prototype.path=function(t){return n("path").call(this,t)};i.prototype.search=function(t){return n("search").call(this,t)};i.prototype.query=function(t){return t&&typeof t==="object"?n("query").call(this,t):this.parts.query};i.prototype.hash=function(t){return n("hash").call(this,t)};i.prototype.get=function(t){return this.parts[t]||""};i.prototype.build=i.prototype.toString=i.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 i(t)}function u(t){return typeof t==="string"&&e.test(t)}p.VERSION=r;p.is=p.isURL=u;p.URI=i;t.uri=p});
//# sourceMappingURL=http://cdn.rawgit.com/lil-js/uri/0.1.2/uri.min.js.map
/*! 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){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 n(t){return function(r){if(r){this.parts[t]=o(r)?decodeURIComponent(r):r;return this}this.parts=this.parse(this.build());return this.parts[t]}}function i(t){this.uri=t||null;if(o(t)&&t.length){this.parts=this.parse(t)}else{this.parts={}}}i.prototype.parse=function(t){var r=decodeURIComponent(t||"").match(e);var o=(r[3]||"").split(":");var n=o.length?(r[2]||"").replace(/(.*\@)/,""):r[2];return{uri:r[0],protocol:r[1],host:n,hostname:r[4],port:r[5],auth:r[3],user:o[0],password:o[1],path:r[6],search:r[7],query:s(r[7]),hash:r[8]}};i.prototype.protocol=function(t){return n("protocol").call(this,t)};i.prototype.host=function(t){return n("host").call(this,t)};i.prototype.hostname=function(t){return n("hostname").call(this,t)};i.prototype.port=function(t){return n("port").call(this,t)};i.prototype.auth=function(t){return n("host").call(this,t)};i.prototype.user=function(t){return n("user").call(this,t)};i.prototype.password=function(t){return n("password").call(this,t)};i.prototype.path=function(t){return n("path").call(this,t)};i.prototype.search=function(t){return n("search").call(this,t)};i.prototype.query=function(t){return t&&typeof t==="object"?n("query").call(this,t):this.parts.query};i.prototype.hash=function(t){return n("hash").call(this,t)};i.prototype.get=function(t){return this.parts[t]||""};i.prototype.build=i.prototype.toString=i.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 i(t)}function u(t){return typeof t==="string"&&e.test(t)}p.VERSION=r;p.is=p.isURL=u;p.URI=i;return t.uri=p});
//# sourceMappingURL=http://cdn.rawgit.com/lil-js/uri/0.2.0/uri.min.js.map

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