Serialize Query Params Versions Save

A javascript library for simplifying encoding and decoding URL query parameters

v1.3.1

3 years ago
  • Fixes #38 where a query object would cause staleness issues with react router

v1.3.0

3 years ago
  • Adds createEnumParam to allow only specified string values to be decoded #36

v1.2.4

3 years ago
  • Only performs the query-string version check in dev when require is a defined function #34

v1.2.3

3 years ago
  • Addresses #32 by throwing an exception if required peer dependency query-string is the wrong version

v1.2.2

3 years ago
  • Fixes #30 - decodeQueryParams now iterates over all parameters in the config and in the encoded URL.

v1.2.1

3 years ago
  • Fixes bug where withDefault drops equals property of a parameter #25

v1.2.0

4 years ago
  • Adds in optional equals method on parameters #24

v1.1.0

4 years ago
  • Adds support for passing options to query-string stringify

v1.0.0

4 years ago
  • 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

4 years ago
  • Enables empty strings as values in objects. Previously these values got deserialized as undefined. #13