url-buddy

1.0.0 • Public • Published

url-buddy

Build Status codecov.io npm version Twitter Follow

forthebadge forthebadge

Install

λ yarn add url-buddy

Usage

import urlBuddy from 'url-buddy'

const parsedUrl = urlBuddy('https://github.com:32199/users/iggy#foo?bar=baz#qux')

parsedUrl.hash     // 'foo'
parsedUrl.host     // 'github.com:32199'
parsedUrl.hostname // 'github.com'
parsedUrl.pathname // '/users/iggy'
parsedUrl.port     // '32199'
parsedUrl.protocol // 'https'
parsedUrl.query    // { bar: 'baz', qux: true }
parsedUrl.url      // 'https://github.com:32199/users/iggy#foo?bar=baz#qux'
parsedUrl.valid    // true

License

MIT © rpunkfu

Readme

Keywords

none

Package Sidebar

Install

npm i url-buddy

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • rpunkfu