inferred-types 0.55.9 → 0.55.11

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.
@@ -71,6 +71,7 @@ __export(index_exports, {
71
71
  entries: () => entries,
72
72
  errCondition: () => errCondition,
73
73
  filter: () => filter,
74
+ filterEmpty: () => filterEmpty,
74
75
  find: () => find,
75
76
  fnMeta: () => fnMeta,
76
77
  fromDefineObject: () => fromDefineObject,
@@ -261,6 +262,7 @@ __export(index_exports, {
261
262
  isNewsUrl: () => isNewsUrl,
262
263
  isNikeUrl: () => isNikeUrl,
263
264
  isNorwegianNewsUrl: () => isNorwegianNewsUrl,
265
+ isNotEmpty: () => isNotEmpty,
264
266
  isNotNull: () => isNotNull,
265
267
  isNothing: () => isNothing,
266
268
  isNull: () => isNull,
@@ -2690,15 +2692,17 @@ ${frameToCss(frames)}
2690
2692
  };
2691
2693
  }
2692
2694
 
2693
- // src/css/defineCss.ts
2694
- function cssFromDefinition(defn, indent = "", inline = false) {
2695
+ // src/css/cssFromDefinition.ts
2696
+ function cssFromDefinition(defn, opt) {
2697
+ const inline = isDefined(opt?.inline) ? opt.inline : true;
2698
+ const indent = isString(opt?.indent) ? opt.indent : "";
2695
2699
  const nextDefn = inline ? " " : "\n";
2696
- return Object.keys(defn).map((key) => `${indent}${key}: ${ensureTrailing(defn[key], ";")}${nextDefn}`).join("");
2700
+ return Object.keys(defn).map((key) => `${indent}${key}: ${ensureTrailing(defn[key], ";")}`).join(nextDefn);
2697
2701
  }
2698
2702
  function defineCss(defn) {
2699
2703
  const fn2 = (selector) => {
2700
2704
  return selector ? `${selector} {
2701
- ${cssFromDefinition(defn, " ")}}
2705
+ ${cssFromDefinition(defn, { indent: " " })}}
2702
2706
  ` : cssFromDefinition(defn);
2703
2707
  };
2704
2708
  return createFnWithProps(
@@ -3142,6 +3146,11 @@ function createFixedLengthArray(content, quantity) {
3142
3146
  // src/lists/filter.ts
3143
3147
  var filter = "NOT READY";
3144
3148
 
3149
+ // src/lists/filterEmpty.ts
3150
+ function filterEmpty(...val) {
3151
+ return val.filter((i) => isNotEmpty(i));
3152
+ }
3153
+
3145
3154
  // src/lists/find.ts
3146
3155
  function find(list2, deref = null) {
3147
3156
  return (comparator) => {
@@ -5024,6 +5033,9 @@ function isEmail(val) {
5024
5033
  function isEmpty(val) {
5025
5034
  return isUndefined(val) || isNull(val) || isString(val) && val.length === 0 || isObject(val) && Object.keys(val).length === 0 || isArray(val) && val.length === 0;
5026
5035
  }
5036
+ function isNotEmpty(val) {
5037
+ return !(isUndefined(val) || isNull(val) || isString(val) && val.length === 0 || isObject(val) && Object.keys(val).length === 0 || isArray(val) && (val?.length === 0 || val?.length === void 0));
5038
+ }
5027
5039
 
5028
5040
  // src/type-guards/isErrorCondition.ts
5029
5041
  function isErrorCondition(value, kind = null) {
@@ -6184,6 +6196,7 @@ function asVueRef(value) {
6184
6196
  entries,
6185
6197
  errCondition,
6186
6198
  filter,
6199
+ filterEmpty,
6187
6200
  find,
6188
6201
  fnMeta,
6189
6202
  fromDefineObject,
@@ -6374,6 +6387,7 @@ function asVueRef(value) {
6374
6387
  isNewsUrl,
6375
6388
  isNikeUrl,
6376
6389
  isNorwegianNewsUrl,
6390
+ isNotEmpty,
6377
6391
  isNotNull,
6378
6392
  isNothing,
6379
6393
  isNull,