Package Exports
- @wordpress/url
- @wordpress/url/build-module
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@wordpress/url) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@wordpress/url
A collection of utilities to manipulate URLs
Installation
Install the module
npm install @wordpress/url --save
Usage
import { addQueryArgs } from '@wordpress/url';
// Appends arguments to the query string of a given url
const newUrl = addQueryArgs( 'https://google.com', { q: 'test' } ); // https://google.com/?q=test