@wavy/fn 0.0.29 → 0.0.30

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/main.cjs CHANGED
@@ -621,8 +621,11 @@ function isPromise(value) {
621
621
  var parseDate = dateFormat;
622
622
  function parseName(value) {
623
623
  if (typeof value === "string") {
624
- const [first2 = "", last2 = ""] = (value || "").trim().split(" ");
625
- return { first: first2, last: last2 };
624
+ const words = (value || "").trim().split(" ");
625
+ return {
626
+ first: words[0] || "",
627
+ last: words.length <= 1 ? "" : words[words.length - 1] || ""
628
+ };
626
629
  }
627
630
  const { first = "", last = "" } = value || {};
628
631
  return first.trim() + " " + last.trim();
package/dist/main.d.cts CHANGED
@@ -1,4 +1,3 @@
1
- import "@wavy/util"
2
1
  import { FileDetails, Name, Address, NonFunction, KnownFileAlias, TaskResult } from '@wavy/util';
3
2
 
4
3
  type DateFormat = "MMM dd, yyyy" | "MMM dd, yyyy | hh:mm A" | "MMM dd, yyyy at hh:mm A" | "MMMM" | "yyyy" | "MMM yyyy" | "mm/dd/yyyy" | "mm/dd/yyyy hh:mm A" | "hh:mm A" | "hh:mm:ss A";
package/dist/main.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import "@wavy/util"
2
1
  import { FileDetails, Name, Address, NonFunction, KnownFileAlias, TaskResult } from '@wavy/util';
3
2
 
4
3
  type DateFormat = "MMM dd, yyyy" | "MMM dd, yyyy | hh:mm A" | "MMM dd, yyyy at hh:mm A" | "MMMM" | "yyyy" | "MMM yyyy" | "mm/dd/yyyy" | "mm/dd/yyyy hh:mm A" | "hh:mm A" | "hh:mm:ss A";
package/dist/main.js CHANGED
@@ -516,8 +516,11 @@ function isPromise(value) {
516
516
  var parseDate = dateFormat;
517
517
  function parseName(value) {
518
518
  if (typeof value === "string") {
519
- const [first2 = "", last2 = ""] = (value || "").trim().split(" ");
520
- return { first: first2, last: last2 };
519
+ const words = (value || "").trim().split(" ");
520
+ return {
521
+ first: words[0] || "",
522
+ last: words.length <= 1 ? "" : words[words.length - 1] || ""
523
+ };
521
524
  }
522
525
  const { first = "", last = "" } = value || {};
523
526
  return first.trim() + " " + last.trim();
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@wavy/fn",
3
- "version": "0.0.29",
3
+ "version": "0.0.30",
4
4
  "main": "./dist/main.js",
5
5
  "module": "./dist/main.cjs",
6
6
  "types": "./dist/main.d.ts",
7
7
  "scripts": {
8
8
  "dev": "npm run build && npm link",
9
- "build": "tsup && node prepend",
9
+ "build": "tsup",
10
10
  "success": "echo ✨ Successfully published package! ✨",
11
11
  "publisher": "npm run build && npm version patch && npm publish && npm run success"
12
12
  },
@@ -22,10 +22,13 @@
22
22
  "url": "https://github.com/justVibes/literate-succotash/issues"
23
23
  },
24
24
  "homepage": "https://github.com/justVibes/literate-succotash#readme",
25
+ "peerDependencies": {
26
+ "zod": "^4.2.1"
27
+ },
25
28
  "description": "",
26
29
  "devDependencies": {
27
30
  "@types/node": "^24.5.2",
28
- "@wavy/util": "^0.0.6",
31
+ "@wavy/util": "^0.0.7",
29
32
  "tsup": "^8.5.0",
30
33
  "typescript": "^5.9.2",
31
34
  "zod": "^4.2.1"