-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
URL: Adding a README for the URL Package
- Loading branch information
1 parent
a80a4df
commit b9961a4
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# WordPress URL Package | ||
|
||
A collection of utilities to manipulate URLs | ||
|
||
## Installation | ||
|
||
Install the module | ||
|
||
```bash | ||
npm install @wordpress/url --save | ||
``` | ||
|
||
## Usage | ||
|
||
```JS | ||
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 | ||
``` |