1.0.5 • Published 7 years ago

parse-location v1.0.5

Weekly downloads
1,449
License
MIT
Repository
github
Last release
7 years ago

Parse Location

Creates browser-esque location objects.

Installation

$ yarn add parse-location

Usage

import parseLocation from 'parse-location'

const location = parseLocation('http://localhost:3000/foo?bar=bar#baz')
// {
//   host: 'localhost'
//   hostname: 'localhost:3000'
//   href: 'http://localhost:3000/foo?bar=bar#baz'
//   pathname: '/foo',
//   query: { bar: 'bar' },
//   search: '?bar=bar',
//   hash: '#baz',
//   port: '3000',
//   protocol: 'http:',
// }

License

MIT

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago