cyc-type-def 5.0.1 → 5.1.1

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/README.md CHANGED
@@ -4,9 +4,13 @@ Run these commands to use the package:
4
4
 
5
5
  ```bash
6
6
  npm run build
7
+ npm config set //registry.npmjs.org/:_authToken=YOUR_NPM_TOKEN
7
8
  npm publish --access public
9
+ npm config delete //registry.npmjs.org/:_authToken
8
10
  ```
11
+
9
12
  ---
13
+
10
14
  # TypeScript Package Setup Guide
11
15
 
12
16
  This guide outlines how to set up a simple TypeScript package with build and test scripts.
@@ -48,8 +52,8 @@ my-ts-package/
48
52
  ### `src/index.ts`
49
53
 
50
54
  ```ts
51
- export * from './utils';
52
- export * from './types';
55
+ export * from "./utils";
56
+ export * from "./types";
53
57
  ```
54
58
 
55
59
  ### `src/utils.ts`
package/dist/index.cjs CHANGED
@@ -49,6 +49,7 @@ __export(index_exports, {
49
49
  cgNum: () => cgNum,
50
50
  compareCG: () => compareCG,
51
51
  formatDateDDMMYY: () => formatDateDDMMYY,
52
+ getDayMonthSortKey: () => getDayMonthSortKey,
52
53
  isDateInRangeIgnoreYear: () => isDateInRangeIgnoreYear,
53
54
  monthStr: () => monthStr,
54
55
  parseYYMMDD: () => parseYYMMDD,
@@ -649,6 +650,10 @@ function yearStr(timestamp) {
649
650
  function monthStr(timestamp) {
650
651
  return new Date(timestamp).toLocaleString("default", { month: "long" });
651
652
  }
653
+ function getDayMonthSortKey(timestamp) {
654
+ const d = new Date(timestamp);
655
+ return d.getMonth() * 31 + d.getDate();
656
+ }
652
657
 
653
658
  // src/util/sort.util.ts
654
659
  function compareCG(a, b) {
@@ -686,6 +691,7 @@ function compareCG(a, b) {
686
691
  cgNum,
687
692
  compareCG,
688
693
  formatDateDDMMYY,
694
+ getDayMonthSortKey,
689
695
  isDateInRangeIgnoreYear,
690
696
  monthStr,
691
697
  parseYYMMDD,
package/dist/index.d.cts CHANGED
@@ -545,7 +545,8 @@ declare function parseYYMMDD(str: string): Date;
545
545
  declare function isDateInRangeIgnoreYear(d: Date, start: Date, end: Date): boolean;
546
546
  declare function yearStr(timestamp: number): string;
547
547
  declare function monthStr(timestamp: number): string;
548
+ declare function getDayMonthSortKey(timestamp: number): number;
548
549
 
549
550
  declare function compareCG(a: CG, b: CG): number;
550
551
 
551
- export { type AppPage, AppUser, AssignedCG, AttSheep, Attendance, BackupAttendance, type Base, type BaseDialog, CG, type Claim, ClaimStatus, ClaimType, Click, ClickAction, Cluster, Column, type Device, DisplayAttendance, FollowUpStatus, LIST_STATUS, METHOD, type MsjClassBatch, type MsjClassTime, type MsjClassType, MsjJoinStatus, MsjJoinStatusInfo, type MsjStudBatch, type MsjStudClass, PERMISSION, type PastoralTeam, ReportSheep, Session, SessionAttendance, Sheep, SmallTeam, Title, TitleAttendance, cgNum, compareCG, formatDateDDMMYY, isDateInRangeIgnoreYear, monthStr, parseYYMMDD, yearStr };
552
+ export { type AppPage, AppUser, AssignedCG, AttSheep, Attendance, BackupAttendance, type Base, type BaseDialog, CG, type Claim, ClaimStatus, ClaimType, Click, ClickAction, Cluster, Column, type Device, DisplayAttendance, FollowUpStatus, LIST_STATUS, METHOD, type MsjClassBatch, type MsjClassTime, type MsjClassType, MsjJoinStatus, MsjJoinStatusInfo, type MsjStudBatch, type MsjStudClass, PERMISSION, type PastoralTeam, ReportSheep, Session, SessionAttendance, Sheep, SmallTeam, Title, TitleAttendance, cgNum, compareCG, formatDateDDMMYY, getDayMonthSortKey, isDateInRangeIgnoreYear, monthStr, parseYYMMDD, yearStr };
package/dist/index.d.ts CHANGED
@@ -545,7 +545,8 @@ declare function parseYYMMDD(str: string): Date;
545
545
  declare function isDateInRangeIgnoreYear(d: Date, start: Date, end: Date): boolean;
546
546
  declare function yearStr(timestamp: number): string;
547
547
  declare function monthStr(timestamp: number): string;
548
+ declare function getDayMonthSortKey(timestamp: number): number;
548
549
 
549
550
  declare function compareCG(a: CG, b: CG): number;
550
551
 
551
- export { type AppPage, AppUser, AssignedCG, AttSheep, Attendance, BackupAttendance, type Base, type BaseDialog, CG, type Claim, ClaimStatus, ClaimType, Click, ClickAction, Cluster, Column, type Device, DisplayAttendance, FollowUpStatus, LIST_STATUS, METHOD, type MsjClassBatch, type MsjClassTime, type MsjClassType, MsjJoinStatus, MsjJoinStatusInfo, type MsjStudBatch, type MsjStudClass, PERMISSION, type PastoralTeam, ReportSheep, Session, SessionAttendance, Sheep, SmallTeam, Title, TitleAttendance, cgNum, compareCG, formatDateDDMMYY, isDateInRangeIgnoreYear, monthStr, parseYYMMDD, yearStr };
552
+ export { type AppPage, AppUser, AssignedCG, AttSheep, Attendance, BackupAttendance, type Base, type BaseDialog, CG, type Claim, ClaimStatus, ClaimType, Click, ClickAction, Cluster, Column, type Device, DisplayAttendance, FollowUpStatus, LIST_STATUS, METHOD, type MsjClassBatch, type MsjClassTime, type MsjClassType, MsjJoinStatus, MsjJoinStatusInfo, type MsjStudBatch, type MsjStudClass, PERMISSION, type PastoralTeam, ReportSheep, Session, SessionAttendance, Sheep, SmallTeam, Title, TitleAttendance, cgNum, compareCG, formatDateDDMMYY, getDayMonthSortKey, isDateInRangeIgnoreYear, monthStr, parseYYMMDD, yearStr };
package/dist/index.js CHANGED
@@ -591,6 +591,10 @@ function yearStr(timestamp) {
591
591
  function monthStr(timestamp) {
592
592
  return new Date(timestamp).toLocaleString("default", { month: "long" });
593
593
  }
594
+ function getDayMonthSortKey(timestamp) {
595
+ const d = new Date(timestamp);
596
+ return d.getMonth() * 31 + d.getDate();
597
+ }
594
598
 
595
599
  // src/util/sort.util.ts
596
600
  function compareCG(a, b) {
@@ -627,6 +631,7 @@ export {
627
631
  cgNum,
628
632
  compareCG,
629
633
  formatDateDDMMYY,
634
+ getDayMonthSortKey,
630
635
  isDateInRangeIgnoreYear,
631
636
  monthStr,
632
637
  parseYYMMDD,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cyc-type-def",
3
- "version": "5.0.1",
3
+ "version": "5.1.1",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",