@nemigo/helpers 0.0.20 → 0.1.0

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/datetime.js CHANGED
@@ -86,6 +86,7 @@ export const formatDateTime = (datetime = Date.now(), format = "DD.DM.DY TH:TM")
86
86
  }
87
87
  return result.join("");
88
88
  };
89
+ //...
89
90
  /**
90
91
  * Конвертирует строковые представления даты и времени в {@link Timestamp}
91
92
  *
package/dist/xod.js CHANGED
@@ -43,9 +43,9 @@ export const numberSchema = z.unknown().transform((value, ctx) => caseNumber(val
43
43
  : result));
44
44
  export const numberSchemaOptional = z.union([nullSchema, numberSchema]);
45
45
  //...
46
- export const stringSchema = z.unknown().transform((value, ctx) => caseString(value, (result) => result === null
46
+ export const stringSchema = z.unknown().transform((value, ctx) => caseString(value, (result) => result === null || result === ""
47
47
  ? invalid(value, ctx, {
48
- message: "It isn't a string",
48
+ message: "It isn't a string or empty string",
49
49
  expected: "string (or number)",
50
50
  })
51
51
  : result));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nemigo/helpers",
3
- "version": "0.0.20",
3
+ "version": "0.1.0",
4
4
  "private": false,
5
5
  "author": {
6
6
  "name": "Vlad Logvin",