hearth-url-cleaner-and-hasher
v1.2.6
Published
## Usage
Downloads
6
Readme
hearth-url-cleaner-and-hasher
Usage
import * as urlCleaner from 'hearth-url-cleaner-and-hasher'
// To remove a query param from the URL
urlCleaner.removeQueryParam('https://abc.com?abc=abc&foo=bar', 'foo')
// To remove a query param from the URL and hash the URL at the same time
urlCleaner.removeQueryParam('https://abc.com?abc=abc&foo=bar', 'foo', {
returnedHashedUrl: true,
})
// To hash the URL only
urlCleaner.hashURL('https://abc.com?abc=abc&foo=bar')