Skip to content
This repository has been archived by the owner. It is now read-only.
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
src
.npmrc
README.md
package.json

README.md

@wordpress/url

A collection of utilities to manipulate URLs

Installation

Install the module

npm install @wordpress/url --save

Usage

importaddQueryArgs, prependHTTP } 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

// Prepends 'http://' to URLs that are probably mean to have them
const actualUrl = prependHTTP( 'wordpress.org' ); // http://wordpress.org



Code is Poetry.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.