@wavy/fn 0.0.19 → 0.0.21

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
@@ -57,7 +57,7 @@ __export(main_exports, {
57
57
  isLetter: () => isLetter,
58
58
  isLocalFile: () => isLocalFile,
59
59
  isNumber: () => isNumber,
60
- lastIndex: () => lastIndex2,
60
+ lastIndex: () => lastIndex,
61
61
  map: () => map,
62
62
  mapToArray: () => mapToArray,
63
63
  maxOf: () => maxOf,
@@ -242,7 +242,7 @@ var ObjectFormatter = class {
242
242
  if (address === void 0) return "no_address";
243
243
  const addressKeys = Object.keys(address).map((k) => k);
244
244
  return strictArray(addressKeys.map((key) => address[key])).join(
245
- "," + inline ? "" : "\n"
245
+ "," + (inline ? " " : "\n")
246
246
  ) || "no_address";
247
247
  }
248
248
  };
@@ -472,7 +472,7 @@ var TimeManager = class _TimeManager {
472
472
  return takeLastWhile(fmtDate.split(""), (char) => char !== ",").join("").trim();
473
473
  if (format2 === "MMM dd, yyyy | hh:mm A" || format2 === "MMM dd, yyyy at hh:mm A") {
474
474
  const delimiter = format2 === "MMM dd, yyyy at hh:mm A" ? "at" : "|";
475
- const time2 = this.format(convertedDate, "hh:mm A");
475
+ const time2 = new _TimeManager().format(convertedDate, "hh:mm A");
476
476
  return [fmtDate, time2].join(` ${delimiter} `);
477
477
  }
478
478
  return fmtDate;
@@ -613,7 +613,7 @@ function classNameExt(rootClassName) {
613
613
  function range(start, end) {
614
614
  return buildArray(end - start, (i) => i + start);
615
615
  }
616
- function lastIndex2(value) {
616
+ function lastIndex(value) {
617
617
  return value.length - 1;
618
618
  }
619
619
  function buildArray(length, func) {
@@ -624,7 +624,7 @@ function blankSpaces(count2) {
624
624
  }
625
625
  function ordinalIndicator(amount) {
626
626
  const stringifiedAmount = `${amount}`;
627
- const lastIdx = lastIndex2(stringifiedAmount);
627
+ const lastIdx = lastIndex(stringifiedAmount);
628
628
  const lastChar = stringifiedAmount[lastIdx];
629
629
  const secondToLastChar = stringifiedAmount[lastIdx - 1];
630
630
  let indicator;
package/dist/main.d.cts CHANGED
@@ -50,6 +50,7 @@ declare const dateFormat: (time: number | Date | "now", format?: DateFormat) =>
50
50
  declare const timeDuration: (from: number | "now" | Date, to: number | "now" | Date, options?: {
51
51
  disableRemainder?: boolean;
52
52
  abvUnits?: boolean;
53
+ round?: boolean;
53
54
  }) => string;
54
55
  declare const upperFirst: typeof StringFormatter.upperFirst;
55
56
  declare const camelCaseToLetter: (camelCase: string) => string;
package/dist/main.d.ts CHANGED
@@ -50,6 +50,7 @@ declare const dateFormat: (time: number | Date | "now", format?: DateFormat) =>
50
50
  declare const timeDuration: (from: number | "now" | Date, to: number | "now" | Date, options?: {
51
51
  disableRemainder?: boolean;
52
52
  abvUnits?: boolean;
53
+ round?: boolean;
53
54
  }) => string;
54
55
  declare const upperFirst: typeof StringFormatter.upperFirst;
55
56
  declare const camelCaseToLetter: (camelCase: string) => string;
package/dist/main.js CHANGED
@@ -147,7 +147,7 @@ var ObjectFormatter = class {
147
147
  if (address === void 0) return "no_address";
148
148
  const addressKeys = Object.keys(address).map((k) => k);
149
149
  return strictArray(addressKeys.map((key) => address[key])).join(
150
- "," + inline ? "" : "\n"
150
+ "," + (inline ? " " : "\n")
151
151
  ) || "no_address";
152
152
  }
153
153
  };
@@ -377,7 +377,7 @@ var TimeManager = class _TimeManager {
377
377
  return takeLastWhile(fmtDate.split(""), (char) => char !== ",").join("").trim();
378
378
  if (format2 === "MMM dd, yyyy | hh:mm A" || format2 === "MMM dd, yyyy at hh:mm A") {
379
379
  const delimiter = format2 === "MMM dd, yyyy at hh:mm A" ? "at" : "|";
380
- const time2 = this.format(convertedDate, "hh:mm A");
380
+ const time2 = new _TimeManager().format(convertedDate, "hh:mm A");
381
381
  return [fmtDate, time2].join(` ${delimiter} `);
382
382
  }
383
383
  return fmtDate;
@@ -518,7 +518,7 @@ function classNameExt(rootClassName) {
518
518
  function range(start, end) {
519
519
  return buildArray(end - start, (i) => i + start);
520
520
  }
521
- function lastIndex2(value) {
521
+ function lastIndex(value) {
522
522
  return value.length - 1;
523
523
  }
524
524
  function buildArray(length, func) {
@@ -529,7 +529,7 @@ function blankSpaces(count2) {
529
529
  }
530
530
  function ordinalIndicator(amount) {
531
531
  const stringifiedAmount = `${amount}`;
532
- const lastIdx = lastIndex2(stringifiedAmount);
532
+ const lastIdx = lastIndex(stringifiedAmount);
533
533
  const lastChar = stringifiedAmount[lastIdx];
534
534
  const secondToLastChar = stringifiedAmount[lastIdx - 1];
535
535
  let indicator;
@@ -1028,7 +1028,7 @@ export {
1028
1028
  isLetter,
1029
1029
  isLocalFile,
1030
1030
  isNumber,
1031
- lastIndex2 as lastIndex,
1031
+ lastIndex,
1032
1032
  map,
1033
1033
  mapToArray,
1034
1034
  maxOf,
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@wavy/fn",
3
- "version": "0.0.19",
3
+ "version": "0.0.21",
4
4
  "main": "./dist/main.js",
5
5
  "module": "./dist/main.cjs",
6
6
  "types": "./dist/main.d.ts",
7
7
  "scripts": {
8
+ "dev": "npm run build && npm link",
8
9
  "build": "tsup && node prepend",
9
10
  "success": "echo ✨ Successfully published package! ✨",
10
11
  "publisher": "npm run build && npm version patch && npm publish && npm run success"