@ar.io/sdk 3.23.0-alpha.3 → 3.23.0-alpha.4
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.
- package/lib/cjs/cli/utils.js +8 -2
- package/lib/cjs/version.js +1 -1
- package/lib/esm/cli/utils.js +8 -2
- package/lib/esm/version.js +1 -1
- package/lib/types/version.d.ts +1 -1
- package/package.json +1 -1
package/lib/cjs/cli/utils.js
CHANGED
|
@@ -296,10 +296,16 @@ function paginationParamsFromOptions(options) {
|
|
|
296
296
|
if (Array.isArray(filters)) {
|
|
297
297
|
// every odd value is a key, every even value is a value for that key
|
|
298
298
|
for (let i = 0; i < filters.length; i += 2) {
|
|
299
|
-
// convert any strings that are numbers to numbers
|
|
299
|
+
// convert any strings that are numbers to numbers and any 'true'/'false' to booleans
|
|
300
300
|
const value = filters[i + 1].split(',').map((v) => {
|
|
301
301
|
const num = +v;
|
|
302
|
-
|
|
302
|
+
if (!isNaN(num))
|
|
303
|
+
return num;
|
|
304
|
+
if (v === 'true')
|
|
305
|
+
return true;
|
|
306
|
+
if (v === 'false')
|
|
307
|
+
return false;
|
|
308
|
+
return v;
|
|
303
309
|
});
|
|
304
310
|
filtersObject[filters[i]] = value;
|
|
305
311
|
}
|
package/lib/cjs/version.js
CHANGED
package/lib/esm/cli/utils.js
CHANGED
|
@@ -242,10 +242,16 @@ export function paginationParamsFromOptions(options) {
|
|
|
242
242
|
if (Array.isArray(filters)) {
|
|
243
243
|
// every odd value is a key, every even value is a value for that key
|
|
244
244
|
for (let i = 0; i < filters.length; i += 2) {
|
|
245
|
-
// convert any strings that are numbers to numbers
|
|
245
|
+
// convert any strings that are numbers to numbers and any 'true'/'false' to booleans
|
|
246
246
|
const value = filters[i + 1].split(',').map((v) => {
|
|
247
247
|
const num = +v;
|
|
248
|
-
|
|
248
|
+
if (!isNaN(num))
|
|
249
|
+
return num;
|
|
250
|
+
if (v === 'true')
|
|
251
|
+
return true;
|
|
252
|
+
if (v === 'false')
|
|
253
|
+
return false;
|
|
254
|
+
return v;
|
|
249
255
|
});
|
|
250
256
|
filtersObject[filters[i]] = value;
|
|
251
257
|
}
|
package/lib/esm/version.js
CHANGED
package/lib/types/version.d.ts
CHANGED