corebasic 1.0.211 → 1.0.213

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 (167) hide show
  1. package/dist/index.js +10 -0
  2. package/dist/libs/ObjectId.js +114 -0
  3. package/dist/libs/auth.js +103 -0
  4. package/dist/libs/compression.js +11 -0
  5. package/dist/libs/cpp.js +154 -0
  6. package/dist/libs/dip/suffix/date.js +89 -0
  7. package/dist/libs/dip/suffix/index.js +227 -0
  8. package/dist/libs/dip/suffix/policy.js +113 -0
  9. package/dist/libs/dip/suffix/query.js +279 -0
  10. package/dist/libs/dip/suffix/suffix.js +99 -0
  11. package/dist/libs/dip/suffix/tests/date.test.js +187 -0
  12. package/dist/libs/dip/suffix/tests/index.test.js +441 -0
  13. package/dist/libs/dip/suffix/tests/policy.applySuffixPolicy.test.js +489 -0
  14. package/dist/libs/dip/suffix/tests/policy.test.js +329 -0
  15. package/dist/libs/dip/suffix/tests/suffix.test.js +316 -0
  16. package/dist/libs/dip.js +102 -0
  17. package/dist/libs/dipper.js +73 -0
  18. package/dist/libs/elabase.js +656 -0
  19. package/dist/libs/features.js +366 -0
  20. package/dist/libs/kafka.js +121 -0
  21. package/dist/libs/messaging.js +130 -0
  22. package/dist/libs/mobilecodes.js +562 -0
  23. package/dist/libs/session.js +96 -0
  24. package/dist/libs/utils.js +297 -0
  25. package/index.ts +23 -0
  26. package/libs/{auth.js → auth.ts} +3 -3
  27. package/libs/{compression.js → compression.ts} +1 -1
  28. package/libs/dip/suffix/date.ts +121 -0
  29. package/libs/dip/suffix/{index.js → index.ts} +7 -18
  30. package/libs/dip/suffix/{policy.js → policy.ts} +2 -2
  31. package/libs/dip/suffix/{suffix.js → suffix.ts} +2 -2
  32. package/libs/dip/suffix/tests/{date.test.js → date.test.ts} +1 -1
  33. package/libs/dip/suffix/tests/{index.test.js → index.test.ts} +1 -1
  34. package/libs/dip/suffix/tests/{policy.applySuffixPolicy.test.js → policy.applySuffixPolicy.test.ts} +1 -1
  35. package/libs/dip/suffix/tests/{policy.test.js → policy.test.ts} +1 -1
  36. package/libs/dip/suffix/tests/{suffix.test.js → suffix.test.ts} +1 -1
  37. package/libs/{dip.js → dip.ts} +1 -1
  38. package/libs/{elabase.js → elabase.ts} +4 -4
  39. package/libs/{features.js → features.ts} +5 -5
  40. package/libs/{messaging.js → messaging.ts} +1 -1
  41. package/libs/{session.js → session.ts} +2 -2
  42. package/libs/{utils.js → utils.ts} +80 -9
  43. package/package.json +3 -2
  44. package/tsc/@typescript/typescript-linux-x64/LICENSE +55 -0
  45. package/tsc/@typescript/typescript-linux-x64/NOTICE.txt +436 -0
  46. package/tsc/@typescript/typescript-linux-x64/README.md +3 -0
  47. package/tsc/@typescript/typescript-linux-x64/lib/lib.d.ts +20 -0
  48. package/tsc/@typescript/typescript-linux-x64/lib/lib.decorators.d.ts +382 -0
  49. package/tsc/@typescript/typescript-linux-x64/lib/lib.decorators.legacy.d.ts +20 -0
  50. package/tsc/@typescript/typescript-linux-x64/lib/lib.dom.asynciterable.d.ts +18 -0
  51. package/tsc/@typescript/typescript-linux-x64/lib/lib.dom.d.ts +45125 -0
  52. package/tsc/@typescript/typescript-linux-x64/lib/lib.dom.iterable.d.ts +18 -0
  53. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2015.collection.d.ts +159 -0
  54. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2015.core.d.ts +595 -0
  55. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2015.d.ts +26 -0
  56. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2015.generator.d.ts +75 -0
  57. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2015.iterable.d.ts +603 -0
  58. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2015.promise.d.ts +79 -0
  59. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2015.proxy.d.ts +126 -0
  60. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2015.reflect.d.ts +142 -0
  61. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2015.symbol.d.ts +44 -0
  62. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2015.symbol.wellknown.d.ts +324 -0
  63. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2016.array.include.d.ts +114 -0
  64. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2016.d.ts +19 -0
  65. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2016.full.d.ts +21 -0
  66. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2016.intl.d.ts +29 -0
  67. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2017.arraybuffer.d.ts +19 -0
  68. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2017.d.ts +24 -0
  69. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2017.date.d.ts +29 -0
  70. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2017.full.d.ts +21 -0
  71. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2017.intl.d.ts +42 -0
  72. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2017.object.d.ts +47 -0
  73. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2017.sharedmemory.d.ts +133 -0
  74. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2017.string.d.ts +47 -0
  75. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2017.typedarrays.d.ts +51 -0
  76. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2018.asyncgenerator.d.ts +75 -0
  77. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2018.asynciterable.d.ts +51 -0
  78. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2018.d.ts +22 -0
  79. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2018.full.d.ts +22 -0
  80. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2018.intl.d.ts +81 -0
  81. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2018.promise.d.ts +28 -0
  82. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2018.regexp.d.ts +35 -0
  83. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2019.array.d.ts +77 -0
  84. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2019.d.ts +22 -0
  85. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2019.full.d.ts +22 -0
  86. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2019.intl.d.ts +21 -0
  87. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2019.object.d.ts +31 -0
  88. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2019.string.d.ts +35 -0
  89. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2019.symbol.d.ts +22 -0
  90. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2020.bigint.d.ts +763 -0
  91. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2020.d.ts +25 -0
  92. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2020.date.d.ts +40 -0
  93. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2020.full.d.ts +22 -0
  94. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2020.intl.d.ts +472 -0
  95. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2020.number.d.ts +26 -0
  96. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2020.promise.d.ts +45 -0
  97. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2020.sharedmemory.d.ts +97 -0
  98. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2020.string.d.ts +42 -0
  99. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2020.symbol.wellknown.d.ts +39 -0
  100. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2021.d.ts +21 -0
  101. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2021.full.d.ts +22 -0
  102. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2021.intl.d.ts +164 -0
  103. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2021.promise.d.ts +46 -0
  104. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2021.string.d.ts +31 -0
  105. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2021.weakref.d.ts +76 -0
  106. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2022.array.d.ts +119 -0
  107. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2022.d.ts +23 -0
  108. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2022.error.d.ts +73 -0
  109. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2022.full.d.ts +22 -0
  110. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2022.intl.d.ts +143 -0
  111. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2022.object.d.ts +24 -0
  112. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2022.regexp.d.ts +37 -0
  113. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2022.string.d.ts +23 -0
  114. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2023.array.d.ts +922 -0
  115. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2023.collection.d.ts +19 -0
  116. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2023.d.ts +20 -0
  117. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2023.full.d.ts +22 -0
  118. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2023.intl.d.ts +62 -0
  119. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2024.arraybuffer.d.ts +63 -0
  120. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2024.collection.d.ts +27 -0
  121. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2024.d.ts +24 -0
  122. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2024.full.d.ts +22 -0
  123. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2024.object.d.ts +27 -0
  124. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2024.promise.d.ts +33 -0
  125. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2024.regexp.d.ts +23 -0
  126. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2024.sharedmemory.d.ts +66 -0
  127. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2024.string.d.ts +27 -0
  128. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2025.collection.d.ts +94 -0
  129. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2025.d.ts +23 -0
  130. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2025.float16.d.ts +443 -0
  131. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2025.full.d.ts +22 -0
  132. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2025.intl.d.ts +200 -0
  133. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2025.iterator.d.ts +146 -0
  134. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2025.promise.d.ts +32 -0
  135. package/tsc/@typescript/typescript-linux-x64/lib/lib.es2025.regexp.d.ts +30 -0
  136. package/tsc/@typescript/typescript-linux-x64/lib/lib.es5.d.ts +4599 -0
  137. package/tsc/@typescript/typescript-linux-x64/lib/lib.es6.d.ts +21 -0
  138. package/tsc/@typescript/typescript-linux-x64/lib/lib.esnext.array.d.ts +33 -0
  139. package/tsc/@typescript/typescript-linux-x64/lib/lib.esnext.collection.d.ts +47 -0
  140. package/tsc/@typescript/typescript-linux-x64/lib/lib.esnext.d.ts +27 -0
  141. package/tsc/@typescript/typescript-linux-x64/lib/lib.esnext.date.d.ts +21 -0
  142. package/tsc/@typescript/typescript-linux-x64/lib/lib.esnext.decorators.d.ts +26 -0
  143. package/tsc/@typescript/typescript-linux-x64/lib/lib.esnext.disposable.d.ts +191 -0
  144. package/tsc/@typescript/typescript-linux-x64/lib/lib.esnext.error.d.ts +22 -0
  145. package/tsc/@typescript/typescript-linux-x64/lib/lib.esnext.full.d.ts +22 -0
  146. package/tsc/@typescript/typescript-linux-x64/lib/lib.esnext.intl.d.ts +107 -0
  147. package/tsc/@typescript/typescript-linux-x64/lib/lib.esnext.sharedmemory.d.ts +23 -0
  148. package/tsc/@typescript/typescript-linux-x64/lib/lib.esnext.temporal.d.ts +485 -0
  149. package/tsc/@typescript/typescript-linux-x64/lib/lib.esnext.typedarrays.d.ts +90 -0
  150. package/tsc/@typescript/typescript-linux-x64/lib/lib.scripthost.d.ts +320 -0
  151. package/tsc/@typescript/typescript-linux-x64/lib/lib.webworker.asynciterable.d.ts +18 -0
  152. package/tsc/@typescript/typescript-linux-x64/lib/lib.webworker.d.ts +15606 -0
  153. package/tsc/@typescript/typescript-linux-x64/lib/lib.webworker.importscripts.d.ts +21 -0
  154. package/tsc/@typescript/typescript-linux-x64/lib/lib.webworker.iterable.d.ts +18 -0
  155. package/tsc/@typescript/typescript-linux-x64/lib/tsc +0 -0
  156. package/tsc/@typescript/typescript-linux-x64/lib/tsc.sig +11 -0
  157. package/tsc/@typescript/typescript-linux-x64/package.json +45 -0
  158. package/tsc/notes +14 -0
  159. package/tsconfig.json +48 -0
  160. package/index.js +0 -23
  161. package/libs/dip/suffix/date.js +0 -103
  162. /package/libs/{ObjectId.js → ObjectId.ts} +0 -0
  163. /package/libs/{cpp.js → cpp.ts} +0 -0
  164. /package/libs/dip/suffix/{query.js → query.ts} +0 -0
  165. /package/libs/{dipper.js → dipper.ts} +0 -0
  166. /package/libs/{kafka.js → kafka.ts} +0 -0
  167. /package/libs/{mobilecodes.js → mobilecodes.ts} +0 -0
@@ -0,0 +1,21 @@
1
+ /*! *****************************************************************************
2
+ Copyright (c) Microsoft Corporation. All rights reserved.
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
+ this file except in compliance with the License. You may obtain a copy of the
5
+ License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
+ MERCHANTABILITY OR NON-INFRINGEMENT.
11
+
12
+ See the Apache Version 2.0 License for specific language governing permissions
13
+ and limitations under the License.
14
+ ***************************************************************************** */
15
+
16
+
17
+ /////////////////////////////
18
+ /// WorkerGlobalScope APIs
19
+ /////////////////////////////
20
+ // These are only available in a Web Worker
21
+ declare function importScripts(...urls: string[]): void;
@@ -0,0 +1,18 @@
1
+ /*! *****************************************************************************
2
+ Copyright (c) Microsoft Corporation. All rights reserved.
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
+ this file except in compliance with the License. You may obtain a copy of the
5
+ License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
+ MERCHANTABILITY OR NON-INFRINGEMENT.
11
+
12
+ See the Apache Version 2.0 License for specific language governing permissions
13
+ and limitations under the License.
14
+ ***************************************************************************** */
15
+
16
+
17
+ // This file's contents are now included in the main types file.
18
+ // The file has been left for backward compatibility.
@@ -0,0 +1,11 @@
1
+ -----BEGIN PGP SIGNATURE-----
2
+ Version: BSN Pgp v1.0.0.0
3
+
4
+ iQEcBAABCAAGBQJqTebQAAoJEOs+lK2+EinPblgH/2BOzf1BzBVbTd3OXCX29bdK
5
+ 5uN+q3moUGjznK/FknvlEqlhxo7V7BX+kgTbL2WGcsmcq4jx1zcEDAQkjJM8xDlh
6
+ arpq1acM9rFWRbVyMwSUspKtOqNO83Rtk4WvPO90edmxdbVnOgHSMRNnvMbJCq0B
7
+ cQkVjNQEUu1WZJ0xdC154JmvqVoyJDz+kkN0iDocrKDNPI9uEaHmnAO7+yBItU3D
8
+ 59IBlL6l6Wwx2vyLDyy/ns534wX8STJSsByz86cCr9pWtugSahC6seXhNflpDFZq
9
+ O3N+VtgpoHbBYRwXAtIbqqlR6Y04O2TCaYlxRoyYZwkCVd3RSTw6rCsHwB26QbQ=
10
+ =y9Bn
11
+ -----END PGP SIGNATURE-----
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "@typescript/typescript-linux-x64",
3
+ "version": "7.0.2",
4
+ "license": "Apache-2.0",
5
+ "author": "Microsoft Corp.",
6
+ "homepage": "https://www.typescriptlang.org/",
7
+ "description": "TypeScript is a language for application scale JavaScript development",
8
+ "keywords": [
9
+ "TypeScript",
10
+ "Microsoft",
11
+ "compiler",
12
+ "language",
13
+ "javascript"
14
+ ],
15
+ "bugs": {
16
+ "url": "https://github.com/microsoft/TypeScript/issues"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "https://github.com/microsoft/TypeScript.git"
21
+ },
22
+ "type": "module",
23
+ "preferUnplugged": true,
24
+ "engines": {
25
+ "node": ">=16.20.0"
26
+ },
27
+ "files": [
28
+ "lib",
29
+ "NOTICE.txt"
30
+ ],
31
+ "exports": {
32
+ "./package.json": "./package.json"
33
+ },
34
+ "gitHead": "2bd066d87f5bafd315be9f40889d0a60b9e58e0b",
35
+ "publishConfig": {
36
+ "access": "public",
37
+ "tag": "latest"
38
+ },
39
+ "os": [
40
+ "linux"
41
+ ],
42
+ "cpu": [
43
+ "x64"
44
+ ]
45
+ }
package/tsc/notes ADDED
@@ -0,0 +1,14 @@
1
+
2
+
3
+ # Install
4
+ npm install typescript
5
+ cp node_modules/@typescript .
6
+
7
+ rm -rf node_modules
8
+ git checkout .
9
+
10
+
11
+
12
+ # Run From corebasic root folder
13
+ ./tsc/@typescript/typescript-linux-x64/lib/tsc
14
+
package/tsconfig.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ // Visit https://aka.ms/tsconfig to read more about this file
3
+ "compilerOptions": {
4
+
5
+ "rewriteRelativeImportExtensions": true,
6
+
7
+
8
+ // File Layout
9
+ "rootDir": ".",
10
+ "outDir": "./dist",
11
+
12
+ // Environment Settings
13
+ // See also https://aka.ms/tsconfig/module
14
+ "module": "nodenext",
15
+ "target": "esnext",
16
+ // "types": [],
17
+ // For nodejs:
18
+ // "lib": ["esnext"],
19
+ // "types": ["node"],
20
+ // and npm install -D @types/node
21
+
22
+ // Other Outputs
23
+ "sourceMap": false,
24
+ "declaration": false,
25
+ "declarationMap": false,
26
+
27
+ // Stricter Typechecking Options
28
+ "noUncheckedIndexedAccess": false,
29
+ "exactOptionalPropertyTypes": false,
30
+
31
+ // Style Options
32
+ // "noImplicitReturns": true,
33
+ // "noImplicitOverride": true,
34
+ // "noUnusedLocals": true,
35
+ // "noUnusedParameters": true,
36
+ // "noFallthroughCasesInSwitch": true,
37
+ // "noPropertyAccessFromIndexSignature": true,
38
+
39
+ // Recommended Options
40
+ "strict": false,
41
+ "jsx": "react-jsx",
42
+ "verbatimModuleSyntax": true,
43
+ "isolatedModules": true,
44
+ "noUncheckedSideEffectImports": true,
45
+ "moduleDetection": "force",
46
+ "skipLibCheck": true,
47
+ }
48
+ }
package/index.js DELETED
@@ -1,23 +0,0 @@
1
-
2
-
3
- import * as Elabase from './libs/elabase.js'
4
- import * as Dip from './libs/dip.js'
5
- import * as Kafka from './libs/kafka.js'
6
- import * as Utils from './libs/utils.js'
7
- import * as Session from './libs/session.js'
8
- import * as Auth from './libs/auth.js'
9
- import * as Features from './libs/features.js'
10
- import * as Messaging from './libs/messaging.js'
11
- import * as Compression from './libs/compression.js'
12
-
13
- export {
14
- Elabase,
15
- Dip,
16
- Kafka,
17
- Utils,
18
- Session,
19
- Auth,
20
- Features,
21
- Messaging,
22
- Compression
23
- }
@@ -1,103 +0,0 @@
1
- import {getNormalizedBounds} from './index.js'
2
-
3
-
4
- const MONTH_SHORT = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
5
- const MONTH_LONG = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
6
-
7
- export function formatDate(value, format) {
8
- const date = new Date(value)
9
-
10
- if (Number.isNaN(date.getTime()))
11
- throw new Error(`Error: Invalid date: ${value} in suffix policy specified for key in Dip`)
12
-
13
-
14
- const day = date.getDate();
15
- const monthIndex = date.getMonth();
16
- const year = date.getFullYear();
17
-
18
- // Pad single digits with a leading zero
19
- const dd = String(day).padStart(2, '0');
20
- const mm = String(monthIndex + 1).padStart(2, '0');
21
- const yy = String(year).slice(-2);
22
-
23
-
24
- // return format
25
- // .replace('YYYY', year)
26
- // .replace('YY', yy)
27
- // .replace('MMMM', MONTH_LONG[monthIndex])
28
- // .replace('MMM', MONTH_SHORT[monthIndex])
29
- // .replace('MM', mm)
30
- // .replace('DD', dd)
31
- // .replace('D', day);
32
-
33
-
34
- const replacements = {
35
- YYYY: String(year),
36
- YY: String(year).slice(-2),
37
- MMMM: MONTH_LONG[monthIndex],
38
- MMM: MONTH_SHORT[monthIndex],
39
- MM: String(monthIndex + 1).padStart(2, "0"),
40
- DD: String(day).padStart(2, "0"),
41
- D: String(day),
42
- };
43
-
44
- return format.replace(/YYYY|MMMM|MMM|YY|MM|DD|D/g, token => replacements[token]);
45
- }
46
-
47
-
48
- // 📋 Supported Formats
49
- // YYYY: 4-digit year (e.g., 2026)
50
- // YY: 2-digit year (e.g., 26)
51
- // MMMM: Full month name (e.g., July)
52
- // MMM: Short month name (e.g., Jul)
53
- // MM: 2-digit padded month (e.g., 07)
54
- // DD: 2-digit padded day (e.g., 09)
55
- // D: Unpadded day (e.g., 9)
56
-
57
-
58
-
59
- // // let a = new Date()
60
- // // let a = "2026-11-1"
61
- // let a = new Date().getTime()
62
- // let b = formatDate(a, "YYYY/DD-MMMM")
63
- // console.log(b)
64
- //
65
-
66
-
67
-
68
- export function fillDates(bounds_t, format) {
69
- const result = [];
70
-
71
- let step;
72
- if (format.includes("D"))
73
- step = "day";
74
- else if (format.includes("M"))
75
- step = "month";
76
- else
77
- step = "year";
78
-
79
- let bounds = { ...bounds_t, from: new Date(bounds_t.from), to: new Date(bounds_t.to) }
80
-
81
- bounds = getNormalizedBounds(bounds, "date", step)
82
-
83
- while (bounds.from <= bounds.to) {
84
- result.push(formatDate(bounds.from, format));
85
-
86
- switch (step) {
87
- case "day":
88
- bounds.from.setDate(bounds.from.getDate() + 1);
89
- break;
90
- case "month":
91
- bounds.from.setMonth(bounds.from.getMonth() + 1);
92
- break;
93
- case "year":
94
- bounds.from.setFullYear(bounds.from.getFullYear() + 1);
95
- break;
96
- }
97
- }
98
-
99
- return [...new Set(result)];
100
- }
101
-
102
-
103
-
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes