incomplete-url
v5.0.0
Published
Custom-remove features of a URL implementation.
Readme
incomplete-url

Custom-remove features of a
URLimplementation.
This is useful when simulating the incomplete URL implementations available in some web browsers from 2017.
[!NOTE]
If you need to support older versions of Node.js (going back to
8.x), use4.xof this package.
Install
npm install incomplete-urlUsage
import customizeURL from '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.
