@bemoje/cli 0.0.9 → 0.0.11

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 (458) hide show
  1. package/cjs/arg/ArgumentBuilder.js +2 -2
  2. package/cjs/arg/ArgumentBuilder.js.map +1 -1
  3. package/cjs/arg/ArgumentValidatorSelector.js +2 -2
  4. package/cjs/arg/ArgumentValidatorSelector.js.map +1 -1
  5. package/cjs/cmd/CommandBuilder.js +77 -34
  6. package/cjs/cmd/CommandBuilder.js.map +1 -1
  7. package/cjs/cmd/CommandBuilderMetaData.js +2 -2
  8. package/cjs/cmd/CommandBuilderMetaData.js.map +1 -1
  9. package/cjs/core/OutputManager.js +4 -4
  10. package/cjs/core/OutputManager.js.map +1 -1
  11. package/cjs/core/ParserSelector.js +11 -11
  12. package/cjs/core/ParserSelector.js.map +1 -1
  13. package/cjs/core/ValidatorSelector.js +11 -11
  14. package/cjs/core/ValidatorSelector.js.map +1 -1
  15. package/cjs/db/AbstractJsonFileSection.js +2 -3
  16. package/cjs/db/AbstractJsonFileSection.js.map +1 -1
  17. package/cjs/db/ConfigSection.js +3 -4
  18. package/cjs/db/ConfigSection.js.map +1 -1
  19. package/cjs/db/JsonFile.js +5 -6
  20. package/cjs/db/JsonFile.js.map +1 -1
  21. package/cjs/db/PresetsSection.js +2 -2
  22. package/cjs/db/PresetsSection.js.map +1 -1
  23. package/cjs/index.js +0 -77
  24. package/cjs/index.js.map +1 -1
  25. package/cjs/opt/OptionBuilder.js +2 -2
  26. package/cjs/opt/OptionBuilder.js.map +1 -1
  27. package/cjs/opt/OptionHelpers.js +5 -5
  28. package/cjs/opt/OptionHelpers.js.map +1 -1
  29. package/esm/arg/ArgumentBuilder.js +1 -1
  30. package/esm/arg/ArgumentBuilder.js.map +1 -1
  31. package/esm/arg/ArgumentValidatorSelector.js +1 -1
  32. package/esm/arg/ArgumentValidatorSelector.js.map +1 -1
  33. package/esm/cmd/CommandBuilder.js +59 -16
  34. package/esm/cmd/CommandBuilder.js.map +1 -1
  35. package/esm/cmd/CommandBuilderMetaData.js +1 -1
  36. package/esm/cmd/CommandBuilderMetaData.js.map +1 -1
  37. package/esm/core/OutputManager.js +1 -1
  38. package/esm/core/OutputManager.js.map +1 -1
  39. package/esm/core/ParserSelector.js +4 -4
  40. package/esm/core/ParserSelector.js.map +1 -1
  41. package/esm/core/ValidatorSelector.js +4 -4
  42. package/esm/core/ValidatorSelector.js.map +1 -1
  43. package/esm/db/AbstractJsonFileSection.js +1 -2
  44. package/esm/db/AbstractJsonFileSection.js.map +1 -1
  45. package/esm/db/ConfigSection.js +1 -2
  46. package/esm/db/ConfigSection.js.map +1 -1
  47. package/esm/db/JsonFile.js +1 -2
  48. package/esm/db/JsonFile.js.map +1 -1
  49. package/esm/db/PresetsSection.js +1 -1
  50. package/esm/db/PresetsSection.js.map +1 -1
  51. package/esm/index.js +0 -77
  52. package/esm/index.js.map +1 -1
  53. package/esm/opt/OptionBuilder.js +1 -1
  54. package/esm/opt/OptionBuilder.js.map +1 -1
  55. package/esm/opt/OptionHelpers.js +2 -2
  56. package/esm/opt/OptionHelpers.js.map +1 -1
  57. package/package.json +2 -1
  58. package/types/arg/ArgumentParserSelector.d.ts +2 -2
  59. package/types/arg/ArgumentValidatorSelector.d.ts +1 -1
  60. package/types/cmd/CommandBuilder.d.ts +38 -4
  61. package/types/cmd/CommandBuilderMetaData.d.ts +3 -3
  62. package/types/core/OutputManager.d.ts +2 -2
  63. package/types/core/ParserSelector.d.ts +2 -2
  64. package/types/core/ValidatorSelector.d.ts +2 -2
  65. package/types/db/AbstractJsonFileSection.d.ts +2 -3
  66. package/types/db/AppDataSection.d.ts +1 -1
  67. package/types/db/ConfigSection.d.ts +1 -3
  68. package/types/db/JsonFile.d.ts +1 -1
  69. package/types/index.d.ts +0 -77
  70. package/types/opt/OptionArgumentParserSelector.d.ts +1 -1
  71. package/types/opt/OptionArgumentValidatorSelector.d.ts +1 -1
  72. package/types/types/IConfig.d.ts +3 -3
  73. package/types/types/IPreset.d.ts +1 -1
  74. package/cjs/cmd/asdas.js +0 -27
  75. package/cjs/cmd/asdas.js.map +0 -1
  76. package/cjs/util/array/arrLast.js +0 -21
  77. package/cjs/util/array/arrLast.js.map +0 -1
  78. package/cjs/util/array/arrSome.js +0 -26
  79. package/cjs/util/array/arrSome.js.map +0 -1
  80. package/cjs/util/array/types/ArrayPredicate.js +0 -3
  81. package/cjs/util/array/types/ArrayPredicate.js.map +0 -1
  82. package/cjs/util/db/JsonDB.js +0 -145
  83. package/cjs/util/db/JsonDB.js.map +0 -1
  84. package/cjs/util/errors/ErrorParser.js +0 -164
  85. package/cjs/util/errors/ErrorParser.js.map +0 -1
  86. package/cjs/util/fs/promptUserEditInTextEditor/IGetUserInputFromEditorOptions.js +0 -3
  87. package/cjs/util/fs/promptUserEditInTextEditor/IGetUserInputFromEditorOptions.js.map +0 -1
  88. package/cjs/util/fs/promptUserEditInTextEditor/promptUserEditInTextEditorSync.js +0 -32
  89. package/cjs/util/fs/promptUserEditInTextEditor/promptUserEditInTextEditorSync.js.map +0 -1
  90. package/cjs/util/fs/promptUserEditInTextEditor/promptUserEditJsonInTextEditorSync.js +0 -25
  91. package/cjs/util/fs/promptUserEditInTextEditor/promptUserEditJsonInTextEditorSync.js.map +0 -1
  92. package/cjs/util/fs/readFile/readFileSafeSync.js +0 -28
  93. package/cjs/util/fs/readFile/readFileSafeSync.js.map +0 -1
  94. package/cjs/util/fs/readFile/readFileSync.js +0 -20
  95. package/cjs/util/fs/readFile/readFileSync.js.map +0 -1
  96. package/cjs/util/fs/readJsonFile/readJsonFileSafeSync.js +0 -24
  97. package/cjs/util/fs/readJsonFile/readJsonFileSafeSync.js.map +0 -1
  98. package/cjs/util/fs/removeFile/removeFile.js +0 -6
  99. package/cjs/util/fs/removeFile/removeFile.js.map +0 -1
  100. package/cjs/util/fs/tempFile/tempFileSync.js +0 -28
  101. package/cjs/util/fs/tempFile/tempFileSync.js.map +0 -1
  102. package/cjs/util/fs/types/IReadJsonFileOptions.js +0 -3
  103. package/cjs/util/fs/types/IReadJsonFileOptions.js.map +0 -1
  104. package/cjs/util/fs/writeFile/writeFileSafeSync.js +0 -6
  105. package/cjs/util/fs/writeFile/writeFileSafeSync.js.map +0 -1
  106. package/cjs/util/fs/writeFile/writeFileSync.js +0 -6
  107. package/cjs/util/fs/writeFile/writeFileSync.js.map +0 -1
  108. package/cjs/util/fs/writeJsonFile/writeJsonFileSafe.js +0 -6
  109. package/cjs/util/fs/writeJsonFile/writeJsonFileSafe.js.map +0 -1
  110. package/cjs/util/function/MethodDisabler.js +0 -94
  111. package/cjs/util/function/MethodDisabler.js.map +0 -1
  112. package/cjs/util/function/funSetName.js +0 -21
  113. package/cjs/util/function/funSetName.js.map +0 -1
  114. package/cjs/util/node/execInherit.js +0 -19
  115. package/cjs/util/node/execInherit.js.map +0 -1
  116. package/cjs/util/node/formatTableForTerminal.js +0 -21
  117. package/cjs/util/node/formatTableForTerminal.js.map +0 -1
  118. package/cjs/util/object/arrAssign.js +0 -6
  119. package/cjs/util/object/arrAssign.js.map +0 -1
  120. package/cjs/util/object/createArrayMerger.js +0 -20
  121. package/cjs/util/object/createArrayMerger.js.map +0 -1
  122. package/cjs/util/object/createObjectMerger.js +0 -20
  123. package/cjs/util/object/createObjectMerger.js.map +0 -1
  124. package/cjs/util/object/objAssign.js +0 -6
  125. package/cjs/util/object/objAssign.js.map +0 -1
  126. package/cjs/util/object/objUpdatePropertyDescriptors.js +0 -28
  127. package/cjs/util/object/objUpdatePropertyDescriptors.js.map +0 -1
  128. package/cjs/util/object/realizeLazyProperty.js +0 -14
  129. package/cjs/util/object/realizeLazyProperty.js.map +0 -1
  130. package/cjs/util/object/setNonEnumerable.js +0 -25
  131. package/cjs/util/object/setNonEnumerable.js.map +0 -1
  132. package/cjs/util/os/defaultOpenInEditorCommand.js +0 -18
  133. package/cjs/util/os/defaultOpenInEditorCommand.js.map +0 -1
  134. package/cjs/util/os/isOSX.js +0 -13
  135. package/cjs/util/os/isOSX.js.map +0 -1
  136. package/cjs/util/os/isVsCodeInstalled.js +0 -19
  137. package/cjs/util/os/isVsCodeInstalled.js.map +0 -1
  138. package/cjs/util/os/isWindows.js +0 -16
  139. package/cjs/util/os/isWindows.js.map +0 -1
  140. package/cjs/util/path/getTempDataPath.js +0 -20
  141. package/cjs/util/path/getTempDataPath.js.map +0 -1
  142. package/cjs/util/regex/regexEscapeString.js +0 -18
  143. package/cjs/util/regex/regexEscapeString.js.map +0 -1
  144. package/cjs/util/string/strEnsureStartsWith.js +0 -19
  145. package/cjs/util/string/strEnsureStartsWith.js.map +0 -1
  146. package/cjs/util/string/strFirstCharToUpperCase.js +0 -16
  147. package/cjs/util/string/strFirstCharToUpperCase.js.map +0 -1
  148. package/cjs/util/string/strIsLowerCase.js +0 -18
  149. package/cjs/util/string/strIsLowerCase.js.map +0 -1
  150. package/cjs/util/string/strIsUpperCase.js +0 -18
  151. package/cjs/util/string/strIsUpperCase.js.map +0 -1
  152. package/cjs/util/string/strSplitCamelCase.js +0 -55
  153. package/cjs/util/string/strSplitCamelCase.js.map +0 -1
  154. package/cjs/util/string-parsers/createBooleanParser.js +0 -21
  155. package/cjs/util/string-parsers/createBooleanParser.js.map +0 -1
  156. package/cjs/util/string-parsers/createTypedListParser.js +0 -22
  157. package/cjs/util/string-parsers/createTypedListParser.js.map +0 -1
  158. package/cjs/util/string-parsers/parseBoolean.js +0 -15
  159. package/cjs/util/string-parsers/parseBoolean.js.map +0 -1
  160. package/cjs/util/string-parsers/parseInteger.js +0 -17
  161. package/cjs/util/string-parsers/parseInteger.js.map +0 -1
  162. package/cjs/util/string-parsers/parseNumber.js +0 -13
  163. package/cjs/util/string-parsers/parseNumber.js.map +0 -1
  164. package/cjs/util/string-parsers/parseString.js +0 -8
  165. package/cjs/util/string-parsers/parseString.js.map +0 -1
  166. package/cjs/util/types/Any.js +0 -3
  167. package/cjs/util/types/Any.js.map +0 -1
  168. package/cjs/util/types/DeepArray.js +0 -3
  169. package/cjs/util/types/DeepArray.js.map +0 -1
  170. package/cjs/util/types/DeepObject.js +0 -3
  171. package/cjs/util/types/DeepObject.js.map +0 -1
  172. package/cjs/util/types/JsonArray.js +0 -3
  173. package/cjs/util/types/JsonArray.js.map +0 -1
  174. package/cjs/util/types/JsonDefinedPrimitive.js +0 -6
  175. package/cjs/util/types/JsonDefinedPrimitive.js.map +0 -1
  176. package/cjs/util/types/JsonObject.js +0 -3
  177. package/cjs/util/types/JsonObject.js.map +0 -1
  178. package/cjs/util/types/JsonRawPrimitive.js +0 -3
  179. package/cjs/util/types/JsonRawPrimitive.js.map +0 -1
  180. package/cjs/util/types/JsonValue.js +0 -3
  181. package/cjs/util/types/JsonValue.js.map +0 -1
  182. package/cjs/util/types/ObjectKey.js +0 -3
  183. package/cjs/util/types/ObjectKey.js.map +0 -1
  184. package/cjs/util/types/TConstructor.js +0 -3
  185. package/cjs/util/types/TConstructor.js.map +0 -1
  186. package/cjs/util/types/TFunction.js +0 -3
  187. package/cjs/util/types/TFunction.js.map +0 -1
  188. package/cjs/util/types/TFunctionNoNew.js +0 -3
  189. package/cjs/util/types/TFunctionNoNew.js.map +0 -1
  190. package/cjs/util/types/TPlainObject.js +0 -3
  191. package/cjs/util/types/TPlainObject.js.map +0 -1
  192. package/cjs/util/types/TPrimitive.js +0 -3
  193. package/cjs/util/types/TPrimitive.js.map +0 -1
  194. package/cjs/util/types/TStringParser.js +0 -3
  195. package/cjs/util/types/TStringParser.js.map +0 -1
  196. package/cjs/util/types/TValidator.js +0 -3
  197. package/cjs/util/types/TValidator.js.map +0 -1
  198. package/cjs/util/validation/createTypedArrayValidator.js +0 -26
  199. package/cjs/util/validation/createTypedArrayValidator.js.map +0 -1
  200. package/cjs/util/validation/ensureThat.js +0 -12
  201. package/cjs/util/validation/ensureThat.js.map +0 -1
  202. package/cjs/util/validation/isArray.js +0 -5
  203. package/cjs/util/validation/isArray.js.map +0 -1
  204. package/cjs/util/validation/isBoolean.js +0 -8
  205. package/cjs/util/validation/isBoolean.js.map +0 -1
  206. package/cjs/util/validation/isFunction.js +0 -17
  207. package/cjs/util/validation/isFunction.js.map +0 -1
  208. package/cjs/util/validation/isNamedFunction.js +0 -11
  209. package/cjs/util/validation/isNamedFunction.js.map +0 -1
  210. package/cjs/util/validation/isNamedFunctionArray.js +0 -9
  211. package/cjs/util/validation/isNamedFunctionArray.js.map +0 -1
  212. package/cjs/util/validation/isObject.js +0 -22
  213. package/cjs/util/validation/isObject.js.map +0 -1
  214. package/cjs/util/validation/isPlainObject.js +0 -19
  215. package/cjs/util/validation/isPlainObject.js.map +0 -1
  216. package/cjs/util/validation/isPrimitive.js +0 -18
  217. package/cjs/util/validation/isPrimitive.js.map +0 -1
  218. package/cjs/util/validation/isString.js +0 -8
  219. package/cjs/util/validation/isString.js.map +0 -1
  220. package/cjs/util/validation/isStringArray.js +0 -12
  221. package/cjs/util/validation/isStringArray.js.map +0 -1
  222. package/cjs/util/validation/isStringWithNoSpacesOrDashes.js +0 -9
  223. package/cjs/util/validation/isStringWithNoSpacesOrDashes.js.map +0 -1
  224. package/cjs/util/validation/numbers/isInteger.js +0 -17
  225. package/cjs/util/validation/numbers/isInteger.js.map +0 -1
  226. package/cjs/util/validation/numbers/isValidNumber.js +0 -22
  227. package/cjs/util/validation/numbers/isValidNumber.js.map +0 -1
  228. package/esm/cmd/asdas.js +0 -25
  229. package/esm/cmd/asdas.js.map +0 -1
  230. package/esm/util/array/arrLast.js +0 -17
  231. package/esm/util/array/arrLast.js.map +0 -1
  232. package/esm/util/array/arrSome.js +0 -22
  233. package/esm/util/array/arrSome.js.map +0 -1
  234. package/esm/util/array/types/ArrayPredicate.js +0 -2
  235. package/esm/util/array/types/ArrayPredicate.js.map +0 -1
  236. package/esm/util/db/JsonDB.js +0 -141
  237. package/esm/util/db/JsonDB.js.map +0 -1
  238. package/esm/util/errors/ErrorParser.js +0 -154
  239. package/esm/util/errors/ErrorParser.js.map +0 -1
  240. package/esm/util/fs/promptUserEditInTextEditor/IGetUserInputFromEditorOptions.js +0 -2
  241. package/esm/util/fs/promptUserEditInTextEditor/IGetUserInputFromEditorOptions.js.map +0 -1
  242. package/esm/util/fs/promptUserEditInTextEditor/promptUserEditInTextEditorSync.js +0 -28
  243. package/esm/util/fs/promptUserEditInTextEditor/promptUserEditInTextEditorSync.js.map +0 -1
  244. package/esm/util/fs/promptUserEditInTextEditor/promptUserEditJsonInTextEditorSync.js +0 -21
  245. package/esm/util/fs/promptUserEditInTextEditor/promptUserEditJsonInTextEditorSync.js.map +0 -1
  246. package/esm/util/fs/readFile/readFileSafeSync.js +0 -21
  247. package/esm/util/fs/readFile/readFileSafeSync.js.map +0 -1
  248. package/esm/util/fs/readFile/readFileSync.js +0 -13
  249. package/esm/util/fs/readFile/readFileSync.js.map +0 -1
  250. package/esm/util/fs/readJsonFile/readJsonFileSafeSync.js +0 -17
  251. package/esm/util/fs/readJsonFile/readJsonFileSafeSync.js.map +0 -1
  252. package/esm/util/fs/removeFile/removeFile.js +0 -2
  253. package/esm/util/fs/removeFile/removeFile.js.map +0 -1
  254. package/esm/util/fs/tempFile/tempFileSync.js +0 -21
  255. package/esm/util/fs/tempFile/tempFileSync.js.map +0 -1
  256. package/esm/util/fs/types/IReadJsonFileOptions.js +0 -2
  257. package/esm/util/fs/types/IReadJsonFileOptions.js.map +0 -1
  258. package/esm/util/fs/writeFile/writeFileSafeSync.js +0 -2
  259. package/esm/util/fs/writeFile/writeFileSafeSync.js.map +0 -1
  260. package/esm/util/fs/writeFile/writeFileSync.js +0 -2
  261. package/esm/util/fs/writeFile/writeFileSync.js.map +0 -1
  262. package/esm/util/fs/writeJsonFile/writeJsonFileSafe.js +0 -2
  263. package/esm/util/fs/writeJsonFile/writeJsonFileSafe.js.map +0 -1
  264. package/esm/util/function/MethodDisabler.js +0 -90
  265. package/esm/util/function/MethodDisabler.js.map +0 -1
  266. package/esm/util/function/funSetName.js +0 -17
  267. package/esm/util/function/funSetName.js.map +0 -1
  268. package/esm/util/node/execInherit.js +0 -15
  269. package/esm/util/node/execInherit.js.map +0 -1
  270. package/esm/util/node/formatTableForTerminal.js +0 -14
  271. package/esm/util/node/formatTableForTerminal.js.map +0 -1
  272. package/esm/util/object/arrAssign.js +0 -3
  273. package/esm/util/object/arrAssign.js.map +0 -1
  274. package/esm/util/object/createArrayMerger.js +0 -16
  275. package/esm/util/object/createArrayMerger.js.map +0 -1
  276. package/esm/util/object/createObjectMerger.js +0 -16
  277. package/esm/util/object/createObjectMerger.js.map +0 -1
  278. package/esm/util/object/objAssign.js +0 -3
  279. package/esm/util/object/objAssign.js.map +0 -1
  280. package/esm/util/object/objUpdatePropertyDescriptors.js +0 -24
  281. package/esm/util/object/objUpdatePropertyDescriptors.js.map +0 -1
  282. package/esm/util/object/realizeLazyProperty.js +0 -10
  283. package/esm/util/object/realizeLazyProperty.js.map +0 -1
  284. package/esm/util/object/setNonEnumerable.js +0 -21
  285. package/esm/util/object/setNonEnumerable.js.map +0 -1
  286. package/esm/util/os/defaultOpenInEditorCommand.js +0 -14
  287. package/esm/util/os/defaultOpenInEditorCommand.js.map +0 -1
  288. package/esm/util/os/isOSX.js +0 -9
  289. package/esm/util/os/isOSX.js.map +0 -1
  290. package/esm/util/os/isVsCodeInstalled.js +0 -15
  291. package/esm/util/os/isVsCodeInstalled.js.map +0 -1
  292. package/esm/util/os/isWindows.js +0 -12
  293. package/esm/util/os/isWindows.js.map +0 -1
  294. package/esm/util/path/getTempDataPath.js +0 -13
  295. package/esm/util/path/getTempDataPath.js.map +0 -1
  296. package/esm/util/regex/regexEscapeString.js +0 -14
  297. package/esm/util/regex/regexEscapeString.js.map +0 -1
  298. package/esm/util/string/strEnsureStartsWith.js +0 -15
  299. package/esm/util/string/strEnsureStartsWith.js.map +0 -1
  300. package/esm/util/string/strFirstCharToUpperCase.js +0 -12
  301. package/esm/util/string/strFirstCharToUpperCase.js.map +0 -1
  302. package/esm/util/string/strIsLowerCase.js +0 -14
  303. package/esm/util/string/strIsLowerCase.js.map +0 -1
  304. package/esm/util/string/strIsUpperCase.js +0 -14
  305. package/esm/util/string/strIsUpperCase.js.map +0 -1
  306. package/esm/util/string/strSplitCamelCase.js +0 -51
  307. package/esm/util/string/strSplitCamelCase.js.map +0 -1
  308. package/esm/util/string-parsers/createBooleanParser.js +0 -17
  309. package/esm/util/string-parsers/createBooleanParser.js.map +0 -1
  310. package/esm/util/string-parsers/createTypedListParser.js +0 -18
  311. package/esm/util/string-parsers/createTypedListParser.js.map +0 -1
  312. package/esm/util/string-parsers/parseBoolean.js +0 -12
  313. package/esm/util/string-parsers/parseBoolean.js.map +0 -1
  314. package/esm/util/string-parsers/parseInteger.js +0 -13
  315. package/esm/util/string-parsers/parseInteger.js.map +0 -1
  316. package/esm/util/string-parsers/parseNumber.js +0 -9
  317. package/esm/util/string-parsers/parseNumber.js.map +0 -1
  318. package/esm/util/string-parsers/parseString.js +0 -4
  319. package/esm/util/string-parsers/parseString.js.map +0 -1
  320. package/esm/util/types/Any.js +0 -2
  321. package/esm/util/types/Any.js.map +0 -1
  322. package/esm/util/types/DeepArray.js +0 -2
  323. package/esm/util/types/DeepArray.js.map +0 -1
  324. package/esm/util/types/DeepObject.js +0 -2
  325. package/esm/util/types/DeepObject.js.map +0 -1
  326. package/esm/util/types/JsonArray.js +0 -2
  327. package/esm/util/types/JsonArray.js.map +0 -1
  328. package/esm/util/types/JsonDefinedPrimitive.js +0 -5
  329. package/esm/util/types/JsonDefinedPrimitive.js.map +0 -1
  330. package/esm/util/types/JsonObject.js +0 -2
  331. package/esm/util/types/JsonObject.js.map +0 -1
  332. package/esm/util/types/JsonRawPrimitive.js +0 -2
  333. package/esm/util/types/JsonRawPrimitive.js.map +0 -1
  334. package/esm/util/types/JsonValue.js +0 -2
  335. package/esm/util/types/JsonValue.js.map +0 -1
  336. package/esm/util/types/ObjectKey.js +0 -2
  337. package/esm/util/types/ObjectKey.js.map +0 -1
  338. package/esm/util/types/TConstructor.js +0 -2
  339. package/esm/util/types/TConstructor.js.map +0 -1
  340. package/esm/util/types/TFunction.js +0 -2
  341. package/esm/util/types/TFunction.js.map +0 -1
  342. package/esm/util/types/TFunctionNoNew.js +0 -2
  343. package/esm/util/types/TFunctionNoNew.js.map +0 -1
  344. package/esm/util/types/TPlainObject.js +0 -2
  345. package/esm/util/types/TPlainObject.js.map +0 -1
  346. package/esm/util/types/TPrimitive.js +0 -2
  347. package/esm/util/types/TPrimitive.js.map +0 -1
  348. package/esm/util/types/TStringParser.js +0 -2
  349. package/esm/util/types/TStringParser.js.map +0 -1
  350. package/esm/util/types/TValidator.js +0 -2
  351. package/esm/util/types/TValidator.js.map +0 -1
  352. package/esm/util/validation/createTypedArrayValidator.js +0 -22
  353. package/esm/util/validation/createTypedArrayValidator.js.map +0 -1
  354. package/esm/util/validation/ensureThat.js +0 -8
  355. package/esm/util/validation/ensureThat.js.map +0 -1
  356. package/esm/util/validation/isArray.js +0 -2
  357. package/esm/util/validation/isArray.js.map +0 -1
  358. package/esm/util/validation/isBoolean.js +0 -4
  359. package/esm/util/validation/isBoolean.js.map +0 -1
  360. package/esm/util/validation/isFunction.js +0 -13
  361. package/esm/util/validation/isFunction.js.map +0 -1
  362. package/esm/util/validation/isNamedFunction.js +0 -7
  363. package/esm/util/validation/isNamedFunction.js.map +0 -1
  364. package/esm/util/validation/isNamedFunctionArray.js +0 -5
  365. package/esm/util/validation/isNamedFunctionArray.js.map +0 -1
  366. package/esm/util/validation/isObject.js +0 -18
  367. package/esm/util/validation/isObject.js.map +0 -1
  368. package/esm/util/validation/isPlainObject.js +0 -15
  369. package/esm/util/validation/isPlainObject.js.map +0 -1
  370. package/esm/util/validation/isPrimitive.js +0 -14
  371. package/esm/util/validation/isPrimitive.js.map +0 -1
  372. package/esm/util/validation/isString.js +0 -4
  373. package/esm/util/validation/isString.js.map +0 -1
  374. package/esm/util/validation/isStringArray.js +0 -8
  375. package/esm/util/validation/isStringArray.js.map +0 -1
  376. package/esm/util/validation/isStringWithNoSpacesOrDashes.js +0 -5
  377. package/esm/util/validation/isStringWithNoSpacesOrDashes.js.map +0 -1
  378. package/esm/util/validation/numbers/isInteger.js +0 -14
  379. package/esm/util/validation/numbers/isInteger.js.map +0 -1
  380. package/esm/util/validation/numbers/isValidNumber.js +0 -18
  381. package/esm/util/validation/numbers/isValidNumber.js.map +0 -1
  382. package/types/cmd/asdas.d.ts +0 -6
  383. package/types/util/array/arrLast.d.ts +0 -12
  384. package/types/util/array/arrSome.d.ts +0 -15
  385. package/types/util/array/types/ArrayPredicate.d.ts +0 -10
  386. package/types/util/db/JsonDB.d.ts +0 -65
  387. package/types/util/errors/ErrorParser.d.ts +0 -15
  388. package/types/util/fs/promptUserEditInTextEditor/IGetUserInputFromEditorOptions.d.ts +0 -15
  389. package/types/util/fs/promptUserEditInTextEditor/promptUserEditInTextEditorSync.d.ts +0 -9
  390. package/types/util/fs/promptUserEditInTextEditor/promptUserEditJsonInTextEditorSync.d.ts +0 -13
  391. package/types/util/fs/readFile/readFileSafeSync.d.ts +0 -13
  392. package/types/util/fs/readFile/readFileSync.d.ts +0 -10
  393. package/types/util/fs/readJsonFile/readJsonFileSafeSync.d.ts +0 -9
  394. package/types/util/fs/removeFile/removeFile.d.ts +0 -1
  395. package/types/util/fs/tempFile/tempFileSync.d.ts +0 -7
  396. package/types/util/fs/types/IReadJsonFileOptions.d.ts +0 -1
  397. package/types/util/fs/writeFile/writeFileSafeSync.d.ts +0 -1
  398. package/types/util/fs/writeFile/writeFileSync.d.ts +0 -1
  399. package/types/util/fs/writeJsonFile/writeJsonFileSafe.d.ts +0 -1
  400. package/types/util/function/MethodDisabler.d.ts +0 -43
  401. package/types/util/function/funSetName.d.ts +0 -13
  402. package/types/util/node/execInherit.d.ts +0 -1
  403. package/types/util/node/formatTableForTerminal.d.ts +0 -1
  404. package/types/util/object/arrAssign.d.ts +0 -1
  405. package/types/util/object/createArrayMerger.d.ts +0 -4
  406. package/types/util/object/createObjectMerger.d.ts +0 -5
  407. package/types/util/object/objAssign.d.ts +0 -1
  408. package/types/util/object/objUpdatePropertyDescriptors.d.ts +0 -16
  409. package/types/util/object/realizeLazyProperty.d.ts +0 -1
  410. package/types/util/object/setNonEnumerable.d.ts +0 -15
  411. package/types/util/os/defaultOpenInEditorCommand.d.ts +0 -5
  412. package/types/util/os/isOSX.d.ts +0 -6
  413. package/types/util/os/isVsCodeInstalled.d.ts +0 -5
  414. package/types/util/os/isWindows.d.ts +0 -8
  415. package/types/util/path/getTempDataPath.d.ts +0 -6
  416. package/types/util/regex/regexEscapeString.d.ts +0 -11
  417. package/types/util/string/strEnsureStartsWith.d.ts +0 -12
  418. package/types/util/string/strFirstCharToUpperCase.d.ts +0 -9
  419. package/types/util/string/strIsLowerCase.d.ts +0 -11
  420. package/types/util/string/strIsUpperCase.d.ts +0 -11
  421. package/types/util/string/strSplitCamelCase.d.ts +0 -11
  422. package/types/util/string-parsers/createBooleanParser.d.ts +0 -7
  423. package/types/util/string-parsers/createTypedListParser.d.ts +0 -11
  424. package/types/util/string-parsers/parseBoolean.d.ts +0 -10
  425. package/types/util/string-parsers/parseInteger.d.ts +0 -1
  426. package/types/util/string-parsers/parseNumber.d.ts +0 -1
  427. package/types/util/string-parsers/parseString.d.ts +0 -1
  428. package/types/util/types/Any.d.ts +0 -1
  429. package/types/util/types/DeepArray.d.ts +0 -10
  430. package/types/util/types/DeepObject.d.ts +0 -14
  431. package/types/util/types/JsonArray.d.ts +0 -6
  432. package/types/util/types/JsonDefinedPrimitive.d.ts +0 -4
  433. package/types/util/types/JsonObject.d.ts +0 -6
  434. package/types/util/types/JsonRawPrimitive.d.ts +0 -5
  435. package/types/util/types/JsonValue.d.ts +0 -7
  436. package/types/util/types/ObjectKey.d.ts +0 -1
  437. package/types/util/types/TConstructor.d.ts +0 -5
  438. package/types/util/types/TFunction.d.ts +0 -4
  439. package/types/util/types/TFunctionNoNew.d.ts +0 -2
  440. package/types/util/types/TPlainObject.d.ts +0 -2
  441. package/types/util/types/TPrimitive.d.ts +0 -1
  442. package/types/util/types/TStringParser.d.ts +0 -1
  443. package/types/util/types/TValidator.d.ts +0 -2
  444. package/types/util/validation/createTypedArrayValidator.d.ts +0 -9
  445. package/types/util/validation/ensureThat.d.ts +0 -6
  446. package/types/util/validation/isArray.d.ts +0 -1
  447. package/types/util/validation/isBoolean.d.ts +0 -1
  448. package/types/util/validation/isFunction.d.ts +0 -11
  449. package/types/util/validation/isNamedFunction.d.ts +0 -5
  450. package/types/util/validation/isNamedFunctionArray.d.ts +0 -1
  451. package/types/util/validation/isObject.d.ts +0 -15
  452. package/types/util/validation/isPlainObject.d.ts +0 -6
  453. package/types/util/validation/isPrimitive.d.ts +0 -12
  454. package/types/util/validation/isString.d.ts +0 -1
  455. package/types/util/validation/isStringArray.d.ts +0 -4
  456. package/types/util/validation/isStringWithNoSpacesOrDashes.d.ts +0 -1
  457. package/types/util/validation/numbers/isInteger.d.ts +0 -13
  458. package/types/util/validation/numbers/isValidNumber.d.ts +0 -15
@@ -1,6 +0,0 @@
1
- export type ReturnTypesOfFunctionArray<Arr extends ((...args: any[]) => unknown)[]> = {
2
- [I in keyof Arr]: Arr[I] extends never | undefined ? string : ReturnType<Arr[I]>;
3
- };
4
- export type ReturnTypesOfFunctionMap<O extends Record<string, (...args: any[]) => unknown>> = {
5
- [K in keyof O]: O[K] extends never | undefined ? string : ReturnType<O[K]>;
6
- };
@@ -1,12 +0,0 @@
1
- /**
2
- * Returns the last element of an array.
3
- * Throws an error if the array is empty.
4
- * @template T The type of elements in the array.
5
- * @param array The array to get the last element from.
6
- * @returns The last element of the array.
7
- * @throws If the array is empty.
8
- * @example const numbers = [1, 2, 3, 4, 5];
9
- * const lastNumber = arrLast(numbers);
10
- * //=> 5
11
- */
12
- export declare function arrLast<T>(array: T[]): T;
@@ -1,15 +0,0 @@
1
- import type { ArrayPredicate } from './types/ArrayPredicate';
2
- /**
3
- * Checks if at least one element in the array satisfies the provided predicate.
4
- * @param predicate The predicate function to apply to each element.
5
- * @template T The type of elements in the input array.
6
- * @returns Returns `true` if at least one element in the array passes the test implemented by the provided function, otherwise `false`.
7
- * @param input The array to check.
8
- * @example ```ts
9
- * const numbers = [1, 2, 3, 4, 5];
10
- * const isEven = (num) => num % 2 === 0;
11
- * arrSome(numbers, isEven);
12
- * //=> true
13
- * ```
14
- */
15
- export declare function arrSome<T>(input: Array<T>, predicate: ArrayPredicate<T>): boolean;
@@ -1,10 +0,0 @@
1
- /**
2
- * Type definition for a predicate function that operates on arrays.
3
- * @remarks This type is useful when you want to create a function that can be used with methods like `Array.prototype.filter`.
4
- * @typeparam T - The type of elements in the array.
5
- * @param value - The current element being processed in the array.
6
- * @param index - The index of the current element being processed in the array.
7
- * @param array - The array `ArrayPredicate` was called upon.
8
- * @returns A boolean indicating whether the current element passes the test.
9
- */
10
- export type ArrayPredicate<T> = (value: T, index: number, array: T[]) => boolean;
@@ -1,65 +0,0 @@
1
- import type { JsonObject } from '../types/JsonObject';
2
- import type { JsonValue } from '../types/JsonValue';
3
- /**
4
- * Represents a simple JSON file database.
5
- */
6
- export declare class JsonDB {
7
- protected filepath: string;
8
- protected indents: number;
9
- /**
10
- * The data stored in the JSON database.
11
- */
12
- protected data: JsonObject;
13
- /**
14
- * Creates a new instance of the JsonDB class.
15
- * @param filepath - The filepath where the data file is stored or to be stored.
16
- */
17
- constructor(filepath: string, indents?: number);
18
- /**
19
- * Saves the data to the JSON file.
20
- */
21
- save(indents?: number): Promise<void>;
22
- /**
23
- * Sets the filepath of the JSON file.
24
- * @param filepath - The new filepath.
25
- */
26
- setFilepath(filepath: string, save?: boolean): void;
27
- /**
28
- * Sets a value in the JSON database.
29
- * @param prefix - Object path prefix as dot-separated keys.
30
- * @param value - The value to set.
31
- * @param save - Whether to save the data to the JSON file.
32
- */
33
- set(prefix?: string, value?: JsonValue, save?: boolean): void;
34
- /**
35
- * Gets a value from the JSON database.
36
- * @param prefix - Object path prefix as dot-separated keys.
37
- * @returns The value associated with the key.
38
- * @throws An error if no entry is found at the specified key.
39
- */
40
- get<T = JsonValue>(prefix?: string): T;
41
- /**
42
- * Gets a value from the JSON database safely.
43
- * @param prefix - Object path prefix as dot-separated keys.
44
- * @returns The value associated with the key, or undefined if no entry is found.
45
- */
46
- getSafe<T = JsonValue>(prefix?: string): T | undefined;
47
- /**
48
- * Checks if a key exists in the JSON database.
49
- * @param prefix - Object path prefix as dot-separated keys.
50
- * @returns True if the key exists, false otherwise.
51
- */
52
- has(prefix?: string): boolean;
53
- /**
54
- * Deletes a value from the JSON database.
55
- * @param prefix - Object path prefix as dot-separated keys.
56
- * @param save - Whether to save the data to the JSON file.
57
- */
58
- delete(prefix?: string, save?: boolean): void;
59
- /**
60
- * Creates a deep clone of an object.
61
- * @param obj - The object to clone.
62
- * @returns The cloned object.
63
- */
64
- protected cloneDeep<T extends JsonValue>(obj: T): T;
65
- }
@@ -1,15 +0,0 @@
1
- export declare class ErrorParser {
2
- readonly error: Error;
3
- constructor(error: unknown);
4
- get name(): string;
5
- get message(): string;
6
- get stack(): string;
7
- summary(): string;
8
- parseStackFrames(): [string, string][];
9
- prettyStack(parsedStackFrames?: [string, string][]): string;
10
- toObject(): any;
11
- toJSON(): any;
12
- }
13
- export declare function errPrettyStack(error: Error, parsedStackFrames?: [string, string][]): string;
14
- export declare function errParseStack(stack: string): [string, string][];
15
- export declare function errToObject(error: Error): any;
@@ -1,15 +0,0 @@
1
- export interface IGetUserInputFromEditorOptions {
2
- /**
3
- * The content to put in the temp file so that the user can edit it. Defaults to an empty file.
4
- */
5
- content?: string;
6
- /**
7
- * Launch command to start your editor. Defaults to VSCode: 'code -w' (if installed).
8
- * Otherwise this logic: isWindows() ? 'notepad' : isOSX() ? 'open vi' : 'xdg-open'
9
- */
10
- editor?: string;
11
- /**
12
- * The file extension to use for the temporary file. Defaults to '.txt'.
13
- */
14
- extension?: string;
15
- }
@@ -1,9 +0,0 @@
1
- import type { IGetUserInputFromEditorOptions } from './IGetUserInputFromEditorOptions';
2
- /**
3
- * Prompts the user to edit a string in the user's text editor.
4
- *
5
- * @example ```ts
6
- * promptUserEditInTextEditor({ editor: 'notepad' })
7
- * ```
8
- */
9
- export declare function promptUserEditInTextEditorSync(options?: IGetUserInputFromEditorOptions): string;
@@ -1,13 +0,0 @@
1
- import type { JsonValue } from '../../types/JsonValue';
2
- /**
3
- * Edit a JSON-stringify-compatible value in the user's editor and return the (JSON.parse'd) result.
4
- *
5
- * @param value - The value to edit (NOT a json string). Defaults to an empty object.
6
- * @param editor - Launch command to start your editor. Defaults to VSCode: 'code -w' (if installed).
7
- * - Otherwise this logic: isWindows() ? 'notepad' : isOSX() ? 'open vi' : 'xdg-open'
8
- *
9
- * @example ```ts
10
- * promptUserEditJsonInTextEditorSync([1, 2])
11
- * ```
12
- */
13
- export declare function promptUserEditJsonInTextEditorSync<T extends JsonValue = JsonValue, R extends T = T>(value?: T, editor?: string): R;
@@ -1,13 +0,0 @@
1
- /// <reference types="node" />
2
- /**
3
- * Reads a file and returns the file's contents.
4
- *
5
- * Identical to fs.readFileSync, except that:
6
- * - it uses utf8 encoding by default
7
- * - if operation fails, returns undefined instead of throwing
8
- *
9
- * @param filepath - The path to the file.
10
- * @param encoding - The encoding to use when reading the file.
11
- * @returns The file's contents or undefined if the file does not exist.
12
- */
13
- export declare function readFileSafeSync(filepath: string, encoding?: BufferEncoding): string | undefined;
@@ -1,10 +0,0 @@
1
- /// <reference types="node" />
2
- /**
3
- * Reads a file and returns the file's contents.
4
- * Identical to fs.readFileSync, except that it uses utf8 encoding by default.
5
- *
6
- * @param filepath - The path to the file.
7
- * @param encoding - The encoding to use when reading the file.
8
- * @returns The file's contents.
9
- */
10
- export declare function readFileSync(filepath: string, encoding?: BufferEncoding): string;
@@ -1,9 +0,0 @@
1
- import type { IReadJsonFileOptions } from '../types/IReadJsonFileOptions';
2
- /**
3
- * Reads a JSON file and then parses it into an object.
4
- * If an error occurs, it returns undefined.
5
- *
6
- * @param filepath - The path to the JSON file.
7
- * @param options - Options for reading the JSON file.
8
- */
9
- export declare function readJsonFileSafeSync<T>(filepath: string, options?: IReadJsonFileOptions): T | undefined;
@@ -1 +0,0 @@
1
- export { remove as removeFile } from 'fs-extra';
@@ -1,7 +0,0 @@
1
- import type { Any } from '../../types/Any';
2
- /**
3
- * Syncrhonously creates a temporary file and deletes it after the callback has finished.
4
- * @param fileExtension - The file extension to use for the temporary file.
5
- * @param callback - The callback to execute with the temporary file path. The callback can return a promise and the temporary file will not be deleted until the promise has resolved or rejected.
6
- */
7
- export declare function tempFileSync(fileExtension: string, callback: (fpath: string) => Any): any;
@@ -1 +0,0 @@
1
- export type { JFReadOptions as IReadJsonFileOptions } from 'jsonfile';
@@ -1 +0,0 @@
1
- export { outputFileSync as writeFileSafeSync } from 'fs-extra';
@@ -1 +0,0 @@
1
- export { writeFileSync } from 'fs-extra';
@@ -1 +0,0 @@
1
- export { outputJson as writeJsonFileSafe } from 'fs-extra';
@@ -1,43 +0,0 @@
1
- import type { Any } from '../types/Any';
2
- import type { ObjectKey } from '../types/ObjectKey';
3
- import type { TFunctionNoNew } from '../types/TFunctionNoNew';
4
- /**
5
- * A class that creates an object with methods for disabling/enabling a given method on a given object.
6
- *
7
- * @example
8
- * const md = new MethodDisabler(process.stdout, 'write')
9
- *
10
- * md.disable()
11
- * assert(!md.isEnabled)
12
- * console.log('This will not print')
13
- *
14
- * md.enable()
15
- * assert(md.isEnabled)
16
- * console.log('This will print')
17
- *
18
- * assert(md.original === process.stdout.write)
19
- */
20
- export declare class MethodDisabler {
21
- #private;
22
- /**
23
- * @param obj - The object on which the method is defined.
24
- * @param key - The property name of the method.
25
- */
26
- constructor(obj: Record<ObjectKey, Any>, key: string);
27
- /**
28
- * Disable the method.
29
- */
30
- disable(): void;
31
- /**
32
- * Enable the method.
33
- */
34
- enable(): void;
35
- /**
36
- * The original method before it was disabled.
37
- */
38
- get original(): TFunctionNoNew;
39
- /**
40
- * Whether the method is currently enabled.
41
- */
42
- get isEnabled(): boolean;
43
- }
@@ -1,13 +0,0 @@
1
- /**
2
- * This function sets the name of a function and returns the function with the new name.
3
- * @template T - The type of the function.
4
- * @param name The new name to be set for the function.
5
- * @param fun The function whose name is to be set.
6
- * @returns The function with the new name.
7
- * @example ```ts
8
- * const myFun = () => 'Hello World';
9
- * funSetName('newFun', myFun).name;;
10
- * //=> 'newFun'
11
- * ```
12
- */
13
- export declare function funSetName<T>(name: string, fun: T): T;
@@ -1 +0,0 @@
1
- export declare function execInherit(command: string): Promise<string>;
@@ -1 +0,0 @@
1
- export declare function formatTableForTerminal(rows: string[][], headers?: string[]): string;
@@ -1 +0,0 @@
1
- export declare const arrAssign: <E extends unknown>(target: E[], ...sources: E[][]) => E[];
@@ -1,4 +0,0 @@
1
- /**
2
- * Creates a function that merges arrays based on a predicate function.
3
- */
4
- export declare function createArrayMerger<T>(predicate: (value: T, index: number, arr: T[]) => boolean): <E extends T>(target: E[], ...sources: E[][]) => E[];
@@ -1,5 +0,0 @@
1
- import type { Any } from '../types/Any';
2
- /**
3
- * Creates a function that merges objects based on a predicate function.
4
- */
5
- export declare function createObjectMerger(predicate: (value: Any, key: string, obj: Record<string, Any>) => boolean): (target: Record<string, Any>, ...sources: Record<string, Any>[]) => Record<string, any>;
@@ -1 +0,0 @@
1
- export declare const objAssign: (target: Record<string, any>, ...sources: Record<string, any>[]) => Record<string, any>;
@@ -1,16 +0,0 @@
1
- import type { ObjectKey } from '../types/ObjectKey';
2
- /**
3
- * Updates the property descriptors of the specified properties on the given object.
4
- * @param object - The object whose property descriptors are to be updated.
5
- * @param properties - An array of property names for which the descriptors are to be updated.
6
- * @param update - A function that takes a property descriptor and a property name, and returns a new property descriptor.
7
- * @throws Will throw an error if any of the specified properties do not exist on the object.
8
- * @example ```ts
9
- * const obj = { a: 1, b: 2 };
10
- * objUpdatePropertyDescriptors(obj, ['a', 'b'], (descriptor, property) => {
11
- * descriptor.writable = true;
12
- * return obj;
13
- * });
14
- * ```
15
- */
16
- export declare function objUpdatePropertyDescriptors<V>(object: Record<ObjectKey, V>, properties: string[], update: <T extends PropertyDescriptor>(descriptor: T, property: string) => T): void;
@@ -1 +0,0 @@
1
- export declare function realizeLazyProperty<T>(obj: unknown, key: string, value: T): T;
@@ -1,15 +0,0 @@
1
- import type { ObjectKey } from '../types/ObjectKey';
2
- /**
3
- * Sets the specified properties of an object as non-enumerable.
4
- * @remarks This function modifies the original object by setting the specified properties as non-enumerable.
5
- * If the object or any of the property names are not valid, it throws an error.
6
- * @param object The object whose properties are to be set as non-enumerable.
7
- * @param properties The names of the properties to be set as non-enumerable.
8
- * @throws Will throw an error if any of the specified properties do not exist on the object.
9
- * @example ```ts
10
- * setNonEnumerable({ a: 1, b: 2, c: 3 }, 'a', 'b');
11
- * Object.keys({ a: 1, b: 2, c: 3 });;
12
- * //=> ['c']
13
- * ```
14
- */
15
- export declare function setNonEnumerable(object: Record<ObjectKey, any>, ...properties: string[]): void;
@@ -1,5 +0,0 @@
1
- /**
2
- * Get the default command to open a file in in a text editor.
3
- * If VSCode is installed, this is used. Otherwise, the default text editor of the OS is used.
4
- */
5
- export declare function defaultOpenInEditorCommand(): string;
@@ -1,6 +0,0 @@
1
- /**
2
- * Checks if the current platform is OSX.
3
- * It checks the 'process' object and the 'platform' property to determine if the platform is 'darwin'.
4
- * @returns A boolean indicating whether the current platform is OSX.
5
- */
6
- export declare function isOSX(): boolean;
@@ -1,5 +0,0 @@
1
- /**
2
- * Returns whether Visual Studio Code is installed on the system.
3
- * @example isVsCodeInstalled() //=> true
4
- */
5
- export declare function isVsCodeInstalled(): boolean;
@@ -1,8 +0,0 @@
1
- /**
2
- * Checks if the current platform is Windows.
3
- * @remarks
4
- * It checks the 'process' object and the 'platform' property to determine if the platform is 'win32'.
5
- * It also checks the 'OSTYPE' environment variable to see if it matches 'msys' or 'cygwin'.
6
- * @returns A boolean indicating whether the current platform is Windows.
7
- */
8
- export declare function isWindows(): boolean;
@@ -1,6 +0,0 @@
1
- /**
2
- * Returns a path to the os tmpdir location.
3
- *
4
- * @param paths - The paths to join to the os tmpdir location.
5
- */
6
- export declare function getTempDataPath(...paths: string[]): string;
@@ -1,11 +0,0 @@
1
- /**
2
- * Escapes special characters in a string to be used in a regular expression.
3
- * @param str The input string to escape.
4
- * @returns The escaped string.
5
- * @example ```ts
6
- * const input = 'Hello, world!';
7
- * regexEscapeString(input);;
8
- * //=> 'Hello, world!'
9
- * ```
10
- */
11
- export declare function regexEscapeString(str: string): string;
@@ -1,12 +0,0 @@
1
- /**
2
- * Ensures that a string starts with a specified substring. If the string already starts with the specified substring, it is returned as is. Otherwise, the substring is appended to the end of the string.
3
- * @param string The string to be processed.
4
- * @param startsWith The substring that the string should end with.
5
- * @example ```ts
6
- * strEnsureStartsWith('json', '.');
7
- * //=> '.json'
8
- * strEnsureStartsWith('.json', '.');
9
- * //=> '.json'
10
- * ```
11
- */
12
- export declare function strEnsureStartsWith(string: string, startsWith: string): string;
@@ -1,9 +0,0 @@
1
- /**
2
- * Converts the first character of a string to uppercase.
3
- * @param string The string to be converted.
4
- * @example ```ts
5
- * strFirstCharToUpperCase('hello');
6
- * //=> 'Hello'
7
- * ```
8
- */
9
- export declare function strFirstCharToUpperCase(string: string): string;
@@ -1,11 +0,0 @@
1
- /**
2
- * Checks if the given string is in lower case.
3
- * @param input The string to be checked.
4
- * @example ```ts
5
- * strIsLowerCase('hello');
6
- * //=> true
7
- * strIsLowerCase('Hello');
8
- * //=> false
9
- * ```
10
- */
11
- export declare function strIsLowerCase(input: string): boolean;
@@ -1,11 +0,0 @@
1
- /**
2
- * Checks if the given string is in upper case.
3
- * @param input The string to be checked.
4
- * @example ```ts
5
- * strIsUpperCase('HELLO');;
6
- * //=> true
7
- * strIsUpperCase('HEllo');;
8
- * //=> false
9
- * ```
10
- */
11
- export declare function strIsUpperCase(input: string): boolean;
@@ -1,11 +0,0 @@
1
- /**
2
- * Returns an array of words in the string
3
- * @param word The camel case word to split.
4
- * @throws Throws an error if the input is not a string.
5
- * @param input input string
6
- * @example ```ts
7
- * strSplitCamelCase('someCamel10Case')
8
- * //=> ['some', 'Camel10', 'Case']
9
- * ```
10
- */
11
- export declare function strSplitCamelCase(word: string): string[];
@@ -1,7 +0,0 @@
1
- /**
2
- * Creates a parser function that parses a string into a boolean.
3
- *
4
- * @param trueValues - An array of strings that are considered true. Defaults to ['TRUE', 'T', 'YES', 'Y', '1'].
5
- * @param falseValues - An array of strings that are considered false. Defaults to ['', 'FALSE', 'F', 'NO', 'N', '0'].
6
- */
7
- export declare function createBooleanParser(trueValues?: string[], falseValues?: string[]): (string: string) => boolean;
@@ -1,11 +0,0 @@
1
- import type { TStringParser } from '../types/TStringParser';
2
- /**
3
- * Creates a parser function that parses a delimited string into a list of typed values.
4
- * The parser function takes a string and returns an array of typed values.
5
- *
6
- * @param delimiter - The delimiter used to split the string into individual values.
7
- * @param parser - The function used to parse each individual value in the string.
8
- * @returns A function that takes a delimited string and returns an array of typed values.
9
- * @template T - The type of the values in the list.
10
- */
11
- export declare function createTypedListParser<T>(delimiter: string, parser: TStringParser<T>): TStringParser<T[]>;
@@ -1,10 +0,0 @@
1
- /**
2
- * Parses a string into a boolean.
3
- *
4
- * Accepted values (case insensitive):
5
- * - true: 'TRUE', 'T', 'YES', 'Y', '1'
6
- * - false: 'FALSE', 'F', 'NO', 'N', '0'
7
- *
8
- * @throws Will throw an error if the input string is not a valid input.
9
- */
10
- export declare const parseBoolean: (string: string) => boolean;
@@ -1 +0,0 @@
1
- export declare function parseInteger(string: string): number;
@@ -1 +0,0 @@
1
- export declare function parseNumber(string: string): number;
@@ -1 +0,0 @@
1
- export declare function parseString<O = string>(string: string): O;
@@ -1 +0,0 @@
1
- export type Any = any;
@@ -1,10 +0,0 @@
1
- import type { DeepObject } from './DeepObject';
2
- import type { ObjectKey } from './ObjectKey';
3
- /**
4
- * Recursively defined array that can contain objects+arrays with values of a given type V.
5
- */
6
- export type DeepArray<V, K extends ObjectKey = string | symbol> = Array<V | DeepObject<V, K> | DeepArray<V, K>> | [];
7
- /**
8
- * Recursively defined array that can contain only arrays (excl. objects) with values of a given type V.
9
- */
10
- export type StrictlyDeepArray<V> = Array<V | StrictlyDeepArray<V>>;
@@ -1,14 +0,0 @@
1
- import type { DeepArray } from './DeepArray';
2
- import type { ObjectKey } from './ObjectKey';
3
- /**
4
- * Recursively defined object with objects+arrays with values of a given type V.
5
- */
6
- export type DeepObject<V, K extends ObjectKey = string | symbol> = {
7
- [_ in K]?: V | DeepObject<V, K> | DeepArray<V, K>;
8
- };
9
- /**
10
- * Recursively defined array that can contain only objects (excl. arrays) with values of a given type V.
11
- */
12
- export type StrictlyDeepObject<V, K extends string | symbol = string | symbol> = {
13
- [_ in K]?: V | StrictlyDeepObject<V, K>;
14
- };
@@ -1,6 +0,0 @@
1
- import type { DeepArray } from './DeepArray';
2
- import type { JsonRawPrimitive } from './JsonRawPrimitive';
3
- /**
4
- * Return-type of parsed JSON array.
5
- */
6
- export type JsonArray<P extends JsonRawPrimitive = JsonRawPrimitive> = DeepArray<P, string> | P[];
@@ -1,4 +0,0 @@
1
- /**
2
- * All supported defined (!= null) primitive types in JSON.
3
- */
4
- export type JsonDefinedPrimitive = string | number | boolean;
@@ -1,6 +0,0 @@
1
- import type { DeepObject } from './DeepObject';
2
- import type { JsonRawPrimitive } from './JsonRawPrimitive';
3
- /**
4
- * Return-type of parsed JSON object.
5
- */
6
- export type JsonObject<P extends JsonRawPrimitive = JsonRawPrimitive> = DeepObject<P, string> | Record<string, P>;
@@ -1,5 +0,0 @@
1
- import type { JsonDefinedPrimitive } from './JsonDefinedPrimitive';
2
- /**
3
- * All supported primitive types in JSON.
4
- */
5
- export type JsonRawPrimitive = null | JsonDefinedPrimitive;
@@ -1,7 +0,0 @@
1
- import type { JsonArray } from './JsonArray';
2
- import type { JsonObject } from './JsonObject';
3
- import type { JsonRawPrimitive } from './JsonRawPrimitive';
4
- /**
5
- * Any JSON value. Any JSON.parse() return value.
6
- */
7
- export type JsonValue<P extends JsonRawPrimitive = JsonRawPrimitive> = P | JsonObject<P> | JsonArray<P> | P[] | Record<string, P>;
@@ -1 +0,0 @@
1
- export type ObjectKey = string | number | symbol;
@@ -1,5 +0,0 @@
1
- import type { Any } from './Any';
2
- /**
3
- * This type represents a constructor function. It is a function that can be called with the `new` keyword to create an instance of a certain type.
4
- */
5
- export type TConstructor<R = Any, A extends Any[] = Any[]> = new (...args: A) => R;
@@ -1,4 +0,0 @@
1
- import type { Any } from './Any';
2
- import type { TConstructor } from './TConstructor';
3
- import type { TFunctionNoNew } from './TFunctionNoNew';
4
- export type TFunction<R = Any, A extends Any[] = Any[]> = TConstructor<R, A> | TFunctionNoNew<R, A>;
@@ -1,2 +0,0 @@
1
- import type { Any } from './Any';
2
- export type TFunctionNoNew<R = Any, A extends Any[] = Any[]> = (...args: A) => R;
@@ -1,2 +0,0 @@
1
- import type { ObjectKey } from './ObjectKey';
2
- export type TPlainObject<K extends ObjectKey = ObjectKey, V = any> = Record<K, V>;
@@ -1 +0,0 @@
1
- export type TPrimitive = null | undefined | bigint | boolean | number | string | symbol;
@@ -1 +0,0 @@
1
- export type TStringParser<T> = (value: string) => T;
@@ -1,2 +0,0 @@
1
- import type { Any } from './Any';
2
- export type TValidator<T = Any> = (value: T) => boolean;