Skip to content
This repository has been archived by the owner on May 1, 2021. It is now read-only.

Releases: pbeshai/serialize-query-params

v1.3.1

20 Feb 16:20
Compare
Choose a tag to compare
  • Fixes #38 where a query object would cause staleness issues with react router

v1.3.0

15 Dec 15:37
Compare
Choose a tag to compare
  • Adds createEnumParam to allow only specified string values to be decoded #36

v1.2.4

20 Oct 00:22
Compare
Choose a tag to compare
  • Only performs the query-string version check in dev when require is a defined function #34

v1.2.3

17 Sep 19:00
Compare
Choose a tag to compare
  • Addresses #32 by throwing an exception if required peer dependency query-string is the wrong version

v1.2.2

26 Aug 17:23
Compare
Choose a tag to compare
  • Fixes #30 - decodeQueryParams now iterates over all parameters in the config and in the encoded URL.

v1.2.1

17 Jun 18:53
Compare
Choose a tag to compare
  • Fixes bug where withDefault drops equals property of a parameter #25

v1.2.0

06 May 18:26
Compare
Choose a tag to compare
  • Adds in optional equals method on parameters #24

v1.1.0

17 Apr 18:12
Compare
Choose a tag to compare
  • Adds support for passing options to query-string stringify

v1.0.0

16 Apr 23:11
Compare
Choose a tag to compare
  • breaking Changes the way empty string/null/undefined values are handled #20. Now null and empty strings are kept. Invalid values will either be null or NaN depending on type (previously became undefined). This allows more direct mapping of query parameter values to what we get in the code and the following cases: ?foo ?foo=.

  • Adds a withDefault() function #21 that wraps parameters to provide a default value with correct types. e.g. if you want the old behavior where null becomes undefined, you can do withDefault(ArrayParam, undefined) or if you just want to set the default value of a parameter, you set it as the second argument. withDefault(ArrayParam, []). If you do not want nulls to be considered as undefined for the purposes of populating a default value, pass false as the third argument.

v0.3.0

10 Jan 22:20
Compare
Choose a tag to compare
  • Enables empty strings as values in objects. Previously these values got deserialized as undefined. #13