Skip to content

Latest commit

 

History

History
44 lines (33 loc) · 1.43 KB

README.md

File metadata and controls

44 lines (33 loc) · 1.43 KB

next-url-watcher

Observe url changes for next.

version license size download

installation

npm install -S @jswork/next-url-watcher

apis

api params description
init ({ interval, immediate }) Initial a nx class.
watch callback Watch url change.

usage

import NxUrlWatcher from '@jswork/next-url-watcher';

const wather = new NxUrlWatcher({ immediate: true });

wather.watch((old, current) => {
  console.log(old, current);
});

license

Code released under the MIT license.