@apimediaru/history.js
v1.0.1
Published
---
Downloads
10
Readme
History.js
API
pushState(url?: string, replace?: boolean)
To push history state.
replaceState(url?: string)
To replace history state.
add(key: string, value: string, replace?: boolean)
To add a pair of key => value
to query.
remove(key: string, replace?: boolean)
To remove the param from query.
getHash(path?: string)
Get current hash.
pushHash(path: string)
To add hash to current path and push to history.
replaceHash(path: string)
To add hash to current path and replace in history.
has(key: string)
Check query param is set.
get(key: string)
Returns value for query param with given name.
all()
Get all query vars as object