@takeshape/util 8.66.2 → 8.68.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/es/strings.js CHANGED
@@ -11,4 +11,11 @@ export function isUuid(str) {
11
11
  }
12
12
  export function isEmptyString(str) {
13
13
  return isString(str) && isEmpty(str);
14
+ }
15
+ export function isIntegerLike(value) {
16
+ if (typeof value === 'number') {
17
+ return true;
18
+ }
19
+
20
+ return /^\d+$/.test(value);
14
21
  }
package/lib/strings.d.ts CHANGED
@@ -2,4 +2,5 @@ export declare const camelCase: (str: string | string[]) => string;
2
2
  export declare function pascalCase(str: string | string[]): string;
3
3
  export declare function isUuid(str: string): boolean;
4
4
  export declare function isEmptyString(str: unknown): boolean;
5
+ export declare function isIntegerLike(value: string | number): boolean;
5
6
  //# sourceMappingURL=strings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../../src/strings.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS,QAAuB,MAAM,GAAG,MAAM,EAAE,KAAK,MAAM,CAAC;AAE1E,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAEzD;AAED,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAE3C;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEnD"}
1
+ {"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../../src/strings.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS,QAAuB,MAAM,GAAG,MAAM,EAAE,KAAK,MAAM,CAAC;AAE1E,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAEzD;AAED,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAE3C;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEnD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAM7D"}
package/lib/strings.js CHANGED
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.camelCase = void 0;
7
7
  exports.isEmptyString = isEmptyString;
8
+ exports.isIntegerLike = isIntegerLike;
8
9
  exports.isUuid = isUuid;
9
10
  exports.pascalCase = pascalCase;
10
11
 
@@ -31,4 +32,12 @@ function isUuid(str) {
31
32
 
32
33
  function isEmptyString(str) {
33
34
  return (0, _isString.default)(str) && (0, _isEmpty.default)(str);
35
+ }
36
+
37
+ function isIntegerLike(value) {
38
+ if (typeof value === 'number') {
39
+ return true;
40
+ }
41
+
42
+ return /^\d+$/.test(value);
34
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takeshape/util",
3
- "version": "8.66.2",
3
+ "version": "8.68.4",
4
4
  "description": "Shared utilities",
5
5
  "homepage": "https://www.takeshape.io",
6
6
  "repository": {
@@ -21,7 +21,7 @@
21
21
  "es"
22
22
  ],
23
23
  "dependencies": {
24
- "@takeshape/routing": "8.66.2",
24
+ "@takeshape/routing": "8.68.4",
25
25
  "@types/url-parse": "^1.4.4",
26
26
  "aws-sdk": "^2.802.0",
27
27
  "classnames": "^2.2.5",