1.2.6 • Published 4 years ago
hearth-url-cleaner-and-hasher v1.2.6
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')