inferred-types 0.51.6 → 0.51.8
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/index.cjs +18 -1
- package/dist/index.js +16 -1
- package/dist/inferred-types/tsconfig.tsbuildinfo +1 -1
- package/dist/runtime/tsconfig.tsbuildinfo +1 -1
- package/dist/runtime/type-guards/date-time/isDateTime.d.ts.map +1 -1
- package/dist/runtime/type-guards/date-time/isDateTime.js +11 -2
- package/dist/runtime/type-guards/index.d.ts +2 -0
- package/dist/runtime/type-guards/index.d.ts.map +1 -1
- package/dist/runtime/type-guards/index.js +2 -0
- package/dist/runtime/type-guards/isNumericArray.d.ts +5 -0
- package/dist/runtime/type-guards/isNumericArray.d.ts.map +1 -0
- package/dist/runtime/type-guards/isNumericArray.js +7 -0
- package/dist/runtime/type-guards/isStringArray.d.ts +5 -0
- package/dist/runtime/type-guards/isStringArray.d.ts.map +1 -0
- package/dist/runtime/type-guards/isStringArray.js +7 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isDateTime.d.ts","sourceRoot":"","sources":["../../../../src/runtime/type-guards/date-time/isDateTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAIlE,eAAO,MAAM,aAAa,QAAS,OAAO,KAAG,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"isDateTime.d.ts","sourceRoot":"","sources":["../../../../src/runtime/type-guards/date-time/isDateTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAIlE,eAAO,MAAM,aAAa,QAAS,OAAO,KAAG,GAAG,IAAI,eAcnD,CAAA"}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
import { isString, } from "src/runtime/index";
|
|
1
|
+
import { isNumberLike, isString, stripUntil, } from "src/runtime/index";
|
|
2
2
|
export const isIsoDateTime = (val) => {
|
|
3
|
-
|
|
3
|
+
if (isString(val)) {
|
|
4
|
+
return isString(val) &&
|
|
5
|
+
val.includes(":") &&
|
|
6
|
+
val.includes("-") &&
|
|
7
|
+
val.split("-").length === 3 &&
|
|
8
|
+
val.split(":").length > 1 &&
|
|
9
|
+
(!val.includes("Z") || isNumberLike(val.slice(-1)) || val.endsWith("Z")) &&
|
|
10
|
+
(!val.includes("Z") || ["+", "-"].includes(stripUntil(val, "Z").slice(1, 2)) || val.endsWith("Z"));
|
|
11
|
+
}
|
|
12
|
+
return false;
|
|
4
13
|
};
|
|
@@ -47,6 +47,8 @@ export * from "./api-tg";
|
|
|
47
47
|
export * from "./isBooleanLike";
|
|
48
48
|
export * from "./isRegExp";
|
|
49
49
|
export * from "./isAlpha";
|
|
50
|
+
export * from "./isStringArray";
|
|
51
|
+
export * from "./isNumericArray";
|
|
50
52
|
export * from "./tokens/index";
|
|
51
53
|
export * from "./higher-order/index";
|
|
52
54
|
export * from "./tokens/index";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runtime/type-guards/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,SA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AAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AAEjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC"}
|
|
@@ -47,6 +47,8 @@ export * from "./api-tg";
|
|
|
47
47
|
export * from "./isBooleanLike";
|
|
48
48
|
export * from "./isRegExp";
|
|
49
49
|
export * from "./isAlpha";
|
|
50
|
+
export * from "./isStringArray";
|
|
51
|
+
export * from "./isNumericArray";
|
|
50
52
|
export * from "./tokens/index";
|
|
51
53
|
export * from "./higher-order/index";
|
|
52
54
|
export * from "./tokens/index";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isNumericArray.d.ts","sourceRoot":"","sources":["../../../src/runtime/type-guards/isNumericArray.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,cAAc,QAAS,OAAO,KAAG,GAAG,IAAI,MAAM,EAE1D,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isStringArray.d.ts","sourceRoot":"","sources":["../../../src/runtime/type-guards/isStringArray.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,aAAa,QAAS,OAAO,KAAG,GAAG,IAAI,MAAM,EAEzD,CAAA"}
|