url-parser-lite

0.1.0 • Public • Published

url-parser-lite

URL Parser < 1kB (360 bytes) 🔥 for ALL JavaScript environments

Installation

yarn add url-parser-lite

or

npm i url-parser-lite

Usage

import URL from 'url-parser-lite';

const parsedURL = URL('https://username:pa$$w0rd@github.com/metagrover?repos=21#readme');

// returns
{
    protocol: "https"
    auth: "username:pa$$w0rd"
    host: "github.com"
    path: "/metagrover"
    hash: "readme"
    query: "repos=21"
}

Based on

This project is based on this stackoverflow answer with some added sauce 🍭

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    4,395
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    4,395

Package Sidebar

Install

npm i url-parser-lite

Weekly Downloads

4,395

Version

0.1.0

License

MIT

Last publish

Collaborators

  • metagrover