Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 593 Bytes

README.md

File metadata and controls

36 lines (24 loc) · 593 Bytes

parsewe-url

A simple url parser.

Installation

NPM:

npm install parwese-url

Yarn:

yarn add parwese-url

Usage

Import the package.

import parseUrl from 'parsewe-url';

The queries extracted after the ?, split at the &, and query values are extracted after the =.

Example:

// url: 'https://localhost:9000/profile?fields=media,id,profile_photo&auth_token=35Df&8g_W4&redirect=/nextpage' 

queries = parseUrl(); 
console.log(queries); 
// {fields: 'media,id,profile_photo', auth_token: '35Df&8g_W4', redirect: '/nextpage'}