@togatherlabs/shared-utils 1.0.4 → 1.0.6

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.
@@ -0,0 +1,2 @@
1
+ export * from "./sample";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
@@ -0,0 +1 @@
1
+ export * from "./sample";
@@ -0,0 +1,4 @@
1
+ export declare const SAMPLE: {
2
+ Char: string;
3
+ };
4
+ //# sourceMappingURL=sample.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sample.d.ts","sourceRoot":"","sources":["../../src/constants/sample.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;CAElB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export const SAMPLE = {
2
+ Char: "A",
3
+ };
@@ -0,0 +1,2 @@
1
+ export declare function formatDate(date: Date, locale?: string): string;
2
+ //# sourceMappingURL=formatDate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatDate.d.ts","sourceRoot":"","sources":["../../src/helpers/formatDate.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,SAAU,GAAG,MAAM,CAU/D"}
@@ -0,0 +1,10 @@
1
+ export function formatDate(date, locale = "en-IN") {
2
+ if (!(date instanceof Date) || Number.isNaN(date.getTime())) {
3
+ throw new Error("Invalid Date");
4
+ }
5
+ return date.toLocaleDateString(locale, {
6
+ year: "numeric",
7
+ month: "short",
8
+ day: "numeric",
9
+ });
10
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./formatDate";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -0,0 +1 @@
1
+ export * from "./formatDate";
@@ -0,0 +1,4 @@
1
+ export * from "./constants";
2
+ export * from "./helpers";
3
+ export * from "./types";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export * from "./constants";
2
+ export * from "./helpers";
3
+ export * from "./types";
@@ -0,0 +1,2 @@
1
+ export * from "./user";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
@@ -0,0 +1 @@
1
+ export * from "./user";
@@ -0,0 +1,6 @@
1
+ export interface UserDTO {
2
+ id: string;
3
+ name: string;
4
+ email: string;
5
+ }
6
+ //# sourceMappingURL=user.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/types/user.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf"}
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,28 +1,10 @@
1
1
  {
2
2
  "name": "@togatherlabs/shared-utils",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Shared utility functions, constants, and types for ToGather microservices",
5
5
  "type": "module",
6
- "main": "dist/src/index.js",
7
- "types": "dist/src/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "import": "./dist/src/index.js",
11
- "require": "./dist/src/index.js"
12
- },
13
- "./helpers": {
14
- "import": "./dist/src/helpers/index.js",
15
- "require": "./dist/src/helpers/index.js"
16
- },
17
- "./constants": {
18
- "import": "./dist/src/constants/index.js",
19
- "require": "./dist/src/constants/index.js"
20
- },
21
- "./types": {
22
- "import": "./dist/src/types/index.js",
23
- "require": "./dist/src/types/index.js"
24
- }
25
- },
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
26
8
  "files": [
27
9
  "dist"
28
10
  ],