Socket
Socket
Sign inDemoInstall

iso-url

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iso-url - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

6

changelog.md

@@ -1,4 +0,8 @@

## 0.0.1 (2018-12-06)
## [0.0.2](https://github.com/hugomrdias/iso-url/compare/v0.0.1...v0.0.2) (2018-12-06)
## [0.0.1](https://github.com/hugomrdias/iso-url/compare/cc522d6...v0.0.1) (2018-12-06)
### Features

@@ -5,0 +9,0 @@

2

package.json
{
"name": "iso-url",
"version": "0.0.1",
"version": "0.0.2",
"description": "Isomorphic/Universal WHATWG URL API with some support legacy node URL API",

@@ -5,0 +5,0 @@ "repository": "hugomrdias/iso-url",

@@ -5,2 +5,3 @@ # iso-url [![NPM Version](https://img.shields.io/npm/v/iso-url.svg)](https://www.npmjs.com/package/iso-url) [![NPM Downloads](https://img.shields.io/npm/dt/iso-url.svg)](https://www.npmjs.com/package/iso-url) [![NPM License](https://img.shields.io/npm/l/iso-url.svg)](https://www.npmjs.com/package/iso-url) [![Build Status](https://travis-ci.org/hugomrdias/iso-url.svg?branch=master)](https://travis-ci.org/hugomrdias/iso-url) [![codecov](https://codecov.io/gh/hugomrdias/iso-url/badge.svg?branch=master)](https://codecov.io/gh/hugomrdias/iso-url?branch=master)

This package is a universal wrapper for node `url` and browser window.URL with support for legacy `url.parse` properties in the URL instance and defaults for base to support relative urls like `url.parse`. Node URL [docs](https://nodejs.org/docs/latest-v10.x/api/url.html#url_the_whatwg_url_api).

@@ -13,16 +14,14 @@ ## Install

## Usage
```js
const isoUrl = require('iso-url');
const { URL, URLSearchParams } = require('iso-url');
isoUrl('unicorns');
//=> 'unicorns & rainbows'
const url = new isoUrl('http://localhost/unicorns');
const newSearchParams = new URLSearchParams(url.searchParams);
```
## API
### isoUrl(input, [options])
### isoUrl(url, [base])

@@ -33,16 +32,13 @@ #### input

Lorem ipsum.
The absolute or relative input URL to parse. If input is relative, then base is required. If input is absolute, the base is ignored.
#### options
#### base
##### foo
Type: `string|URL`
Default: `https://localhost` in node and `self.location.protocol + '//' + self.location.host` in the browser.
Type: `boolean`<br>
Default: `false`
The base URL to resolve against if the input is not absolute.
Lorem ipsum.
## License
MIT © [Hugo Dias](http://hugodias.me)
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