@ethlete/query 4.4.2 → 4.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -107,4 +107,20 @@ export interface BuildQueryStringConfig {
107
107
  * @default false
108
108
  */
109
109
  writeArrayIndexes?: boolean;
110
+ /**
111
+ * A list of values that should be ignored when building the query string.
112
+ *
113
+ * Also have a look at `ignoredValuesFns`.
114
+ *
115
+ * @default [undefined, null, Infinity, -Infinity]
116
+ */
117
+ ignoredValues?: Array<unknown>;
118
+ /**
119
+ * A list of functions that should be used to determine whether a value should be ignored when building the query string.
120
+ *
121
+ * Also have a look at `ignoredValues`.
122
+ *
123
+ * @default [isNaN, isEmptyString]
124
+ */
125
+ ignoredValuesFns?: Array<(value: unknown) => boolean>;
110
126
  }
@@ -1,4 +1,6 @@
1
1
  import { BuildQueryStringConfig, Method, QueryParams, RequestError, RequestHeaders, RequestRetryFn } from './request.types';
2
+ export declare const isNaN: (value: unknown) => boolean;
3
+ export declare const isEmptyString: (value: unknown) => boolean;
2
4
  export declare const isRequestError: <T = unknown>(error: unknown) => error is RequestError<T>;
3
5
  export declare const buildRoute: (options: {
4
6
  base: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethlete/query",
3
- "version": "4.4.2",
3
+ "version": "4.5.0",
4
4
  "dependencies": {
5
5
  "tslib": "^2.5.0"
6
6
  },