inferred-types 0.55.0 → 0.55.2
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/modules/constants/dist/index.cjs +3 -3
- package/modules/inferred-types/dist/index.cjs +14 -3
- package/modules/inferred-types/dist/index.cjs.map +1 -1
- package/modules/inferred-types/dist/index.d.ts +37 -9
- package/modules/inferred-types/dist/index.js +10 -0
- package/modules/inferred-types/dist/index.js.map +1 -1
- package/modules/runtime/dist/index.cjs +16 -3
- package/modules/runtime/dist/index.cjs.map +1 -1
- package/modules/runtime/dist/index.d.ts +30 -9
- package/modules/runtime/dist/index.js +12 -0
- package/modules/runtime/dist/index.js.map +1 -1
- package/modules/types/dist/index.cjs +3 -3
- package/modules/types/dist/index.d.ts +8 -1
- package/package.json +15 -13
|
@@ -18,8 +18,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
20
|
// src/index.ts
|
|
21
|
-
var
|
|
22
|
-
__export(
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
23
|
ShapeApiImplementation: () => ShapeApiImplementation,
|
|
24
24
|
addFnToProps: () => addFnToProps,
|
|
25
25
|
addPropsToFn: () => addPropsToFn,
|
|
@@ -179,6 +179,7 @@ __export(src_exports, {
|
|
|
179
179
|
isDutchNewsUrl: () => isDutchNewsUrl,
|
|
180
180
|
isEbayUrl: () => isEbayUrl,
|
|
181
181
|
isEmail: () => isEmail,
|
|
182
|
+
isEmpty: () => isEmpty,
|
|
182
183
|
isEnergyMetric: () => isEnergyMetric,
|
|
183
184
|
isEnergyUom: () => isEnergyUom,
|
|
184
185
|
isEqual: () => isEqual,
|
|
@@ -479,7 +480,7 @@ __export(src_exports, {
|
|
|
479
480
|
youtubeEmbed: () => youtubeEmbed,
|
|
480
481
|
youtubeMeta: () => youtubeMeta
|
|
481
482
|
});
|
|
482
|
-
module.exports = __toCommonJS(
|
|
483
|
+
module.exports = __toCommonJS(index_exports);
|
|
483
484
|
|
|
484
485
|
// src/api/defineApi.ts
|
|
485
486
|
function asEscapeFunction(fn2) {
|
|
@@ -3537,6 +3538,9 @@ function intersect(value, _intersectedWith) {
|
|
|
3537
3538
|
|
|
3538
3539
|
// src/literals/stripTrailing.ts
|
|
3539
3540
|
function stripTrailing(content, ...strip2) {
|
|
3541
|
+
if (isUndefined(content)) {
|
|
3542
|
+
return void 0;
|
|
3543
|
+
}
|
|
3540
3544
|
let output = String(content);
|
|
3541
3545
|
for (const s of strip2) {
|
|
3542
3546
|
if (output.endsWith(String(s))) {
|
|
@@ -3849,6 +3853,11 @@ function isEmail(val) {
|
|
|
3849
3853
|
return isString(val) && (LOWER_ALPHA_CHARS.includes(firstChar) && parts.length === 2 && domain.length >= 1 && tld.length >= 2);
|
|
3850
3854
|
}
|
|
3851
3855
|
|
|
3856
|
+
// src/type-guards/isEmpty.ts
|
|
3857
|
+
function isEmpty(val) {
|
|
3858
|
+
return isUndefined(val) || isNull(val) || isString(val) && val.length === 0 || isObject(val) && Object.keys(val).length === 0 || isArray(val) && val.length === 0;
|
|
3859
|
+
}
|
|
3860
|
+
|
|
3852
3861
|
// src/type-guards/isErrorCondition.ts
|
|
3853
3862
|
function isErrorCondition(value, kind = null) {
|
|
3854
3863
|
return isObject(value) && "__kind" in value && value.__kind === "ErrorCondition" && "kind" in value ? kind !== null ? value.kind === kind : true : false;
|
|
@@ -4946,6 +4955,9 @@ function stripChars(content, ...strip2) {
|
|
|
4946
4955
|
|
|
4947
4956
|
// src/literals/stripLeading.ts
|
|
4948
4957
|
function stripLeading(content, ...strip2) {
|
|
4958
|
+
if (isUndefined(content)) {
|
|
4959
|
+
return void 0;
|
|
4960
|
+
}
|
|
4949
4961
|
let output = String(content);
|
|
4950
4962
|
for (const s of strip2) {
|
|
4951
4963
|
if (output.startsWith(String(s))) {
|
|
@@ -5862,6 +5874,7 @@ function asVueRef(value) {
|
|
|
5862
5874
|
isDutchNewsUrl,
|
|
5863
5875
|
isEbayUrl,
|
|
5864
5876
|
isEmail,
|
|
5877
|
+
isEmpty,
|
|
5865
5878
|
isEnergyMetric,
|
|
5866
5879
|
isEnergyUom,
|
|
5867
5880
|
isEqual,
|