next-frontend-helpers

Useful Functions


License
ISC
Install
npm install next-frontend-helpers@2.0.0

Documentation

Frontend Helpers

Available Functions

  • Remove all empty properties of an object
  • Transform OpenSearch Hits to an id array

Functions

Clear object

objectCleaner(obj).removeEmptyFields().removeUnderscoreFields().get()

Remove empty props

removeEmptyProps(obj)

Transform OpenSearch Hits to an id array

transformHits(searchHit)

Hooks

Update the URL without changing a state

useQueryString()

Control of URL parameters

useSearchRouter()