incomplete-url

4.0.0 • Public • Published

incomplete-url NPM Version Build Status Coverage Status Dependency Monitor

Custom-remove features of a WHATWG URL implementation.

This is useful when simulating the incomplete URL implementations available in some of today's modern web browsers.

Installation

Node.js >= 8 is required. To install, type this at the command line:

npm install incomplete-url

Usage

const customizeURL = require('incomplete-url');
 
const options = {
  paramsExclusions: ['sort'],
  urlExclusions: ['origin']
};
 
const {IncompleteURL, IncompleteURLSearchParams} = customizeURL(options);
 
const url = new IncompleteURL('http://domain/');
const params = new IncompleteURLSearchParams('param=value');

Options

paramsExclusions

Type: Array
Default value: []
The output URLSearchParams class (and URL::searchParams) will not expose each listed property/method when instantiated.

urlExclusions

Type: Array
Default value: []
The output URL class will not expose each listed property/method when instantiated.

Readme

Keywords

Package Sidebar

Install

npm i incomplete-url

Weekly Downloads

7

Version

4.0.0

License

MIT

Unpacked Size

5.98 kB

Total Files

4

Last publish

Collaborators

  • stevenvachon