location-changed

0.4.0 • Public • Published

Location Changed

Observe and programmatically change the browser's location

Installation

$ npm install --save location-changed
import locationChange from 'location-changed'

Example

import locationChange from 'location-changed'

// current route is '/hello'
const observable = locationChange((path) => {
  console.log(path) // -> /hello?name=Mark
})
observable.path = '/hello?name=Mark'

Attribution

Most of the heavy lifting is provided by libraries written by @sindresorhus and @WebReflection.

Readme

Keywords

none

Package Sidebar

Install

npm i location-changed

Weekly Downloads

5

Version

0.4.0

License

MIT

Unpacked Size

3.85 kB

Total Files

4

Last publish

Collaborators

  • mjstahl