zcw-shared 1.4.0 → 1.7.0

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 (453) hide show
  1. package/README.md +513 -610
  2. package/assets/logo-colorful.svg +18 -18
  3. package/assets/logo-name.svg +7 -7
  4. package/assets/logo-transparent.svg +14 -14
  5. package/assets/logo.svg +8 -8
  6. package/dist/constants/colorPatterns.d.ts +8 -0
  7. package/dist/{functions/color-converter/COLOR_PATTERNS.js → constants/colorPatterns.js} +1 -1
  8. package/dist/constants/colorPatterns.js.map +1 -0
  9. package/dist/constants/namedColors.d.ts +16 -0
  10. package/dist/constants/namedColors.js +17 -0
  11. package/dist/constants/namedColors.js.map +1 -0
  12. package/dist/functions/android/buildProject.d.ts +11 -0
  13. package/dist/functions/android/buildProject.js +97 -0
  14. package/dist/functions/android/buildProject.js.map +1 -0
  15. package/dist/functions/android/modifyGradle.d.ts +17 -0
  16. package/dist/functions/android/modifyGradle.js +69 -0
  17. package/dist/functions/android/modifyGradle.js.map +1 -0
  18. package/dist/functions/android/modifyManifest.d.ts +23 -0
  19. package/dist/functions/android/modifyManifest.js +198 -0
  20. package/dist/functions/android/modifyManifest.js.map +1 -0
  21. package/dist/functions/android/permission.d.ts +30 -0
  22. package/dist/functions/android/permission.js +65 -0
  23. package/dist/functions/android/permission.js.map +1 -0
  24. package/dist/functions/color/colorValidation.d.ts +11 -0
  25. package/dist/functions/color/colorValidation.js +35 -0
  26. package/dist/functions/color/colorValidation.js.map +1 -0
  27. package/dist/functions/{color-converter → color}/convertColor.d.ts +0 -1
  28. package/dist/functions/color/convertColor.js +277 -0
  29. package/dist/functions/color/convertColor.js.map +1 -0
  30. package/dist/functions/color/deduplicateColors.d.ts +4 -0
  31. package/dist/functions/color/deduplicateColors.js +40 -0
  32. package/dist/functions/color/deduplicateColors.js.map +1 -0
  33. package/dist/functions/color/detectColorFormat.d.ts +8 -0
  34. package/dist/functions/color/detectColorFormat.js +110 -0
  35. package/dist/functions/color/detectColorFormat.js.map +1 -0
  36. package/dist/functions/color/extractColors.d.ts +4 -0
  37. package/dist/functions/color/extractColors.js +128 -0
  38. package/dist/functions/color/extractColors.js.map +1 -0
  39. package/dist/functions/css/extractCssVariables.d.ts +12 -0
  40. package/dist/functions/css/extractCssVariables.js +53 -0
  41. package/dist/functions/css/extractCssVariables.js.map +1 -0
  42. package/dist/functions/debug/createDebugger.d.ts +8 -7
  43. package/dist/functions/debug/createDebugger.js +49 -39
  44. package/dist/functions/debug/createDebugger.js.map +1 -1
  45. package/dist/functions/dom/detectOverflow.d.ts +3 -3
  46. package/dist/functions/dom/detectOverflow.js +3 -3
  47. package/dist/functions/dom/detectOverflow.js.map +1 -1
  48. package/dist/functions/dom/getElementRect.d.ts +1 -1
  49. package/dist/functions/dom/getElementRect.js.map +1 -1
  50. package/dist/functions/dom/getRelativePosition.d.ts +1 -1
  51. package/dist/functions/dom/getRelativePosition.js.map +1 -1
  52. package/dist/functions/dom/getViewportRect.d.ts +2 -2
  53. package/dist/functions/dom/getViewportRect.js +2 -2
  54. package/dist/functions/dom/getViewportRect.js.map +1 -1
  55. package/dist/functions/image/generateMacIcons.d.ts +3 -3
  56. package/dist/functions/image/generateMacIcons.js.map +1 -1
  57. package/dist/functions/image/generateMacTrayIcon.d.ts +3 -3
  58. package/dist/functions/image/generateMacTrayIcon.js.map +1 -1
  59. package/dist/functions/image/generatePaddedImage.d.ts +2 -2
  60. package/dist/functions/image/generatePaddedImage.js.map +1 -1
  61. package/dist/functions/image/generatePwaIcons.d.ts +3 -3
  62. package/dist/functions/image/generatePwaIcons.js.map +1 -1
  63. package/dist/functions/image/generateRoundedImage.d.ts +2 -2
  64. package/dist/functions/image/generateRoundedImage.js.map +1 -1
  65. package/dist/functions/ipc/dispatchIpcRequest.d.ts +2 -2
  66. package/dist/functions/ipc/dispatchIpcRequest.js +1 -1
  67. package/dist/functions/ipc/dispatchIpcRequest.js.map +1 -1
  68. package/dist/functions/software/findSoftware.d.ts +4 -5
  69. package/dist/functions/software/findSoftware.js +32 -20
  70. package/dist/functions/software/findSoftware.js.map +1 -1
  71. package/dist/functions/uniapp/app-plus/buildAndroidApp.d.ts +2 -2
  72. package/dist/functions/uniapp/app-plus/buildAndroidApp.js +97 -24
  73. package/dist/functions/uniapp/app-plus/buildAndroidApp.js.map +1 -1
  74. package/dist/functions/uniapp/build.d.ts +20 -0
  75. package/dist/functions/uniapp/build.js +84 -0
  76. package/dist/functions/uniapp/build.js.map +1 -0
  77. package/dist/functions/uniapp/detectAndroidProjectStructure.d.ts +7 -0
  78. package/dist/functions/uniapp/detectAndroidProjectStructure.js +30 -0
  79. package/dist/functions/uniapp/detectAndroidProjectStructure.js.map +1 -0
  80. package/dist/functions/uniapp/detectProjectType.d.ts +16 -0
  81. package/dist/functions/uniapp/detectProjectType.js +68 -0
  82. package/dist/functions/uniapp/detectProjectType.js.map +1 -0
  83. package/dist/functions/uniapp/parseManifest.d.ts +12 -0
  84. package/dist/functions/uniapp/{app-plus/parseManifest.js → parseManifest.js} +9 -7
  85. package/dist/functions/uniapp/parseManifest.js.map +1 -0
  86. package/dist/functions/utils/generateExports.d.ts +16 -0
  87. package/dist/functions/utils/generateExports.js +34 -0
  88. package/dist/functions/utils/generateExports.js.map +1 -0
  89. package/dist/functions/vue/extractColorsFromVueFile.d.ts +3 -0
  90. package/dist/functions/vue/extractColorsFromVueFile.js +18 -0
  91. package/dist/functions/vue/extractColorsFromVueFile.js.map +1 -0
  92. package/dist/functions/vue/extractColorsFromVueSection.d.ts +3 -0
  93. package/dist/functions/vue/extractColorsFromVueSection.js +53 -0
  94. package/dist/functions/vue/extractColorsFromVueSection.js.map +1 -0
  95. package/dist/functions/vue/filterSections.d.ts +2 -0
  96. package/dist/functions/vue/parseVueFile.d.ts +2 -0
  97. package/dist/functions/xml/modifyXml.d.ts +11 -0
  98. package/dist/functions/xml/modifyXml.js +46 -0
  99. package/dist/functions/xml/modifyXml.js.map +1 -0
  100. package/dist/hooks/useAltool.d.ts +39 -0
  101. package/dist/hooks/useAltool.js +350 -0
  102. package/dist/hooks/useAltool.js.map +1 -0
  103. package/dist/hooks/useLocalStorage.d.ts +4 -4
  104. package/dist/hooks/useLocalStorage.js +51 -18
  105. package/dist/hooks/useLocalStorage.js.map +1 -1
  106. package/dist/hooks/useSessionStorage.d.ts +4 -4
  107. package/dist/hooks/useSessionStorage.js +51 -18
  108. package/dist/hooks/useSessionStorage.js.map +1 -1
  109. package/dist/hooks/useStorage.d.ts +10 -3
  110. package/dist/hooks/useStorage.js +33 -35
  111. package/dist/hooks/useStorage.js.map +1 -1
  112. package/dist/hooks/useStorageWithIndexedDB.d.ts +3 -4
  113. package/dist/hooks/useStorageWithIndexedDB.js +39 -29
  114. package/dist/hooks/useStorageWithIndexedDB.js.map +1 -1
  115. package/dist/hooks/useWebWorker.d.ts +25 -4
  116. package/dist/hooks/useWebWorker.js.map +1 -1
  117. package/dist/hooks/useWorkerFunction.d.ts +22 -4
  118. package/dist/hooks/useWorkerFunction.js +28 -28
  119. package/dist/hooks/useWorkerFunction.js.map +1 -1
  120. package/dist/hooks/useWorkerPool.d.ts +30 -4
  121. package/dist/hooks/useWorkerPool.js.map +1 -1
  122. package/package.json +39 -63
  123. package/references/arraybuffer.d.ts +109 -0
  124. package/references/blob.d.ts +37 -0
  125. package/references/browser.d.ts +69 -174
  126. package/references/chrome.extension.d.ts +83 -0
  127. package/references/console.d.ts +25 -164
  128. package/references/{crypto.d.ts → crypto-js.d.ts} +57 -57
  129. package/references/dom.d.ts +41 -0
  130. package/references/encoding.d.ts +24 -0
  131. package/references/fetch.d.ts +124 -269
  132. package/references/indexeddb.d.ts +49 -0
  133. package/references/json5.d.ts +21 -28
  134. package/references/location.d.ts +16 -0
  135. package/references/node.d.ts +116 -111
  136. package/references/sharp.d.ts +18 -18
  137. package/references/storage.d.ts +17 -111
  138. package/references/timer.d.ts +45 -46
  139. package/references/uniapp.d.ts +51 -9
  140. package/references/url.d.ts +55 -160
  141. package/references/vue.d.ts +86 -113
  142. package/references/webassembly.d.ts +101 -127
  143. package/references/wechat.d.ts +48 -48
  144. package/references/worker.d.ts +152 -206
  145. package/references/xml.d.ts +88 -55
  146. package/types/altool.d.ts +49 -17
  147. package/types/android-build.d.ts +60 -85
  148. package/types/color.d.ts +72 -135
  149. package/types/geometry.d.ts +28 -63
  150. package/types/platform.d.ts +4 -0
  151. package/types/software.d.ts +15 -0
  152. package/types/storage.d.ts +50 -48
  153. package/types/uniapp-android-build.d.ts +49 -0
  154. package/types/vue.d.ts +30 -0
  155. package/types/worker.d.ts +178 -364
  156. package/dist/functions/ag-grid/generateLicense.d.ts +0 -4
  157. package/dist/functions/ag-grid/generateLicense.js +0 -12
  158. package/dist/functions/ag-grid/generateLicense.js.map +0 -1
  159. package/dist/functions/altool/createAltoolClient.d.ts +0 -21
  160. package/dist/functions/altool/createAltoolClient.js +0 -59
  161. package/dist/functions/altool/createAltoolClient.js.map +0 -1
  162. package/dist/functions/altool/getAppInfo.d.ts +0 -13
  163. package/dist/functions/altool/getAppInfo.js +0 -92
  164. package/dist/functions/altool/getAppInfo.js.map +0 -1
  165. package/dist/functions/altool/index.d.ts +0 -10
  166. package/dist/functions/altool/index.js +0 -6
  167. package/dist/functions/altool/index.js.map +0 -1
  168. package/dist/functions/altool/isApiKeyAuth.d.ts +0 -2
  169. package/dist/functions/altool/isApiKeyAuth.js +0 -4
  170. package/dist/functions/altool/isApiKeyAuth.js.map +0 -1
  171. package/dist/functions/altool/isCredentialsAuth.d.ts +0 -2
  172. package/dist/functions/altool/isCredentialsAuth.js +0 -4
  173. package/dist/functions/altool/isCredentialsAuth.js.map +0 -1
  174. package/dist/functions/altool/types.d.ts +0 -26
  175. package/dist/functions/altool/types.js +0 -7
  176. package/dist/functions/altool/types.js.map +0 -1
  177. package/dist/functions/altool/uploadApp.d.ts +0 -6
  178. package/dist/functions/altool/uploadApp.js +0 -36
  179. package/dist/functions/altool/uploadApp.js.map +0 -1
  180. package/dist/functions/altool/validateApp.d.ts +0 -17
  181. package/dist/functions/altool/validateApp.js +0 -59
  182. package/dist/functions/altool/validateApp.js.map +0 -1
  183. package/dist/functions/base64/strToBase64.d.ts +0 -2
  184. package/dist/functions/base64/strToBase64.js +0 -6
  185. package/dist/functions/base64/strToBase64.js.map +0 -1
  186. package/dist/functions/color-converter/COLOR_PATTERNS.d.ts +0 -2
  187. package/dist/functions/color-converter/COLOR_PATTERNS.js.map +0 -1
  188. package/dist/functions/color-converter/colorPatterns.d.ts +0 -4
  189. package/dist/functions/color-converter/colorPatterns.js +0 -41
  190. package/dist/functions/color-converter/colorPatterns.js.map +0 -1
  191. package/dist/functions/color-converter/convertColor.js +0 -238
  192. package/dist/functions/color-converter/convertColor.js.map +0 -1
  193. package/dist/functions/color-converter/detectColorFormat.d.ts +0 -2
  194. package/dist/functions/color-converter/detectColorFormat.js +0 -19
  195. package/dist/functions/color-converter/detectColorFormat.js.map +0 -1
  196. package/dist/functions/color-converter/extractColors.d.ts +0 -16
  197. package/dist/functions/color-converter/extractColors.js +0 -111
  198. package/dist/functions/color-converter/extractColors.js.map +0 -1
  199. package/dist/functions/color-converter/getColorPatterns.d.ts +0 -2
  200. package/dist/functions/color-converter/getColorPatterns.js +0 -11
  201. package/dist/functions/color-converter/getColorPatterns.js.map +0 -1
  202. package/dist/functions/color-converter/getNamedColorMap.d.ts +0 -2
  203. package/dist/functions/color-converter/getNamedColorMap.js +0 -19
  204. package/dist/functions/color-converter/getNamedColorMap.js.map +0 -1
  205. package/dist/functions/color-converter/hexToRgb.d.ts +0 -2
  206. package/dist/functions/color-converter/hexToRgb.js +0 -42
  207. package/dist/functions/color-converter/hexToRgb.js.map +0 -1
  208. package/dist/functions/color-converter/hslToRgb.d.ts +0 -2
  209. package/dist/functions/color-converter/hslToRgb.js +0 -78
  210. package/dist/functions/color-converter/hslToRgb.js.map +0 -1
  211. package/dist/functions/color-converter/hueToRgb.d.ts +0 -1
  212. package/dist/functions/color-converter/hueToRgb.js +0 -14
  213. package/dist/functions/color-converter/hueToRgb.js.map +0 -1
  214. package/dist/functions/color-converter/isColorValue.d.ts +0 -2
  215. package/dist/functions/color-converter/isColorValue.js +0 -79
  216. package/dist/functions/color-converter/isColorValue.js.map +0 -1
  217. package/dist/functions/color-converter/normalizeColor.d.ts +0 -1
  218. package/dist/functions/color-converter/normalizeColor.js +0 -49
  219. package/dist/functions/color-converter/normalizeColor.js.map +0 -1
  220. package/dist/functions/color-converter/parseColorString.d.ts +0 -15
  221. package/dist/functions/color-converter/parseColorString.js +0 -116
  222. package/dist/functions/color-converter/parseColorString.js.map +0 -1
  223. package/dist/functions/color-converter/rgbToHex.d.ts +0 -2
  224. package/dist/functions/color-converter/rgbToHex.js +0 -65
  225. package/dist/functions/color-converter/rgbToHex.js.map +0 -1
  226. package/dist/functions/color-converter/standardizeColor.d.ts +0 -1
  227. package/dist/functions/color-converter/standardizeColor.js +0 -147
  228. package/dist/functions/color-converter/standardizeColor.js.map +0 -1
  229. package/dist/functions/desensitize/desensitizeName.d.ts +0 -1
  230. package/dist/functions/desensitize/desensitizeName.js +0 -8
  231. package/dist/functions/desensitize/desensitizeName.js.map +0 -1
  232. package/dist/functions/desensitize/desensitizePhone.d.ts +0 -1
  233. package/dist/functions/desensitize/desensitizePhone.js +0 -8
  234. package/dist/functions/desensitize/desensitizePhone.js.map +0 -1
  235. package/dist/functions/dom/getViewportSize.d.ts +0 -5
  236. package/dist/functions/dom/getViewportSize.js +0 -7
  237. package/dist/functions/dom/getViewportSize.js.map +0 -1
  238. package/dist/functions/software/buildPathExecutables.d.ts +0 -1
  239. package/dist/functions/software/buildPathExecutables.js +0 -4
  240. package/dist/functions/software/buildPathExecutables.js.map +0 -1
  241. package/dist/functions/software/buildSoftwarePaths.d.ts +0 -2
  242. package/dist/functions/software/buildSoftwarePaths.js +0 -22
  243. package/dist/functions/software/buildSoftwarePaths.js.map +0 -1
  244. package/dist/functions/software/createConfigGenerator.d.ts +0 -8
  245. package/dist/functions/software/createConfigGenerator.js +0 -13
  246. package/dist/functions/software/createConfigGenerator.js.map +0 -1
  247. package/dist/functions/software/detectPlatform.d.ts +0 -2
  248. package/dist/functions/software/detectPlatform.js +0 -4
  249. package/dist/functions/software/detectPlatform.js.map +0 -1
  250. package/dist/functions/software/find.d.ts +0 -2
  251. package/dist/functions/software/find.js +0 -12
  252. package/dist/functions/software/find.js.map +0 -1
  253. package/dist/functions/software/findSoftwareWithGenerator.d.ts +0 -3
  254. package/dist/functions/software/findSoftwareWithGenerator.js +0 -8
  255. package/dist/functions/software/findSoftwareWithGenerator.js.map +0 -1
  256. package/dist/functions/software/getConfigGenerator.d.ts +0 -2
  257. package/dist/functions/software/getConfigGenerator.js +0 -10
  258. package/dist/functions/software/getConfigGenerator.js.map +0 -1
  259. package/dist/functions/software/getEnvironmentSoftwarePath.d.ts +0 -1
  260. package/dist/functions/software/getEnvironmentSoftwarePath.js +0 -4
  261. package/dist/functions/software/getEnvironmentSoftwarePath.js.map +0 -1
  262. package/dist/functions/software/getSupportedSoftware.d.ts +0 -1
  263. package/dist/functions/software/getSupportedSoftware.js +0 -5
  264. package/dist/functions/software/getSupportedSoftware.js.map +0 -1
  265. package/dist/functions/software/parseEnvironmentPaths.d.ts +0 -1
  266. package/dist/functions/software/parseEnvironmentPaths.js +0 -7
  267. package/dist/functions/software/parseEnvironmentPaths.js.map +0 -1
  268. package/dist/functions/software/softwareConfigs.d.ts +0 -2
  269. package/dist/functions/software/softwareConfigs.js +0 -148
  270. package/dist/functions/software/softwareConfigs.js.map +0 -1
  271. package/dist/functions/software/softwareNameMap.d.ts +0 -1
  272. package/dist/functions/software/softwareNameMap.js +0 -9
  273. package/dist/functions/software/softwareNameMap.js.map +0 -1
  274. package/dist/functions/software/types.d.ts +0 -11
  275. package/dist/functions/software/types.js +0 -2
  276. package/dist/functions/software/types.js.map +0 -1
  277. package/dist/functions/string/camelCase.d.ts +0 -1
  278. package/dist/functions/string/camelCase.js +0 -8
  279. package/dist/functions/string/camelCase.js.map +0 -1
  280. package/dist/functions/string/capitalize.d.ts +0 -1
  281. package/dist/functions/string/capitalize.js +0 -6
  282. package/dist/functions/string/capitalize.js.map +0 -1
  283. package/dist/functions/string/escape.d.ts +0 -1
  284. package/dist/functions/string/escape.js +0 -13
  285. package/dist/functions/string/escape.js.map +0 -1
  286. package/dist/functions/string/kebabCase.d.ts +0 -1
  287. package/dist/functions/string/kebabCase.js +0 -10
  288. package/dist/functions/string/kebabCase.js.map +0 -1
  289. package/dist/functions/string/levenshtein.d.ts +0 -1
  290. package/dist/functions/string/levenshtein.js +0 -27
  291. package/dist/functions/string/levenshtein.js.map +0 -1
  292. package/dist/functions/string/mask.d.ts +0 -1
  293. package/dist/functions/string/mask.js +0 -40
  294. package/dist/functions/string/mask.js.map +0 -1
  295. package/dist/functions/string/normalize.d.ts +0 -8
  296. package/dist/functions/string/normalize.js +0 -37
  297. package/dist/functions/string/normalize.js.map +0 -1
  298. package/dist/functions/string/padEnd.d.ts +0 -1
  299. package/dist/functions/string/padEnd.js +0 -8
  300. package/dist/functions/string/padEnd.js.map +0 -1
  301. package/dist/functions/string/padStart.d.ts +0 -1
  302. package/dist/functions/string/padStart.js +0 -8
  303. package/dist/functions/string/padStart.js.map +0 -1
  304. package/dist/functions/string/palindrome.d.ts +0 -3
  305. package/dist/functions/string/palindrome.js +0 -15
  306. package/dist/functions/string/palindrome.js.map +0 -1
  307. package/dist/functions/string/pascalCase.d.ts +0 -1
  308. package/dist/functions/string/pascalCase.js +0 -8
  309. package/dist/functions/string/pascalCase.js.map +0 -1
  310. package/dist/functions/string/similarity.d.ts +0 -1
  311. package/dist/functions/string/similarity.js +0 -38
  312. package/dist/functions/string/similarity.js.map +0 -1
  313. package/dist/functions/string/snakeCase.d.ts +0 -1
  314. package/dist/functions/string/snakeCase.js +0 -10
  315. package/dist/functions/string/snakeCase.js.map +0 -1
  316. package/dist/functions/string/template.d.ts +0 -4
  317. package/dist/functions/string/template.js +0 -21
  318. package/dist/functions/string/template.js.map +0 -1
  319. package/dist/functions/string/unescape.d.ts +0 -1
  320. package/dist/functions/string/unescape.js +0 -13
  321. package/dist/functions/string/unescape.js.map +0 -1
  322. package/dist/functions/string/wordCount.d.ts +0 -5
  323. package/dist/functions/string/wordCount.js +0 -11
  324. package/dist/functions/string/wordCount.js.map +0 -1
  325. package/dist/functions/tencent-cloud/getSecret.d.ts +0 -7
  326. package/dist/functions/tencent-cloud/getSecret.js +0 -19
  327. package/dist/functions/tencent-cloud/getSecret.js.map +0 -1
  328. package/dist/functions/uniapp/app-plus/androidProjectConfigSteps.d.ts +0 -13
  329. package/dist/functions/uniapp/app-plus/androidProjectConfigSteps.js +0 -175
  330. package/dist/functions/uniapp/app-plus/androidProjectConfigSteps.js.map +0 -1
  331. package/dist/functions/uniapp/app-plus/androidProjectStrategy.d.ts +0 -33
  332. package/dist/functions/uniapp/app-plus/androidProjectStrategy.js +0 -60
  333. package/dist/functions/uniapp/app-plus/androidProjectStrategy.js.map +0 -1
  334. package/dist/functions/uniapp/app-plus/buildAndroidProject.d.ts +0 -3
  335. package/dist/functions/uniapp/app-plus/buildAndroidProject.js +0 -60
  336. package/dist/functions/uniapp/app-plus/buildAndroidProject.js.map +0 -1
  337. package/dist/functions/uniapp/app-plus/configureAndroidManifest.d.ts +0 -5
  338. package/dist/functions/uniapp/app-plus/configureAndroidManifest.js +0 -51
  339. package/dist/functions/uniapp/app-plus/configureAndroidManifest.js.map +0 -1
  340. package/dist/functions/uniapp/app-plus/configureAndroidProject.d.ts +0 -3
  341. package/dist/functions/uniapp/app-plus/configureAndroidProject.js +0 -63
  342. package/dist/functions/uniapp/app-plus/configureAndroidProject.js.map +0 -1
  343. package/dist/functions/uniapp/app-plus/configureBuildGradle.d.ts +0 -9
  344. package/dist/functions/uniapp/app-plus/configureBuildGradle.js +0 -57
  345. package/dist/functions/uniapp/app-plus/configureBuildGradle.js.map +0 -1
  346. package/dist/functions/uniapp/app-plus/configureDcloudControl.d.ts +0 -5
  347. package/dist/functions/uniapp/app-plus/configureDcloudControl.js +0 -34
  348. package/dist/functions/uniapp/app-plus/configureDcloudControl.js.map +0 -1
  349. package/dist/functions/uniapp/app-plus/configureStrings.d.ts +0 -5
  350. package/dist/functions/uniapp/app-plus/configureStrings.js +0 -42
  351. package/dist/functions/uniapp/app-plus/configureStrings.js.map +0 -1
  352. package/dist/functions/uniapp/app-plus/copyAppResources.d.ts +0 -8
  353. package/dist/functions/uniapp/app-plus/copyAppResources.js +0 -25
  354. package/dist/functions/uniapp/app-plus/copyAppResources.js.map +0 -1
  355. package/dist/functions/uniapp/app-plus/copyDirectory.d.ts +0 -2
  356. package/dist/functions/uniapp/app-plus/copyDirectory.js +0 -18
  357. package/dist/functions/uniapp/app-plus/copyDirectory.js.map +0 -1
  358. package/dist/functions/uniapp/app-plus/generateUniAppResources.d.ts +0 -2
  359. package/dist/functions/uniapp/app-plus/generateUniAppResources.js +0 -35
  360. package/dist/functions/uniapp/app-plus/generateUniAppResources.js.map +0 -1
  361. package/dist/functions/uniapp/app-plus/parseManifest.d.ts +0 -14
  362. package/dist/functions/uniapp/app-plus/parseManifest.js.map +0 -1
  363. package/dist/functions/uniapp/app-plus/validateOptions.d.ts +0 -3
  364. package/dist/functions/uniapp/app-plus/validateOptions.js +0 -10
  365. package/dist/functions/uniapp/app-plus/validateOptions.js.map +0 -1
  366. package/dist/functions/uniapp/waitForPages.d.ts +0 -2
  367. package/dist/functions/uniapp/waitForPages.js +0 -19
  368. package/dist/functions/uniapp/waitForPages.js.map +0 -1
  369. package/dist/functions/utils/compose.d.ts +0 -1
  370. package/dist/functions/utils/compose.js +0 -10
  371. package/dist/functions/utils/compose.js.map +0 -1
  372. package/dist/functions/utils/cond.d.ts +0 -1
  373. package/dist/functions/utils/cond.js +0 -15
  374. package/dist/functions/utils/cond.js.map +0 -1
  375. package/dist/functions/utils/curry.d.ts +0 -1
  376. package/dist/functions/utils/curry.js +0 -13
  377. package/dist/functions/utils/curry.js.map +0 -1
  378. package/dist/functions/utils/debounce.d.ts +0 -1
  379. package/dist/functions/utils/debounce.js +0 -13
  380. package/dist/functions/utils/debounce.js.map +0 -1
  381. package/dist/functions/utils/evolve.d.ts +0 -3
  382. package/dist/functions/utils/evolve.js +0 -15
  383. package/dist/functions/utils/evolve.js.map +0 -1
  384. package/dist/functions/utils/flow.d.ts +0 -1
  385. package/dist/functions/utils/flow.js +0 -10
  386. package/dist/functions/utils/flow.js.map +0 -1
  387. package/dist/functions/utils/isType.d.ts +0 -11
  388. package/dist/functions/utils/isType.js +0 -30
  389. package/dist/functions/utils/isType.js.map +0 -1
  390. package/dist/functions/utils/memoize.d.ts +0 -1
  391. package/dist/functions/utils/memoize.js +0 -13
  392. package/dist/functions/utils/memoize.js.map +0 -1
  393. package/dist/functions/utils/once.d.ts +0 -1
  394. package/dist/functions/utils/once.js +0 -13
  395. package/dist/functions/utils/once.js.map +0 -1
  396. package/dist/functions/utils/partial.d.ts +0 -1
  397. package/dist/functions/utils/partial.js +0 -13
  398. package/dist/functions/utils/partial.js.map +0 -1
  399. package/dist/functions/utils/pipe.d.ts +0 -1
  400. package/dist/functions/utils/pipe.js +0 -10
  401. package/dist/functions/utils/pipe.js.map +0 -1
  402. package/dist/functions/utils/retryWithBackoff.d.ts +0 -9
  403. package/dist/functions/utils/retryWithBackoff.js +0 -30
  404. package/dist/functions/utils/retryWithBackoff.js.map +0 -1
  405. package/dist/functions/utils/tap.d.ts +0 -1
  406. package/dist/functions/utils/tap.js +0 -14
  407. package/dist/functions/utils/tap.js.map +0 -1
  408. package/dist/functions/utils/throttle.d.ts +0 -1
  409. package/dist/functions/utils/throttle.js +0 -11
  410. package/dist/functions/utils/throttle.js.map +0 -1
  411. package/dist/functions/utils/until.d.ts +0 -1
  412. package/dist/functions/utils/until.js +0 -10
  413. package/dist/functions/utils/until.js.map +0 -1
  414. package/dist/functions/utils/validate.d.ts +0 -8
  415. package/dist/functions/utils/validate.js +0 -45
  416. package/dist/functions/utils/validate.js.map +0 -1
  417. package/dist/functions/vue/dynamicMount.d.ts +0 -15
  418. package/dist/functions/vue/dynamicMount.js +0 -23
  419. package/dist/functions/vue/dynamicMount.js.map +0 -1
  420. package/dist/functions/vue/isVNode.d.ts +0 -2
  421. package/dist/functions/vue/isVNode.js +0 -4
  422. package/dist/functions/vue/isVNode.js.map +0 -1
  423. package/dist/functions/vue/isVueComponent.d.ts +0 -2
  424. package/dist/functions/vue/isVueComponent.js +0 -6
  425. package/dist/functions/vue/isVueComponent.js.map +0 -1
  426. package/dist/functions/vue/processVueFile.d.ts +0 -20
  427. package/dist/functions/vue/processVueFile.js +0 -98
  428. package/dist/functions/vue/processVueFile.js.map +0 -1
  429. package/dist/functions/wechat/miniapp/downloadFile.d.ts +0 -2
  430. package/dist/functions/wechat/miniapp/downloadFile.js +0 -39
  431. package/dist/functions/wechat/miniapp/downloadFile.js.map +0 -1
  432. package/dist/hooks/useAi.d.ts +0 -27
  433. package/dist/hooks/useAi.js +0 -163
  434. package/dist/hooks/useAi.js.map +0 -1
  435. package/dist/hooks/useCache.d.ts +0 -18
  436. package/dist/hooks/useCache.js +0 -82
  437. package/dist/hooks/useCache.js.map +0 -1
  438. package/dist/hooks/useFetch.d.ts +0 -3
  439. package/dist/hooks/useFetch.js +0 -154
  440. package/dist/hooks/useFetch.js.map +0 -1
  441. package/dist/hooks/usePluginSystem.d.ts +0 -11
  442. package/dist/hooks/usePluginSystem.js +0 -34
  443. package/dist/hooks/usePluginSystem.js.map +0 -1
  444. package/dist/hooks/useRequest.d.ts +0 -3
  445. package/dist/hooks/useRequest.js +0 -139
  446. package/dist/hooks/useRequest.js.map +0 -1
  447. package/dist/hooks/useWASM.d.ts +0 -4
  448. package/dist/hooks/useWASM.js +0 -267
  449. package/dist/hooks/useWASM.js.map +0 -1
  450. package/references/browser.extension.d.ts +0 -14
  451. package/types/network.d.ts +0 -184
  452. package/types/util.d.ts +0 -27
  453. package/types/wasm.d.ts +0 -217
@@ -1,148 +0,0 @@
1
- export const SOFTWARE_CONFIGS = {
2
- git: {
3
- win32: {
4
- executable: 'git.exe',
5
- possiblePaths: [
6
- 'C:\\Program Files\\Git\\bin',
7
- 'C:\\Program Files (x86)\\Git\\bin'
8
- ],
9
- userPaths: ['AppData\\Local\\Programs\\Git\\bin'],
10
- registryKey: 'HKEY_LOCAL_MACHINE\\SOFTWARE\\GitForWindows'
11
- },
12
- darwin: {
13
- executable: 'git',
14
- possiblePaths: ['/usr/bin', '/usr/local/bin', '/opt/homebrew/bin'],
15
- userPaths: ['~/.local/bin']
16
- },
17
- linux: {
18
- executable: 'git',
19
- possiblePaths: ['/usr/bin', '/usr/local/bin'],
20
- userPaths: ['~/.local/bin']
21
- },
22
- envVar: 'GIT_PATH'
23
- },
24
- chrome: {
25
- win32: {
26
- executable: 'chrome.exe',
27
- possiblePaths: [
28
- 'C:\\Program Files\\Google\\Chrome\\Application',
29
- 'C:\\Program Files (x86)\\Google\\Chrome\\Application'
30
- ],
31
- userPaths: ['AppData\\Local\\Google\\Chrome\\Application'],
32
- registryKey: 'HKEY_CURRENT_USER\\Software\\Google\\Chrome'
33
- },
34
- darwin: {
35
- executable: 'Google Chrome',
36
- possiblePaths: ['/Applications/Google Chrome.app/Contents/MacOS'],
37
- userPaths: ['~/Applications/Google Chrome.app/Contents/MacOS']
38
- },
39
- linux: {
40
- executable: 'google-chrome',
41
- possiblePaths: ['/usr/bin', '/usr/local/bin', '/opt/google/chrome'],
42
- userPaths: ['~/.local/bin']
43
- },
44
- envVar: 'CHROME_PATH'
45
- },
46
- nodejs: {
47
- win32: {
48
- executable: 'node.exe',
49
- possiblePaths: [
50
- 'C:\\Program Files\\nodejs',
51
- 'C:\\Program Files (x86)\\nodejs'
52
- ],
53
- userPaths: ['AppData\\Roaming\\npm'],
54
- registryKey: 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Node.js'
55
- },
56
- darwin: {
57
- executable: 'node',
58
- possiblePaths: ['/usr/local/bin', '/opt/homebrew/bin', '/usr/bin'],
59
- userPaths: ['~/.local/bin']
60
- },
61
- linux: {
62
- executable: 'node',
63
- possiblePaths: ['/usr/bin', '/usr/local/bin'],
64
- userPaths: ['~/.local/bin']
65
- },
66
- envVar: 'NODE_PATH'
67
- },
68
- wechat: {
69
- win32: {
70
- executable: 'cli.bat',
71
- possiblePaths: [
72
- 'C:\\Program Files (x86)\\Tencent\\微信web开发者工具',
73
- 'C:\\Program Files\\Tencent\\微信web开发者工具'
74
- ],
75
- userPaths: [
76
- 'AppData\\Local\\微信web开发者工具',
77
- 'AppData\\Roaming\\微信web开发者工具'
78
- ],
79
- registryKey: 'HKEY_CURRENT_USER\\Software\\Tencent\\微信web开发者工具'
80
- },
81
- darwin: {
82
- executable: 'cli',
83
- possiblePaths: [
84
- '/Applications/wechatwebdevtools.app/Contents/MacOS',
85
- '/Applications/wechatwebdevtools.app/Contents/Resources/app.nw/bin'
86
- ],
87
- userPaths: [
88
- '/Applications/wechatwebdevtools.app/Contents/MacOS',
89
- '/Applications/wechatwebdevtools.app/Contents/Resources/app.nw/bin'
90
- ]
91
- },
92
- linux: {
93
- executable: 'cli',
94
- possiblePaths: ['/usr/local/bin', '/usr/bin'],
95
- userPaths: ['.local/bin']
96
- },
97
- envVar: 'WECHAT_DEV_TOOLS_PATH'
98
- },
99
- hbuilderx: {
100
- win32: {
101
- executable: 'HBuilderX.exe',
102
- possiblePaths: [
103
- 'C:\\Program Files\\HBuilderX',
104
- 'C:\\Program Files (x86)\\HBuilderX'
105
- ],
106
- userPaths: [
107
- 'AppData\\Local\\HBuilderX',
108
- 'AppData\\Roaming\\HBuilderX'
109
- ],
110
- registryKey: 'HKEY_CURRENT_USER\\Software\\DCloud\\HBuilderX'
111
- },
112
- darwin: {
113
- executable: 'HBuilderX',
114
- possiblePaths: ['/Applications/HBuilderX.app/Contents/MacOS'],
115
- userPaths: ['~/Applications/HBuilderX.app/Contents/MacOS']
116
- },
117
- linux: {
118
- executable: 'HBuilderX',
119
- possiblePaths: ['/opt/HBuilderX', '/usr/local/HBuilderX'],
120
- userPaths: ['~/.local/share/HBuilderX', '~/HBuilderX']
121
- },
122
- envVar: 'HBUILDERX_PATH'
123
- },
124
- altool: {
125
- win32: {
126
- executable: 'altool.exe',
127
- possiblePaths: [],
128
- userPaths: []
129
- },
130
- darwin: {
131
- executable: 'altool',
132
- possiblePaths: [
133
- '/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Versions/A/Support',
134
- '/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/itms/bin',
135
- '/Applications/Xcode.app/Contents/Developer/usr/bin',
136
- '/usr/local/bin'
137
- ],
138
- userPaths: ['~/Applications/Xcode.app/Contents/Developer/usr/bin']
139
- },
140
- linux: {
141
- executable: 'altool',
142
- possiblePaths: [],
143
- userPaths: []
144
- },
145
- envVar: 'ALTOOL_PATH'
146
- }
147
- };
148
- //# sourceMappingURL=softwareConfigs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"softwareConfigs.js","sourceRoot":"","sources":["../../../src/functions/software/softwareConfigs.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,gBAAgB,GAA6C;IACxE,GAAG,EAAE;QACH,KAAK,EAAE;YACL,UAAU,EAAE,SAAS;YACrB,aAAa,EAAE;gBACb,6BAA6B;gBAC7B,mCAAmC;aACpC;YACD,SAAS,EAAE,CAAC,oCAAoC,CAAC;YACjD,WAAW,EAAE,6CAA6C;SAC3D;QACD,MAAM,EAAE;YACN,UAAU,EAAE,KAAK;YACjB,aAAa,EAAE,CAAC,UAAU,EAAE,gBAAgB,EAAE,mBAAmB,CAAC;YAClE,SAAS,EAAE,CAAC,cAAc,CAAC;SAC5B;QACD,KAAK,EAAE;YACL,UAAU,EAAE,KAAK;YACjB,aAAa,EAAE,CAAC,UAAU,EAAE,gBAAgB,CAAC;YAC7C,SAAS,EAAE,CAAC,cAAc,CAAC;SAC5B;QACD,MAAM,EAAE,UAAU;KACnB;IAED,MAAM,EAAE;QACN,KAAK,EAAE;YACL,U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WARE_NAME_MAP = {
2
- wechat: 'wechat',
3
- chrome: 'chrome',
4
- git: 'git',
5
- hbuilderx: 'hbuilderx',
6
- nodejs: 'nodejs',
7
- node: 'nodejs',
8
- };
9
- //# sourceMappingURL=softwareNameMap.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"softwareNameMap.js","sourceRoot":"","sources":["../../../src/functions/software/softwareNameMap.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,iBAAiB,GAA2B;IACvD,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,GAAG,EAAE,KAAK;IACV,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,QAAQ;CACf,CAAA"}
@@ -1,11 +0,0 @@
1
- export interface SoftwareConfig {
2
- executable: string;
3
- possiblePaths: string[];
4
- userPaths?: string[];
5
- registryKey?: string;
6
- envVar: string;
7
- }
8
- export type Platform = 'win32' | 'darwin' | 'linux';
9
- export interface ProcessLike {
10
- platform: string;
11
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/functions/software/types.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- export declare function camelCase(str: string): string;
@@ -1,8 +0,0 @@
1
- export function camelCase(str) {
2
- if (!str)
3
- return str;
4
- return str
5
- .replace(/[-_\s.]+(.)?/g, (_, char) => char ? char.toUpperCase() : '')
6
- .replace(/^[A-Z]/, (char) => char.toLowerCase());
7
- }
8
- //# sourceMappingURL=camelCase.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"camelCase.js","sourceRoot":"","sources":["../../../src/functions/string/camelCase.ts"],"names":[],"mappings":"AAoBA,MAAM,UAAU,SAAS,CAAC,GAAW;IACnC,IAAI,CAAC,GAAG;QAAE,OAAO,GAAG,CAAA;IAEpB,OAAO,GAAG;SACP,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACrE,OAAO,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAA;AACpD,CAAC"}
@@ -1 +0,0 @@
1
- export declare function capitalize(str: string): string;
@@ -1,6 +0,0 @@
1
- export function capitalize(str) {
2
- if (!str)
3
- return str;
4
- return str.charAt(0).toUpperCase() + str.slice(1);
5
- }
6
- //# sourceMappingURL=capitalize.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"capitalize.js","sourceRoot":"","sources":["../../../src/functions/string/capitalize.ts"],"names":[],"mappings":"AAkBA,MAAM,UAAU,UAAU,CAAC,GAAW;IACpC,IAAI,CAAC,GAAG;QAAE,OAAO,GAAG,CAAA;IAEpB,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AACnD,CAAC"}
@@ -1 +0,0 @@
1
- export declare function escape(str: string): string;
@@ -1,13 +0,0 @@
1
- export function escape(str) {
2
- if (!str)
3
- return str;
4
- const htmlEscapes = {
5
- '&': '&amp;',
6
- '<': '&lt;',
7
- '>': '&gt;',
8
- '"': '&quot;',
9
- "'": '&#39;'
10
- };
11
- return str.replace(/[&<>"']/g, (match) => htmlEscapes[match]);
12
- }
13
- //# sourceMappingURL=escape.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"escape.js","sourceRoot":"","sources":["../../../src/functions/string/escape.ts"],"names":[],"mappings":"AAqBA,MAAM,UAAU,MAAM,CAAC,GAAW;IAChC,IAAI,CAAC,GAAG;QAAE,OAAO,GAAG,CAAA;IAEpB,MAAM,WAAW,GAA2B;QAC1C,GAAG,EAAE,OAAO;QACZ,GAAG,EAAE,MAAM;QACX,GAAG,EAAE,MAAM;QACX,GAAG,EAAE,QAAQ;QACb,GAAG,EAAE,OAAO;KACb,CAAA;IAED,OAAO,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAA;AAC/D,CAAC"}
@@ -1 +0,0 @@
1
- export declare function kebabCase(str: string): string;
@@ -1,10 +0,0 @@
1
- export function kebabCase(str) {
2
- if (!str)
3
- return str;
4
- return str
5
- .replace(/([a-z])([A-Z])/g, '$1-$2')
6
- .replace(/[-_\s.]+/g, '-')
7
- .toLowerCase()
8
- .replace(/^-+|-+$/g, '');
9
- }
10
- //# sourceMappingURL=kebabCase.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"kebabCase.js","sourceRoot":"","sources":["../../../src/functions/string/kebabCase.ts"],"names":[],"mappings":"AAoBA,MAAM,UAAU,SAAS,CAAC,GAAW;IACnC,IAAI,CAAC,GAAG;QAAE,OAAO,GAAG,CAAA;IAEpB,OAAO,GAAG;SACP,OAAO,CAAC,iBAAiB,EAAE,OAAO,CAAC;SACnC,OAAO,CAAC,WAAW,EAAE,GAAG,CAAC;SACzB,WAAW,EAAE;SACb,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAA;AAC5B,CAAC"}
@@ -1 +0,0 @@
1
- export declare function levenshtein(str1: string, str2: string): number;
@@ -1,27 +0,0 @@
1
- export function levenshtein(str1, str2) {
2
- if (str1 === str2)
3
- return 0;
4
- if (str1.length === 0)
5
- return str2.length;
6
- if (str2.length === 0)
7
- return str1.length;
8
- const matrix = [];
9
- for (let i = 0; i <= str2.length; i++) {
10
- matrix[i] = [i];
11
- }
12
- for (let j = 0; j <= str1.length; j++) {
13
- matrix[0][j] = j;
14
- }
15
- for (let i = 1; i <= str2.length; i++) {
16
- for (let j = 1; j <= str1.length; j++) {
17
- if (str2.charAt(i - 1) === str1.charAt(j - 1)) {
18
- matrix[i][j] = matrix[i - 1][j - 1];
19
- }
20
- else {
21
- matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, matrix[i][j - 1] + 1, matrix[i - 1][j] + 1);
22
- }
23
- }
24
- }
25
- return matrix[str2.length][str1.length];
26
- }
27
- //# sourceMappingURL=levenshtein.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"levenshtein.js","sourceRoot":"","sources":["../../../src/functions/string/levenshtein.ts"],"names":[],"mappings":"AAqBA,MAAM,UAAU,WAAW,CAAC,IAAY,EAAE,IAAY;IACpD,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,CAAC,CAAA;IAC3B,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC,MAAM,CAAA;IACzC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC,MAAM,CAAA;IAEzC,MAAM,MAAM,GAAe,EAAE,CAAA;IAG7B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACtC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC;IAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACtC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;IAClB,CAAC;IAGD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACtC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACtC,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;gBAC9C,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA;YACrC,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CACrB,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EACxB,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EACpB,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CACrB,CAAA;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;AACzC,CAAC"}
@@ -1 +0,0 @@
1
- export declare function mask(str: string, type?: 'phone' | 'email' | 'card' | 'idcard' | 'name' | 'auto', maskChar?: string): string;
@@ -1,40 +0,0 @@
1
- export function mask(str, type = 'auto', maskChar = '*') {
2
- if (!str || typeof str !== 'string')
3
- return str;
4
- switch (type) {
5
- case 'phone':
6
- return str.replace(/^(\d{3})\d{4}(\d{4})$/, `$1${maskChar.repeat(4)}$2`);
7
- case 'email':
8
- return str.replace(/^(\w)\w*(@.+)$/, `$1${maskChar.repeat(3)}$2`);
9
- case 'card':
10
- return str.replace(/^(\d{4})\d+(\d{4})$/, `$1${maskChar.repeat(4)}$2`);
11
- case 'idcard':
12
- return str.replace(/^(\d{6})\d+(\d{4})$/, `$1${maskChar.repeat(4)}$2`);
13
- case 'name':
14
- return str.replace(/^(\w)\w*$/, `$1${maskChar}`);
15
- case 'auto':
16
- default:
17
- if (str.length === 11 && /^1\d{10}$/.test(str)) {
18
- return mask(str, 'phone', maskChar);
19
- }
20
- else if (str.includes('@')) {
21
- return mask(str, 'email', maskChar);
22
- }
23
- else if (str.length >= 16 && /^\d+$/.test(str)) {
24
- return mask(str, 'card', maskChar);
25
- }
26
- else if (str.length === 18 && /^\d{17}[\dXx]$/.test(str)) {
27
- return mask(str, 'idcard', maskChar);
28
- }
29
- else if (str.length <= 4 && /^[\u4e00-\u9fa5a-zA-Z]+$/.test(str)) {
30
- return mask(str, 'name', maskChar);
31
- }
32
- else {
33
- const len = str.length;
34
- if (len <= 2)
35
- return str;
36
- return str.charAt(0) + maskChar.repeat(len - 2) + str.charAt(len - 1);
37
- }
38
- }
39
- }
40
- //# sourceMappingURL=mask.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mask.js","sourceRoot":"","sources":["../../../src/functions/string/mask.ts"],"names":[],"mappings":"AAqBA,MAAM,UAAU,IAAI,CAClB,GAAW,EACX,OAAgE,MAAM,EACtE,WAAmB,GAAG;IAEtB,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,GAAG,CAAA;IAE/C,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,OAAO;YAEV,OAAO,GAAG,CAAC,OAAO,CAAC,uBAAuB,EAAE,KAAK,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;QAE1E,KAAK,OAAO;YAEV,OAAO,GAAG,CAAC,OAAO,CAAC,gBAAgB,EAAE,KAAK,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;QAEnE,KAAK,MAAM;YAET,OAAO,GAAG,CAAC,OAAO,CAAC,qBAAqB,EAAE,KAAK,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;QAExE,KAAK,QAAQ;YAEX,OAAO,GAAG,CAAC,OAAO,CAAC,qBAAqB,EAAE,KAAK,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;QAExE,KAAK,MAAM;YAET,OAAO,GAAG,CAAC,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;YACvE,CAAC;IACL,CAAC;AACH,CAAC"}
@@ -1,8 +0,0 @@
1
- export declare function normalize(str: string, options?: {
2
- case?: 'lower' | 'upper' | 'title' | 'none';
3
- trim?: boolean;
4
- removeSpecial?: boolean;
5
- removeNumbers?: boolean;
6
- removePunctuation?: boolean;
7
- normalizeWhitespace?: boolean;
8
- }): string;
@@ -1,37 +0,0 @@
1
- export function normalize(str, options = {}) {
2
- if (!str || typeof str !== 'string')
3
- return str;
4
- const { case: caseOption = 'none', trim = true, removeSpecial = false, removeNumbers = false, removePunctuation = false, normalizeWhitespace = true } = options;
5
- let result = str;
6
- if (removeSpecial) {
7
- result = result.replace(/[^\w\s]/g, '');
8
- }
9
- if (removeNumbers) {
10
- result = result.replace(/\d/g, '');
11
- }
12
- if (removePunctuation) {
13
- result = result.replace(/[^\w\s]/g, '');
14
- }
15
- if (normalizeWhitespace) {
16
- result = result.replace(/\s+/g, ' ');
17
- }
18
- if (trim) {
19
- result = result.trim();
20
- }
21
- switch (caseOption) {
22
- case 'lower':
23
- result = result.toLowerCase();
24
- break;
25
- case 'upper':
26
- result = result.toUpperCase();
27
- break;
28
- case 'title':
29
- result = result.toLowerCase().replace(/\b\w/g, (char) => char.toUpperCase());
30
- break;
31
- case 'none':
32
- default:
33
- break;
34
- }
35
- return result;
36
- }
37
- //# sourceMappingURL=normalize.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"normalize.js","sourceRoot":"","sources":["../../../src/functions/string/normalize.ts"],"names":[],"mappings":"AA0CA,MAAM,UAAU,SAAS,CACvB,GAAW,EACX,UAOI,EAAE;IAEN,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,GAAG,CAAA;IAE/C,MAAM,EACJ,IAAI,EAAE,UAAU,GAAG,MAAM,EACzB,IAAI,GAAG,IAAI,EACX,aAAa,GAAG,KAAK,EACrB,aAAa,GAAG,KAAK,EACrB,iBAAiB,GAAG,KAAK,EACzB,mBAAmB,GAAG,IAAI,EAC3B,GAAG,OAAO,CAAA;IAEX,IAAI,MAAM,GAAG,GAAG,CAAA;IAGhB,IAAI,aAAa,EAAE,CAAC;QAClB,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAA;IACzC,CAAC;IAGD,IAAI,aAAa,EAAE,CAAC;QAClB,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;IACpC,CAAC;IAGD,IAAI,iBAAiB,EAAE,CAAC;QACtB,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAA;IACzC,CAAC;IAGD,IAAI,mBAAmB,EAAE,CAAC;QACxB,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACtC,CAAC;IAGD,IAAI,IAAI,EAAE,CAAC;QACT,MAAM,GAAG,MAAM,CAAC,IAAI,EAAE,CAAA;IACxB,CAAC;IAGD,QAAQ,UAAU,EAAE,CAAC;QACnB,KAAK,OAAO;YACV,MAAM,GAAG,MAAM,CAAC,WAAW,EAAE,CAAA;YAC7B,MAAK;QACP,KAAK,OAAO;YACV,MAAM,GAAG,MAAM,CAAC,WAAW,EAAE,CAAA;YAC7B,MAAK;QACP,KAAK,OAAO;YACV,MAAM,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAA;YAC5E,MAAK;QACP,KAAK,MAAM,CAAC;QACZ;YACE,MAAK;IACT,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC"}
@@ -1 +0,0 @@
1
- export declare function padEnd(str: string, targetLength: number, padString?: string): string;
@@ -1,8 +0,0 @@
1
- export function padEnd(str, targetLength, padString = ' ') {
2
- if (str.length >= targetLength)
3
- return str;
4
- const padLength = targetLength - str.length;
5
- const pad = padString.repeat(Math.ceil(padLength / padString.length)).slice(0, padLength);
6
- return str + pad;
7
- }
8
- //# sourceMappingURL=padEnd.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"padEnd.js","sourceRoot":"","sources":["../../../src/functions/string/padEnd.ts"],"names":[],"mappings":"AAmBA,MAAM,UAAU,MAAM,CAAC,GAAW,EAAE,YAAoB,EAAE,YAAoB,GAAG;IAC/E,IAAI,GAAG,CAAC,MAAM,IAAI,YAAY;QAAE,OAAO,GAAG,CAAA;IAE1C,MAAM,SAAS,GAAG,YAAY,GAAG,GAAG,CAAC,MAAM,CAAA;IAC3C,MAAM,GAAG,GAAG,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAA;IAEzF,OAAO,GAAG,GAAG,GAAG,CAAA;AAClB,CAAC"}
@@ -1 +0,0 @@
1
- export declare function padStart(str: string, targetLength: number, padString?: string): string;
@@ -1,8 +0,0 @@
1
- export function padStart(str, targetLength, padString = ' ') {
2
- if (str.length >= targetLength)
3
- return str;
4
- const padLength = targetLength - str.length;
5
- const pad = padString.repeat(Math.ceil(padLength / padString.length)).slice(0, padLength);
6
- return pad + str;
7
- }
8
- //# sourceMappingURL=padStart.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"padStart.js","sourceRoot":"","sources":["../../../src/functions/string/padStart.ts"],"names":[],"mappings":"AAmBA,MAAM,UAAU,QAAQ,CAAC,GAAW,EAAE,YAAoB,EAAE,YAAoB,GAAG;IACjF,IAAI,GAAG,CAAC,MAAM,IAAI,YAAY;QAAE,OAAO,GAAG,CAAA;IAE1C,MAAM,SAAS,GAAG,YAAY,GAAG,GAAG,CAAC,MAAM,CAAA;IAC3C,MAAM,GAAG,GAAG,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAA;IAEzF,OAAO,GAAG,GAAG,GAAG,CAAA;AAClB,CAAC"}
@@ -1,3 +0,0 @@
1
- export declare function palindrome(str: string, options?: {
2
- strict?: boolean;
3
- }): boolean;
@@ -1,15 +0,0 @@
1
- export function palindrome(str, options = {}) {
2
- if (!str || typeof str !== 'string')
3
- return true;
4
- const { strict = false } = options;
5
- if (strict) {
6
- return str === str.split('').reverse().join('');
7
- }
8
- const cleaned = str
9
- .toLowerCase()
10
- .replace(/[\s\p{P}]/gu, '');
11
- if (cleaned.length <= 1)
12
- return true;
13
- return cleaned === cleaned.split('').reverse().join('');
14
- }
15
- //# sourceMappingURL=palindrome.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"palindrome.js","sourceRoot":"","sources":["../../../src/functions/string/palindrome.ts"],"names":[],"mappings":"AAyBA,MAAM,UAAU,UAAU,CACxB,GAAW,EACX,UAEI,EAAE;IAEN,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAA;IAEhD,MAAM,EAAE,MAAM,GAAG,KAAK,EAAE,GAAG,OAAO,CAAA;IAElC,IAAI,MAAM,EAAE,CAAC;QAEX,OAAO,GAAG,KAAK,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IACjD,CAAC;IAGD,MAAM,OAAO,GAAG,GAAG;SAChB,WAAW,EAAE;SACb,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAA;IAE7B,IAAI,OAAO,CAAC,MAAM,IAAI,CAAC;QAAE,OAAO,IAAI,CAAA;IAEpC,OAAO,OAAO,KAAK,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACzD,CAAC"}
@@ -1 +0,0 @@
1
- export declare function pascalCase(str: string): string;
@@ -1,8 +0,0 @@
1
- export function pascalCase(str) {
2
- if (!str)
3
- return str;
4
- const camelCaseStr = str
5
- .replace(/[-_\s.]+(.)?/g, (_, char) => char ? char.toUpperCase() : '');
6
- return camelCaseStr.charAt(0).toUpperCase() + camelCaseStr.slice(1);
7
- }
8
- //# sourceMappingURL=pascalCase.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pascalCase.js","sourceRoot":"","sources":["../../../src/functions/string/pascalCase.ts"],"names":[],"mappings":"AAoBA,MAAM,UAAU,UAAU,CAAC,GAAW;IACpC,IAAI,CAAC,GAAG;QAAE,OAAO,GAAG,CAAA;IAEpB,MAAM,YAAY,GAAG,GAAG;SACrB,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;IAExE,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AACrE,CAAC"}
@@ -1 +0,0 @@
1
- export declare function similarity(str1: string, str2: string): number;
@@ -1,38 +0,0 @@
1
- export function similarity(str1, str2) {
2
- if (str1 === str2)
3
- return 1;
4
- if (str1.length === 0 && str2.length === 0)
5
- return 1;
6
- if (str1.length === 0 || str2.length === 0)
7
- return 0;
8
- const distance = levenshtein(str1, str2);
9
- const maxLength = Math.max(str1.length, str2.length);
10
- return 1 - distance / maxLength;
11
- }
12
- function levenshtein(str1, str2) {
13
- if (str1 === str2)
14
- return 0;
15
- if (str1.length === 0)
16
- return str2.length;
17
- if (str2.length === 0)
18
- return str1.length;
19
- const matrix = [];
20
- for (let i = 0; i <= str2.length; i++) {
21
- matrix[i] = [i];
22
- }
23
- for (let j = 0; j <= str1.length; j++) {
24
- matrix[0][j] = j;
25
- }
26
- for (let i = 1; i <= str2.length; i++) {
27
- for (let j = 1; j <= str1.length; j++) {
28
- if (str2.charAt(i - 1) === str1.charAt(j - 1)) {
29
- matrix[i][j] = matrix[i - 1][j - 1];
30
- }
31
- else {
32
- matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, matrix[i][j - 1] + 1, matrix[i - 1][j] + 1);
33
- }
34
- }
35
- }
36
- return matrix[str2.length][str1.length];
37
- }
38
- //# sourceMappingURL=similarity.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"similarity.js","sourceRoot":"","sources":["../../../src/functions/string/similarity.ts"],"names":[],"mappings":"AAuBA,MAAM,UAAU,UAAU,CAAC,IAAY,EAAE,IAAY;IACnD,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,CAAC,CAAA;IAC3B,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,CAAC,CAAA;IACpD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,CAAC,CAAA;IAEpD,MAAM,QAAQ,GAAG,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;IACxC,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;IAEpD,OAAO,CAAC,GAAG,QAAQ,GAAG,SAAS,CAAA;AACjC,CAAC;AAKD,SAAS,WAAW,CAAC,IAAY,EAAE,IAAY;IAC7C,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,CAAC,CAAA;IAC3B,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC,MAAM,CAAA;IACzC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC,MAAM,CAAA;IAEzC,MAAM,MAAM,GAAe,EAAE,CAAA;IAG7B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC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}
@@ -1 +0,0 @@
1
- export declare function snakeCase(str: string): string;
@@ -1,10 +0,0 @@
1
- export function snakeCase(str) {
2
- if (!str)
3
- return str;
4
- return str
5
- .replace(/([a-z])([A-Z])/g, '$1_$2')
6
- .replace(/[-_\s.]+/g, '_')
7
- .toLowerCase()
8
- .replace(/^_+|_+$/g, '');
9
- }
10
- //# sourceMappingURL=snakeCase.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"snakeCase.js","sourceRoot":"","sources":["../../../src/functions/string/snakeCase.ts"],"names":[],"mappings":"AAoBA,MAAM,UAAU,SAAS,CAAC,GAAW;IACnC,IAAI,CAAC,GAAG;QAAE,OAAO,GAAG,CAAA;IAEpB,OAAO,GAAG;SACP,OAAO,CAAC,iBAAiB,EAAE,OAAO,CAAC;SACnC,OAAO,CAAC,WAAW,EAAE,GAAG,CAAC;SACzB,WAAW,EAAE;SACb,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAA;AAC5B,CAAC"}
@@ -1,4 +0,0 @@
1
- export declare function template(template: string, data: Record<string, any>, options?: {
2
- placeholder?: string;
3
- defaultValue?: string;
4
- }): string;
@@ -1,21 +0,0 @@
1
- export function template(template, data, options = {}) {
2
- if (!template || typeof template !== 'string')
3
- return template;
4
- const { placeholder = /{{([^}]+)}}/g, defaultValue = '' } = options;
5
- return template.replace(placeholder, (match, key) => {
6
- const keys = key.trim().split('.');
7
- let value = data;
8
- for (const k of keys) {
9
- if (value == null)
10
- return defaultValue;
11
- if (k === 'length' && Array.isArray(value)) {
12
- value = value.length;
13
- }
14
- else {
15
- value = value[k];
16
- }
17
- }
18
- return value != null ? String(value) : defaultValue;
19
- });
20
- }
21
- //# sourceMappingURL=template.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"template.js","sourceRoot":"","sources":["../../../src/functions/string/template.ts"],"names":[],"mappings":"AA8BA,MAAM,UAAU,QAAQ,CACtB,QAAgB,EAChB,IAAyB,EACzB,UAGI,EAAE;IAEN,IAAI,CAAC,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ;QAAE,OAAO,QAAQ,CAAA;IAE9D,MAAM,EAAE,WAAW,GAAG,cAAc,EAAE,YAAY,GAAG,EAAE,EAAE,GAAG,OAAO,CAAA;IAEnE,OAAO,QAAQ,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QAClD,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QAClC,IAAI,KAAK,GAAQ,IAAI,CAAA;QAErB,KAAK,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;YACrB,IAAI,KAAK,IAAI,IAAI;gBAAE,OAAO,YAAY,CAAA;YAEtC,IAAI,CAAC,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC3C,KAAK,GAAG,KAAK,CAAC,MAAM,CAAA;YACtB,CAAC;iBAAM,CAAC;gBACN,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAA;YAClB,CAAC;QACH,CAAC;QAED,OAAO,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,YAAY,CAAA;IACrD,CAAC,CAAC,CAAA;AACJ,CAAC"}
@@ -1 +0,0 @@
1
- export declare function unescape(str: string): string;
@@ -1,13 +0,0 @@
1
- export function unescape(str) {
2
- if (!str)
3
- return str;
4
- const htmlUnescapes = {
5
- '&amp;': '&',
6
- '&lt;': '<',
7
- '&gt;': '>',
8
- '&quot;': '"',
9
- '&#39;': "'"
10
- };
11
- return str.replace(/&(?:amp|lt|gt|quot|#39);/g, (match) => htmlUnescapes[match]);
12
- }
13
- //# sourceMappingURL=unescape.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"unescape.js","sourceRoot":"","sources":["../../../src/functions/string/unescape.ts"],"names":[],"mappings":"AAqBA,MAAM,UAAU,QAAQ,CAAC,GAAW;IAClC,IAAI,CAAC,GAAG;QAAE,OAAO,GAAG,CAAA;IAEpB,MAAM,aAAa,GAA2B;QAC5C,OAAO,EAAE,GAAG;QACZ,MAAM,EAAE,GAAG;QACX,MAAM,EAAE,GAAG;QACX,QAAQ,EAAE,GAAG;QACb,OAAO,EAAE,GAAG;KACb,CAAA;IAED,OAAO,GAAG,CAAC,OAAO,CAAC,2BAA2B,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAA;AAClF,CAAC"}
@@ -1,5 +0,0 @@
1
- export declare function wordCount(str: string, options?: {
2
- separator?: string | RegExp;
3
- includeEmpty?: boolean;
4
- minLength?: number;
5
- }): number;
@@ -1,11 +0,0 @@
1
- export function wordCount(str, options = {}) {
2
- if (!str || typeof str !== 'string')
3
- return 0;
4
- const { separator = /\s+/, includeEmpty = false, minLength = 0 } = options;
5
- const words = str.split(separator);
6
- if (includeEmpty) {
7
- return words.filter(word => word.length >= minLength).length;
8
- }
9
- return words.filter(word => word.trim().length > minLength).length;
10
- }
11
- //# sourceMappingURL=wordCount.js.map