@searchspring/snap-toolbox 0.48.0 → 0.49.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.
- package/dist/cjs/charsParams/charsParams.d.ts +1 -1
- package/dist/cjs/charsParams/charsParams.d.ts.map +1 -1
- package/dist/cjs/charsParams/charsParams.js +7 -1
- package/dist/esm/charsParams/charsParams.d.ts +1 -1
- package/dist/esm/charsParams/charsParams.d.ts.map +1 -1
- package/dist/esm/charsParams/charsParams.js +7 -1
- package/package.json +2 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare type ParameterObject = Record<string, boolean | string | string[] | number | number[]>;
|
|
1
|
+
export declare type ParameterObject = Record<string, boolean | string | string[] | number | number[] | unknown>;
|
|
2
2
|
export declare function charsParams(params: ParameterObject): number;
|
|
3
3
|
//# sourceMappingURL=charsParams.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"charsParams.d.ts","sourceRoot":"","sources":["../../../src/charsParams/charsParams.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"charsParams.d.ts","sourceRoot":"","sources":["../../../src/charsParams/charsParams.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC,CAAC;AAExG,wBAAgB,WAAW,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM,CAwB3D"}
|
|
@@ -14,9 +14,15 @@ function charsParams(params) {
|
|
|
14
14
|
return length + keyLength + 1 + ('' + val).length;
|
|
15
15
|
}, 0));
|
|
16
16
|
}
|
|
17
|
-
else {
|
|
17
|
+
else if (typeof value == 'object') {
|
|
18
|
+
//recursive check
|
|
19
|
+
return count + keyLength + 1 + charsParams(value);
|
|
20
|
+
}
|
|
21
|
+
else if (typeof value == 'string' || typeof value == 'number') {
|
|
18
22
|
return count + keyLength + 1 + ('' + value).length;
|
|
19
23
|
}
|
|
24
|
+
else
|
|
25
|
+
return count + keyLength;
|
|
20
26
|
}, 1);
|
|
21
27
|
return count;
|
|
22
28
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare type ParameterObject = Record<string, boolean | string | string[] | number | number[]>;
|
|
1
|
+
export declare type ParameterObject = Record<string, boolean | string | string[] | number | number[] | unknown>;
|
|
2
2
|
export declare function charsParams(params: ParameterObject): number;
|
|
3
3
|
//# sourceMappingURL=charsParams.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"charsParams.d.ts","sourceRoot":"","sources":["../../../src/charsParams/charsParams.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"charsParams.d.ts","sourceRoot":"","sources":["../../../src/charsParams/charsParams.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC,CAAC;AAExG,wBAAgB,WAAW,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM,CAwB3D"}
|
|
@@ -11,9 +11,15 @@ export function charsParams(params) {
|
|
|
11
11
|
return length + keyLength + 1 + ('' + val).length;
|
|
12
12
|
}, 0));
|
|
13
13
|
}
|
|
14
|
-
else {
|
|
14
|
+
else if (typeof value == 'object') {
|
|
15
|
+
//recursive check
|
|
16
|
+
return count + keyLength + 1 + charsParams(value);
|
|
17
|
+
}
|
|
18
|
+
else if (typeof value == 'string' || typeof value == 'number') {
|
|
15
19
|
return count + keyLength + 1 + ('' + value).length;
|
|
16
20
|
}
|
|
21
|
+
else
|
|
22
|
+
return count + keyLength;
|
|
17
23
|
}, 1);
|
|
18
24
|
return count;
|
|
19
25
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@searchspring/snap-toolbox",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.49.0",
|
|
4
4
|
"description": "Snap Toolbox",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"files": [
|
|
24
24
|
"dist/**/*"
|
|
25
25
|
],
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "29db25460668f3c53e07942c62de4d9c82c051a1"
|
|
27
27
|
}
|