1.0.0 • Published 5 months ago

@burnsred/toolkit v1.0.0

Weekly downloads
-
License
UNLICENSED
Repository
bitbucket
Last release
5 months ago

BurnsRED Toolkit

querystring

Utilities for parsing querystrings into objects, and serialising them back.

Internally it depends on URLSearchParams

querystring.stringify will turn an object into a querystring, automatically handling Array values as repeats, and skipping null values.

querystring.parse will turn a string into an object, coalescing repeated keys into Arrays.

useQueryParams

A hook to parse the querystring from react-router, using the querystring library.

This differs from react-router's useSearchParams in that it returns a coalesced object, not a UrlSearchParams instance.

1.0.0

5 months ago