@nivinjoseph/n-date 1.0.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.
Files changed (43) hide show
  1. package/.editorconfig +14 -0
  2. package/.vscode/launch.json +56 -0
  3. package/.vscode/settings.json +111 -0
  4. package/.vscode/tasks.json +12 -0
  5. package/.yarn/releases/yarn-4.14.1.cjs +940 -0
  6. package/.yarnrc.yml +8 -0
  7. package/LICENSE +21 -0
  8. package/README.md +21 -0
  9. package/dist/date-time-format.d.ts +11 -0
  10. package/dist/date-time-format.d.ts.map +1 -0
  11. package/dist/date-time-format.js +11 -0
  12. package/dist/date-time-format.js.map +1 -0
  13. package/dist/date-time-span.d.ts +70 -0
  14. package/dist/date-time-span.d.ts.map +1 -0
  15. package/dist/date-time-span.js +122 -0
  16. package/dist/date-time-span.js.map +1 -0
  17. package/dist/date-time.d.ts +391 -0
  18. package/dist/date-time.d.ts.map +1 -0
  19. package/dist/date-time.js +753 -0
  20. package/dist/date-time.js.map +1 -0
  21. package/dist/index.d.ts +4 -0
  22. package/dist/index.d.ts.map +1 -0
  23. package/dist/index.js +4 -0
  24. package/dist/index.js.map +1 -0
  25. package/dist/tsconfig.json +13 -0
  26. package/docs/README.md +33 -0
  27. package/docs/date-time-span.md +72 -0
  28. package/docs/date-time.md +169 -0
  29. package/docs/formats.md +56 -0
  30. package/docs/getting-started.md +151 -0
  31. package/eslint.config.js +596 -0
  32. package/package.json +57 -0
  33. package/src/date-time-format.ts +35 -0
  34. package/src/date-time-span.ts +130 -0
  35. package/src/date-time.ts +950 -0
  36. package/src/index.ts +3 -0
  37. package/test/date-time-comparison.test.ts +1579 -0
  38. package/test/date-time-create.test.ts +1147 -0
  39. package/test/date-time-math.test.ts +324 -0
  40. package/test/date-time-properties.test.ts +200 -0
  41. package/test/date-time-utility.test.ts +432 -0
  42. package/test/date-time-validations.test.ts +521 -0
  43. package/tsconfig.json +31 -0
@@ -0,0 +1,596 @@
1
+ import eslint from "@eslint/js";
2
+ import tsEslint from "typescript-eslint";
3
+ import { defineConfig } from "eslint/config";
4
+ import importPlugin from "eslint-plugin-import";
5
+ import tsParser from "@typescript-eslint/parser";
6
+
7
+ import stylistic from "@stylistic/eslint-plugin";
8
+
9
+ export default defineConfig(
10
+ eslint.configs.recommended,
11
+ tsEslint.configs.recommended,
12
+ importPlugin.flatConfigs.recommended,
13
+ {
14
+ ignores: ["dist/**", "node_modules/**", "**/*.js", "**/*.map", "**/*.d.ts"]
15
+ },
16
+ {
17
+ files: ["**/*.ts"],
18
+ extends: [importPlugin.flatConfigs.recommended, importPlugin.flatConfigs.typescript],
19
+ languageOptions: {
20
+ parser: tsParser,
21
+ ecmaVersion: "latest",
22
+ sourceType: "module"
23
+ },
24
+ settings: {
25
+ "import/parsers": {
26
+ "@typescript-eslint/parser": [".ts", ".tsx"]
27
+ },
28
+ // "import/resolver": {
29
+ // "node": {
30
+ // "extensions": [".js", ".jsx"],
31
+ // "moduleDirectory": ["node_modules"]
32
+ // }
33
+ // },
34
+ "import/resolver": {
35
+ node: {
36
+ extensions: [".js", ".jsx", ".ts", ".tsx"]
37
+ },
38
+ typescript: {
39
+ // Point to your tsconfig if needed:
40
+ project: "./tsconfig.json"
41
+ }
42
+ },
43
+ },
44
+ rules: {
45
+ // "import/no-unresolved": "off",
46
+ "import/no-extraneous-dependencies": ["error"]
47
+ }
48
+ },
49
+ {
50
+ files: ["**/*.ts"],
51
+ languageOptions: {
52
+ parserOptions: {
53
+ // project: [
54
+ // "./tsconfig.json"
55
+ // ],
56
+ tsconfigRootDir: import.meta.dirname,
57
+ projectService: true
58
+ }
59
+ },
60
+ plugins: {
61
+ "@stylistic/ts": stylistic
62
+ },
63
+ "rules": {
64
+ "import/extensions": [
65
+ "error",
66
+ "always",
67
+ {
68
+ "ts": "never",
69
+ "js": "always"
70
+ }
71
+ ],
72
+ // "quotes": "off",
73
+ "quotes": [
74
+ "error",
75
+ "double",
76
+ {
77
+ "allowTemplateLiterals": true
78
+ }
79
+ ],
80
+ "no-eval": "error",
81
+ "no-void": "error",
82
+ "no-with": "error",
83
+ "@typescript-eslint/adjacent-overload-signatures": "error",
84
+ "@typescript-eslint/array-type": [
85
+ "error",
86
+ {
87
+ "default": "generic",
88
+ "readonly": "generic"
89
+ }
90
+ ],
91
+ "@typescript-eslint/consistent-type-assertions": ["error", {
92
+ assertionStyle: "as",
93
+ objectLiteralTypeAssertions: "allow-as-parameter"
94
+ }],
95
+ "@typescript-eslint/await-thenable": "error",
96
+ "@typescript-eslint/ban-ts-comment": [
97
+ "error",
98
+ {
99
+ "ts-expect-error": "allow-with-description",
100
+ "ts-ignore": "allow-with-description",
101
+ "ts-nocheck": true,
102
+ "ts-check": true
103
+ }
104
+ ],
105
+ "@typescript-eslint/ban-tslint-comment": "error",
106
+ "@typescript-eslint/no-empty-object-type": "error",
107
+ "@typescript-eslint/no-unsafe-function-type": "error",
108
+ // "@typescript-eslint/no-wrapper-object-types": "error",
109
+ "@typescript-eslint/no-restricted-types": [
110
+ "error",
111
+ {
112
+ "types": {
113
+ "String": {
114
+ "message": "Use string instead",
115
+ "fixWith": "string"
116
+ },
117
+ "Boolean": {
118
+ "message": "Use boolean instead",
119
+ "fixWith": "boolean"
120
+ },
121
+ "Number": {
122
+ "message": "Use number instead",
123
+ "fixWith": "number"
124
+ },
125
+ "Symbol": {
126
+ "message": "Use symbol instead",
127
+ "fixWith": "symbol"
128
+ }
129
+ }
130
+ }
131
+ ],
132
+ "brace-style": "off",
133
+ "@stylistic/ts/brace-style": [
134
+ "error",
135
+ "allman",
136
+ {
137
+ "allowSingleLine": true
138
+ }
139
+ ],
140
+ "@typescript-eslint/class-literal-property-style": [
141
+ "off",
142
+ "getters"
143
+ ],
144
+ "comma-dangle": "off",
145
+ "@stylistic/ts/comma-dangle": [
146
+ "error",
147
+ {
148
+ "arrays": "never",
149
+ "objects": "only-multiline",
150
+ "imports": "never",
151
+ "exports": "never",
152
+ "functions": "never",
153
+ "enums": "only-multiline"
154
+ }
155
+ ],
156
+ "default-param-last": "off",
157
+ "@typescript-eslint/default-param-last": "error",
158
+ "@typescript-eslint/explicit-function-return-type": [
159
+ "error",
160
+ {
161
+ "allowExpressions": true
162
+ }
163
+ ],
164
+ "@typescript-eslint/explicit-member-accessibility": "error",
165
+ "@typescript-eslint/explicit-module-boundary-types": "error",
166
+ "func-call-spacing": "off",
167
+ "@stylistic/ts/function-call-spacing": [
168
+ "error",
169
+ "never"
170
+ ],
171
+ "@stylistic/ts/member-delimiter-style": [
172
+ "error",
173
+ {
174
+ "multiline": {
175
+ "delimiter": "semi",
176
+ "requireLast": true
177
+ },
178
+ "singleline": {
179
+ "delimiter": "semi",
180
+ "requireLast": true
181
+ },
182
+ "multilineDetection": "brackets"
183
+ }
184
+ ],
185
+ "@typescript-eslint/member-ordering": [
186
+ "error",
187
+ {
188
+ "default": [
189
+ // Index signature
190
+ "signature",
191
+ // Fields
192
+ "private-static-field",
193
+ "protected-static-field",
194
+ "public-static-field",
195
+ // "private-decorated-field",
196
+ // "protected-decorated-field",
197
+ // "public-decorated-field",
198
+ "private-instance-field",
199
+ "protected-instance-field",
200
+ "public-instance-field",
201
+ // "public-abstract-field",
202
+ // "protected-abstract-field",
203
+ // "private-abstract-field",
204
+ // "private-field",
205
+ // "protected-field",
206
+ // "public-field",
207
+ // "static-field",
208
+ // "instance-field",
209
+ // "abstract-field",
210
+ // "decorated-field",
211
+ // "field",
212
+ // Getters
213
+ // "public-static-get",
214
+ // "protected-static-get",
215
+ // "private-static-get",
216
+ // "public-decorated-get",
217
+ // "protected-decorated-get",
218
+ // "private-decorated-get",
219
+ // "public-instance-get",
220
+ // "protected-instance-get",
221
+ // "private-instance-get",
222
+ // "public-abstract-get",
223
+ // "protected-abstract-get",
224
+ // "private-abstract-get",
225
+ // "public-get",
226
+ // "protected-get",
227
+ // "private-get",
228
+ // "static-get",
229
+ // "instance-get",
230
+ // "abstract-get",
231
+ // "decorated-get",
232
+ // "get",
233
+ // Setters
234
+ // "public-static-set",
235
+ // "protected-static-set",
236
+ // "private-static-set",
237
+ // "public-decorated-set",
238
+ // "protected-decorated-set",
239
+ // "private-decorated-set",
240
+ // "public-instance-set",
241
+ // "protected-instance-set",
242
+ // "private-instance-set",
243
+ // "public-abstract-set",
244
+ // "protected-abstract-set",
245
+ // "private-abstract-set",
246
+ // "public-set",
247
+ // "protected-set",
248
+ // "private-set",
249
+ // "static-set",
250
+ // "instance-set",
251
+ // "abstract-set",
252
+ // "decorated-set",
253
+ // "set",
254
+ // [
255
+ // "get",
256
+ // "set"
257
+ // ],
258
+ [
259
+ "private-static-get",
260
+ "private-static-set"
261
+ ],
262
+ [
263
+ "protected-static-get",
264
+ "protected-static-set"
265
+ ],
266
+ [
267
+ "public-static-get",
268
+ "public-static-set"
269
+ ],
270
+ [
271
+ "private-instance-get",
272
+ "private-instance-set"
273
+ ],
274
+ [
275
+ "protected-instance-get",
276
+ "protected-instance-set"
277
+ ],
278
+ [
279
+ "public-instance-get",
280
+ "public-instance-set"
281
+ ],
282
+ // Constructors
283
+ "public-constructor",
284
+ "protected-constructor",
285
+ "private-constructor",
286
+ // "constructor",
287
+ // Methods
288
+ "public-static-method",
289
+ "protected-static-method",
290
+ "private-static-method",
291
+ // "public-decorated-method",
292
+ // "protected-decorated-method",
293
+ // "private-decorated-method",
294
+ "public-instance-method",
295
+ "protected-instance-method",
296
+ "private-instance-method"
297
+ // "public-abstract-method",
298
+ // "protected-abstract-method",
299
+ // "private-abstract-method",
300
+ // "public-method",
301
+ // "protected-method",
302
+ // "private-method",
303
+ // "static-method",
304
+ // "instance-method",
305
+ // "abstract-method",
306
+ // "decorated-method",
307
+ // "method"
308
+ ]
309
+ }
310
+ ],
311
+ "@typescript-eslint/method-signature-style": [
312
+ "error",
313
+ "method"
314
+ ],
315
+ "@typescript-eslint/naming-convention": [
316
+ "error",
317
+ {
318
+ "selector": "memberLike",
319
+ "modifiers": [
320
+ "private"
321
+ ],
322
+ "format": [
323
+ "camelCase"
324
+ ],
325
+ "leadingUnderscore": "require"
326
+ }
327
+ ],
328
+ "@typescript-eslint/no-confusing-non-null-assertion": "error",
329
+ "@typescript-eslint/no-confusing-void-expression": [
330
+ "error",
331
+ {
332
+ "ignoreArrowShorthand": true
333
+ }
334
+ ],
335
+ "no-dupe-class-members": "off",
336
+ "@typescript-eslint/no-dupe-class-members": "error",
337
+ "@typescript-eslint/no-duplicate-enum-values": "error",
338
+ "no-duplicate-imports": "error",
339
+ "no-empty-function": "off",
340
+ "@typescript-eslint/no-empty-function": [
341
+ "error",
342
+ {
343
+ "allow": [
344
+ "private-constructors"
345
+ ]
346
+ }
347
+ ],
348
+ "@typescript-eslint/no-explicit-any": "off",
349
+ "@typescript-eslint/no-extra-non-null-assertion": "error",
350
+ "no-extra-parens": "off",
351
+ "@/no-extra-parens": [
352
+ "error",
353
+ "all",
354
+ {
355
+ "nestedBinaryExpressions": false
356
+ }
357
+ ],
358
+ "no-extra-semi": "off",
359
+ "@/no-extra-semi": "error",
360
+ "@typescript-eslint/no-floating-promises": "error",
361
+ "@typescript-eslint/no-for-in-array": "error",
362
+ "no-implied-eval": "off",
363
+ "@typescript-eslint/no-implied-eval": "error",
364
+ "no-invalid-this": "off",
365
+ "@typescript-eslint/no-invalid-this": "error",
366
+ "@typescript-eslint/no-invalid-void-type": "error",
367
+ "no-loop-func": "off",
368
+ "@typescript-eslint/no-loop-func": "error",
369
+ "no-loss-of-precision": "off",
370
+ "@typescript-eslint/no-loss-of-precision": "error",
371
+ "@typescript-eslint/no-meaningless-void-operator": "error",
372
+ "@typescript-eslint/no-misused-new": "error",
373
+ "@typescript-eslint/no-misused-promises": "error",
374
+ "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
375
+ "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
376
+ "@typescript-eslint/no-non-null-assertion": "off",
377
+ "no-redeclare": "off",
378
+ "@typescript-eslint/no-redeclare": "error",
379
+ "@typescript-eslint/no-this-alias": "error",
380
+ "no-throw-literal": "error",
381
+ "@typescript-eslint/no-unnecessary-condition": [
382
+ "error",
383
+ {
384
+ "allowConstantLoopConditions": true
385
+ }
386
+ ],
387
+ "@typescript-eslint/no-unnecessary-type-assertion": "error",
388
+ "@typescript-eslint/no-unnecessary-type-constraint": "error",
389
+ "@typescript-eslint/no-unsafe-call": "error",
390
+ "@typescript-eslint/no-unsafe-return": "error",
391
+ "no-unused-expressions": "off",
392
+ "@typescript-eslint/no-unused-expressions": "error",
393
+ "no-unused-vars": "off",
394
+ "@typescript-eslint/no-unused-vars": "off",
395
+ "no-use-before-define": "off",
396
+ "@typescript-eslint/no-use-before-define": "off",
397
+ "no-useless-constructor": "off",
398
+ "@typescript-eslint/no-useless-constructor": "error",
399
+ "@typescript-eslint/no-useless-empty-export": "error",
400
+ "@typescript-eslint/no-var-requires": "off",
401
+ "@typescript-eslint/parameter-properties": "error",
402
+ "@typescript-eslint/prefer-enum-initializers": "error",
403
+ "@typescript-eslint/prefer-includes": "error",
404
+ "@typescript-eslint/prefer-literal-enum-member": "error",
405
+ "@typescript-eslint/prefer-readonly": "error",
406
+ "@typescript-eslint/prefer-reduce-type-parameter": "error",
407
+ "@typescript-eslint/prefer-string-starts-ends-with": "error",
408
+ "@typescript-eslint/prefer-ts-expect-error": "error",
409
+ "@typescript-eslint/require-array-sort-compare": "error",
410
+ "no-return-await": "off",
411
+ "@typescript-eslint/return-await": "error",
412
+ "semi": "off",
413
+ "@stylistic/ts/semi": "error",
414
+ "@typescript-eslint/unbound-method": "error",
415
+ "@typescript-eslint/no-require-imports": [
416
+ "error",
417
+ {
418
+ allow: ["/.*-view.html$"]
419
+ }
420
+ ]
421
+ }
422
+ }
423
+ );
424
+
425
+
426
+
427
+ // export default [
428
+ // {
429
+ // ignores: ["dist/**", "node_modules/**", "**/*.js", "**/*.map"]
430
+ // },
431
+ // {
432
+ // files: ["**/*.ts"],
433
+ // languageOptions: {
434
+ // parser: tsParser,
435
+ // parserOptions: {
436
+ // project: "./tsconfig.json",
437
+ // ecmaVersion: "latest",
438
+ // sourceType: "module"
439
+ // }
440
+ // },
441
+ // plugins: {
442
+ // "@typescript-eslint": tsEslint,
443
+ // "require-extensions": requireExtensions
444
+ // },
445
+ // rules: {
446
+ // // Base ESLint recommended rules
447
+ // ...js.configs.recommended.rules,
448
+ // // TypeScript ESLint recommended rules
449
+ // ...tsEslint.configs.recommended.rules,
450
+ // ...tsEslint.configs["eslint-recommended"].overrides[0].rules,
451
+ // // Require extensions recommended rules
452
+ // ...requireExtensions.configs.recommended.rules,
453
+
454
+ // // Your custom rules
455
+ // "quotes": "off",
456
+ // "@typescript-eslint/quotes": ["error", "double", { allowTemplateLiterals: true }],
457
+ // "no-eval": "error",
458
+ // "no-void": "error",
459
+ // "no-with": "error",
460
+ // "@typescript-eslint/adjacent-overload-signatures": "error",
461
+ // "@typescript-eslint/array-type": ["error", { default: "generic", readonly: "generic" }],
462
+ // "@typescript-eslint/await-thenable": "error",
463
+ // "@typescript-eslint/ban-ts-comment": ["error", {
464
+ // "ts-expect-error": "allow-with-description",
465
+ // "ts-ignore": "allow-with-description",
466
+ // "ts-nocheck": true,
467
+ // "ts-check": true
468
+ // }],
469
+ // "@typescript-eslint/ban-tslint-comment": "error",
470
+ // "@typescript-eslint/ban-types": ["error", {
471
+ // extendDefaults: false,
472
+ // types: {
473
+ // "String": { message: "Use string instead", fixWith: "string" },
474
+ // "Boolean": { message: "Use boolean instead", fixWith: "boolean" },
475
+ // "Number": { message: "Use number instead", fixWith: "number" },
476
+ // "Symbol": { message: "Use symbol instead", fixWith: "symbol" }
477
+ // }
478
+ // }],
479
+ // "brace-style": "off",
480
+ // "@typescript-eslint/brace-style": ["error", "allman", { allowSingleLine: true }],
481
+ // "@typescript-eslint/class-literal-property-style": ["off", "getters"],
482
+ // "comma-dangle": "off",
483
+ // "@typescript-eslint/comma-dangle": ["error", "never"],
484
+ // "default-param-last": "off",
485
+ // "@typescript-eslint/default-param-last": "error",
486
+ // "@typescript-eslint/explicit-function-return-type": "error",
487
+ // "@typescript-eslint/explicit-member-accessibility": "error",
488
+ // "@typescript-eslint/explicit-module-boundary-types": "error",
489
+ // "func-call-spacing": "off",
490
+ // "@typescript-eslint/func-call-spacing": ["error", "never"],
491
+ // "@typescript-eslint/member-delimiter-style": ["error", {
492
+ // multiline: { delimiter: "semi", requireLast: true },
493
+ // singleline: { delimiter: "semi", requireLast: true },
494
+ // multilineDetection: "brackets"
495
+ // }],
496
+ // "@typescript-eslint/member-ordering": ["error", {
497
+ // default: [
498
+ // "signature",
499
+ // "private-static-field",
500
+ // "protected-static-field",
501
+ // "public-static-field",
502
+ // "private-instance-field",
503
+ // "protected-instance-field",
504
+ // "public-instance-field",
505
+ // ["private-static-get", "private-static-set"],
506
+ // ["protected-static-get", "protected-static-set"],
507
+ // ["public-static-get", "public-static-set"],
508
+ // ["private-instance-get", "private-instance-set"],
509
+ // ["protected-instance-get", "protected-instance-set"],
510
+ // ["public-instance-get", "public-instance-set"],
511
+ // "public-constructor",
512
+ // "protected-constructor",
513
+ // "private-constructor",
514
+ // "public-static-method",
515
+ // "protected-static-method",
516
+ // "private-static-method",
517
+ // "public-instance-method",
518
+ // "protected-instance-method",
519
+ // "private-instance-method"
520
+ // ]
521
+ // }],
522
+ // "@typescript-eslint/method-signature-style": ["error", "method"],
523
+ // "@typescript-eslint/naming-convention": ["error", {
524
+ // selector: "memberLike",
525
+ // modifiers: ["private"],
526
+ // format: ["camelCase"],
527
+ // leadingUnderscore: "require"
528
+ // }],
529
+ // "@typescript-eslint/no-confusing-non-null-assertion": "error",
530
+ // "@typescript-eslint/no-confusing-void-expression": ["error", { ignoreArrowShorthand: true }],
531
+ // "no-dupe-class-members": "off",
532
+ // "@typescript-eslint/no-dupe-class-members": "error",
533
+ // "@typescript-eslint/no-duplicate-enum-values": "error",
534
+ // "no-duplicate-imports": "error",
535
+ // "no-empty-function": "off",
536
+ // "@typescript-eslint/no-empty-function": ["error", { allow: ["private-constructors"] }],
537
+ // "@typescript-eslint/no-explicit-any": "off",
538
+ // "@typescript-eslint/no-extra-non-null-assertion": "error",
539
+ // "no-extra-parens": "off",
540
+ // "@typescript-eslint/no-extra-parens": ["error", "all", { nestedBinaryExpressions: false }],
541
+ // "no-extra-semi": "off",
542
+ // "@typescript-eslint/no-extra-semi": "error",
543
+ // "@typescript-eslint/no-floating-promises": "error",
544
+ // "@typescript-eslint/no-for-in-array": "error",
545
+ // "no-implied-eval": "off",
546
+ // "@typescript-eslint/no-implied-eval": "error",
547
+ // "no-invalid-this": "off",
548
+ // "@typescript-eslint/no-invalid-this": "error",
549
+ // "@typescript-eslint/no-invalid-void-type": "error",
550
+ // "no-loop-func": "off",
551
+ // "@typescript-eslint/no-loop-func": "error",
552
+ // "no-loss-of-precision": "off",
553
+ // "@typescript-eslint/no-loss-of-precision": "error",
554
+ // "@typescript-eslint/no-meaningless-void-operator": "error",
555
+ // "@typescript-eslint/no-misused-new": "error",
556
+ // "@typescript-eslint/no-misused-promises": "error",
557
+ // "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
558
+ // "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
559
+ // "@typescript-eslint/no-non-null-assertion": "off",
560
+ // "no-redeclare": "off",
561
+ // "@typescript-eslint/no-redeclare": "error",
562
+ // "@typescript-eslint/no-this-alias": "error",
563
+ // "@typescript-eslint/no-throw-literal": "error",
564
+ // "@typescript-eslint/no-unnecessary-condition": ["error", { allowConstantLoopConditions: true }],
565
+ // "@typescript-eslint/no-unnecessary-type-assertion": "error",
566
+ // "@typescript-eslint/no-unnecessary-type-constraint": "error",
567
+ // "@typescript-eslint/no-unsafe-call": "error",
568
+ // "@typescript-eslint/no-unsafe-return": "error",
569
+ // "no-unused-expressions": "off",
570
+ // "@typescript-eslint/no-unused-expressions": "error",
571
+ // "no-unused-vars": "off",
572
+ // "@typescript-eslint/no-unused-vars": "off",
573
+ // "no-use-before-define": "off",
574
+ // "@typescript-eslint/no-use-before-define": "off",
575
+ // "no-useless-constructor": "off",
576
+ // "@typescript-eslint/no-useless-constructor": "error",
577
+ // "@typescript-eslint/no-useless-empty-export": "error",
578
+ // "@typescript-eslint/no-var-requires": "off",
579
+ // "@typescript-eslint/parameter-properties": "error",
580
+ // "@typescript-eslint/prefer-enum-initializers": "error",
581
+ // "@typescript-eslint/prefer-includes": "error",
582
+ // "@typescript-eslint/prefer-literal-enum-member": "error",
583
+ // "@typescript-eslint/prefer-readonly": "error",
584
+ // "@typescript-eslint/prefer-reduce-type-parameter": "error",
585
+ // "@typescript-eslint/prefer-string-starts-ends-with": "error",
586
+ // "@typescript-eslint/prefer-ts-expect-error": "error",
587
+ // "@typescript-eslint/require-array-sort-compare": "error",
588
+ // "no-return-await": "off",
589
+ // "@typescript-eslint/return-await": "error",
590
+ // "semi": "off",
591
+ // "@typescript-eslint/semi": "error",
592
+ // "@typescript-eslint/unbound-method": "error"
593
+ // }
594
+ // }
595
+ // ];
596
+
package/package.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "@nivinjoseph/n-date",
3
+ "version": "1.0.1",
4
+ "description": "Date utility functions",
5
+ "packageManager": "yarn@4.14.1",
6
+ "type": "module",
7
+ "exports": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "scripts": {
10
+ "ts-compile": "tsc -p .",
11
+ "ts-lint": "eslint . --ext .ts",
12
+ "ts-build": "yarn ts-compile && yarn ts-lint",
13
+ "ts-build-dist": "yarn ts-build && tsc -p ./dist",
14
+ "test": "yarn ts-build && node --test --enable-source-maps ./test/**/*.test.js",
15
+ "clean-src": "find ./src -name '*.js' -delete -o -name '*.map' -delete",
16
+ "clean-test": "find ./test -name '*.js' -delete -o -name '*.map' -delete",
17
+ "publish-package": "yarn ts-build-dist && git add . && git commit -m 'preparing to publish new version' && yarn version patch && git add . && git commit -m 'new version' && git push && npm publish --access=public"
18
+ },
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/nivinjoseph/n-date.git"
22
+ },
23
+ "keywords": [
24
+ "date"
25
+ ],
26
+ "author": "NiviN",
27
+ "license": "MIT",
28
+ "bugs": {
29
+ "url": "https://github.com/nivinjoseph/n-date/issues"
30
+ },
31
+ "homepage": "https://github.com/nivinjoseph/n-date#readme",
32
+ "devDependencies": {
33
+ "@eslint/js": "10.0.1",
34
+ "@stylistic/eslint-plugin": "5.10.0",
35
+ "@types/luxon": "3.7.1",
36
+ "@types/mustache": "4.2.6",
37
+ "@types/node": "24.10",
38
+ "@types/sanitize-html": "2.16.1",
39
+ "eslint": "10.2.1",
40
+ "eslint-import-resolver-typescript": "4.4.4",
41
+ "eslint-plugin-import": "2.32.0",
42
+ "typescript": "6.0.3",
43
+ "typescript-eslint": "8.58.2"
44
+ },
45
+ "dependencies": {
46
+ "@nivinjoseph/n-defensive": "2.0.3",
47
+ "@nivinjoseph/n-exception": "2.0.3",
48
+ "@nivinjoseph/n-ext": "2.0.5",
49
+ "@nivinjoseph/n-util": "4.0.1",
50
+ "luxon": "3.7.2",
51
+ "tslib": "2.8.1"
52
+ },
53
+ "engineStrict": true,
54
+ "engines": {
55
+ "node": ">=24.10"
56
+ }
57
+ }