@searchspring/snap-toolbox 0.48.0 → 0.49.1

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.
@@ -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;AAE9F,wBAAgB,WAAW,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM,CAqB3D"}
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
  }
@@ -3,6 +3,7 @@ export * from './DomTargeter/DomTargeter';
3
3
  export * from './featureFlags/featureFlags';
4
4
  export * from './cookies/cookies';
5
5
  export * from './getContext/getContext';
6
+ export * from './until/until';
6
7
  export * from './url/url';
7
8
  export * from './version/version';
8
9
  export * from './charsParams/charsParams';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,SAAS,CAAC"}
package/dist/cjs/index.js CHANGED
@@ -32,6 +32,7 @@ __exportStar(require("./DomTargeter/DomTargeter"), exports);
32
32
  __exportStar(require("./featureFlags/featureFlags"), exports);
33
33
  __exportStar(require("./cookies/cookies"), exports);
34
34
  __exportStar(require("./getContext/getContext"), exports);
35
+ __exportStar(require("./until/until"), exports);
35
36
  __exportStar(require("./url/url"), exports);
36
37
  __exportStar(require("./version/version"), exports);
37
38
  __exportStar(require("./charsParams/charsParams"), exports);
@@ -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;AAE9F,wBAAgB,WAAW,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM,CAqB3D"}
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
  }
@@ -3,6 +3,7 @@ export * from './DomTargeter/DomTargeter';
3
3
  export * from './featureFlags/featureFlags';
4
4
  export * from './cookies/cookies';
5
5
  export * from './getContext/getContext';
6
+ export * from './until/until';
6
7
  export * from './url/url';
7
8
  export * from './version/version';
8
9
  export * from './charsParams/charsParams';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,SAAS,CAAC"}
package/dist/esm/index.js CHANGED
@@ -3,6 +3,7 @@ export * from './DomTargeter/DomTargeter';
3
3
  export * from './featureFlags/featureFlags';
4
4
  export * from './cookies/cookies';
5
5
  export * from './getContext/getContext';
6
+ export * from './until/until';
6
7
  export * from './url/url';
7
8
  export * from './version/version';
8
9
  export * from './charsParams/charsParams';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@searchspring/snap-toolbox",
3
- "version": "0.48.0",
3
+ "version": "0.49.1",
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": "d6b208d3109772af36cefc76ad584b8f90a817fd"
26
+ "gitHead": "e97cb34ae1363e84a45056e42654db2ab45b9195"
27
27
  }