$ npm install 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.
npm install incomplete-url
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');
paramsExclusionsType: Array
Default value: []
The output URLSearchParams class (and URL::searchParams) will not expose each listed property/method when instantiated.
urlExclusionsType: Array
Default value: []
The output URL class will not expose each listed property/method when instantiated.
© 2010 - cnpmjs.org x YWFE | Home | YWFE