wsemi 1.7.21 → 1.7.22

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 (396) hide show
  1. package/README.md +1 -1
  2. package/dist/wsemi.umd.js +3 -3
  3. package/dist/wsemi.umd.js.map +1 -1
  4. package/docs/-_class.mjs.html +1 -1
  5. package/docs/ab2blob.mjs.html +1 -1
  6. package/docs/ab2u8arr.mjs.html +1 -1
  7. package/docs/addExcelWorksheetFromData.mjs.html +1 -1
  8. package/docs/addMonth.mjs.html +1 -1
  9. package/docs/aes2str.mjs.html +1 -1
  10. package/docs/alive.mjs.html +1 -1
  11. package/docs/arr2dt.mjs.html +1 -1
  12. package/docs/arrAccum.mjs.html +1 -1
  13. package/docs/arrAdd.mjs.html +1 -1
  14. package/docs/arrAt.mjs.html +1 -1
  15. package/docs/arrDiff.mjs.html +1 -1
  16. package/docs/arrFilterByKeywords.mjs.html +1 -1
  17. package/docs/arrFilterByNum.mjs.html +1 -1
  18. package/docs/arrFilterByPnum.mjs.html +1 -1
  19. package/docs/arrFilterByPnumAndToLog.mjs.html +1 -1
  20. package/docs/arrFind.mjs.html +1 -1
  21. package/docs/arrGroupByMaxmin.mjs.html +1 -1
  22. package/docs/arrHas.mjs.html +1 -1
  23. package/docs/arrInsert.mjs.html +1 -1
  24. package/docs/arrLookupByMaxmin.mjs.html +1 -1
  25. package/docs/arrMax.mjs.html +1 -1
  26. package/docs/arrMin.mjs.html +1 -1
  27. package/docs/arrMulti.mjs.html +1 -1
  28. package/docs/arrNorm.mjs.html +1 -1
  29. package/docs/arrProduct.mjs.html +1 -1
  30. package/docs/arrReduce.mjs.html +1 -1
  31. package/docs/arrSep.mjs.html +1 -1
  32. package/docs/arrSort.mjs.html +1 -1
  33. package/docs/asind.mjs.html +1 -1
  34. package/docs/atan2d.mjs.html +1 -1
  35. package/docs/atand.mjs.html +1 -1
  36. package/docs/attstr.mjs.html +392 -331
  37. package/docs/b642obj.mjs.html +1 -1
  38. package/docs/b642str.mjs.html +1 -1
  39. package/docs/b642u16arr.mjs.html +1 -1
  40. package/docs/b642u8arr.mjs.html +1 -1
  41. package/docs/binstr.mjs.html +1 -1
  42. package/docs/blob2ab.mjs.html +1 -1
  43. package/docs/blob2b64.mjs.html +1 -1
  44. package/docs/blob2str.mjs.html +1 -1
  45. package/docs/blob2u8arr.mjs.html +1 -1
  46. package/docs/blobs2b64s.mjs.html +1 -1
  47. package/docs/blobs2u8arrs.mjs.html +1 -1
  48. package/docs/bodyLog.mjs.html +1 -1
  49. package/docs/browserView.mjs.html +1 -1
  50. package/docs/browserViewFromBlob.mjs.html +1 -1
  51. package/docs/browserViewFromText.mjs.html +1 -1
  52. package/docs/browserViewFromU8arr.mjs.html +1 -1
  53. package/docs/bs2u8arr.mjs.html +1 -1
  54. package/docs/bufRead.mjs.html +1 -1
  55. package/docs/bufReadDbl.mjs.html +1 -1
  56. package/docs/bufWrite.mjs.html +1 -1
  57. package/docs/bufWriteDbl.mjs.html +1 -1
  58. package/docs/cache.mjs.html +1 -1
  59. package/docs/cbol.mjs.html +1 -1
  60. package/docs/cdbl.mjs.html +1 -1
  61. package/docs/cfilesize.mjs.html +1 -1
  62. package/docs/cfinancial.mjs.html +1 -1
  63. package/docs/cint.mjs.html +1 -1
  64. package/docs/clearXSS.mjs.html +1 -1
  65. package/docs/color.mjs.html +1 -1
  66. package/docs/composeToTree.mjs.html +1 -1
  67. package/docs/convertToTree.mjs.html +1 -1
  68. package/docs/copyStrToClipboard.mjs.html +1 -1
  69. package/docs/cosd.mjs.html +1 -1
  70. package/docs/cotd.mjs.html +1 -1
  71. package/docs/createExcelWorkbook.mjs.html +1 -1
  72. package/docs/cscd.mjs.html +1 -1
  73. package/docs/cstr.mjs.html +1 -1
  74. package/docs/day2cht.mjs.html +1 -1
  75. package/docs/debounce.mjs.html +1 -1
  76. package/docs/delay.mjs.html +1 -1
  77. package/docs/dig.mjs.html +1 -1
  78. package/docs/digExp.mjs.html +1 -1
  79. package/docs/domAlert.mjs.html +1 -1
  80. package/docs/domAppend.mjs.html +1 -1
  81. package/docs/domCancelEvent.mjs.html +1 -1
  82. package/docs/domCompareText.mjs.html +1 -1
  83. package/docs/domCompareTextDyn.mjs.html +1 -1
  84. package/docs/domConvertToPic.mjs.html +1 -1
  85. package/docs/domConvertToPicDyn.mjs.html +1 -1
  86. package/docs/domDetect.mjs.html +1 -1
  87. package/docs/domDrag.mjs.html +1 -1
  88. package/docs/domDragBarAndScroll.mjs.html +1 -1
  89. package/docs/domDragPreview.mjs.html +1 -1
  90. package/docs/domDropFiles.mjs.html +1 -1
  91. package/docs/domElementsFromPoint.mjs.html +1 -1
  92. package/docs/domFadeIn.mjs.html +1 -1
  93. package/docs/domFadeOut.mjs.html +1 -1
  94. package/docs/domFind.mjs.html +1 -1
  95. package/docs/domFinds.mjs.html +1 -1
  96. package/docs/domGetAttr.mjs.html +1 -1
  97. package/docs/domGetBoudRect.mjs.html +1 -1
  98. package/docs/domGetBoudRectRefSelf.mjs.html +1 -1
  99. package/docs/domGetFileAccept.mjs.html +1 -1
  100. package/docs/domGetFiles.mjs.html +1 -1
  101. package/docs/domGetParents.mjs.html +1 -1
  102. package/docs/domGetPointFromEvent.mjs.html +1 -1
  103. package/docs/domGetScrollableParent.mjs.html +1 -1
  104. package/docs/domGetWindowSize.mjs.html +1 -1
  105. package/docs/domIsClientXYIn.mjs.html +1 -1
  106. package/docs/domIsFocused.mjs.html +1 -1
  107. package/docs/domIsVisible.mjs.html +1 -1
  108. package/docs/domPrepend.mjs.html +1 -1
  109. package/docs/domRemove.mjs.html +1 -1
  110. package/docs/domRenderMarkdownMind.mjs.html +1 -1
  111. package/docs/domRenderMarkdownMindDyn.mjs.html +1 -1
  112. package/docs/domRipple.mjs.html +1 -1
  113. package/docs/domScrollIntoView.mjs.html +1 -1
  114. package/docs/domScrollTo.mjs.html +1 -1
  115. package/docs/domShowImages.mjs.html +1 -1
  116. package/docs/domShowImagesDyn.mjs.html +1 -1
  117. package/docs/domShowInputAndGetFiles.mjs.html +1 -1
  118. package/docs/domShowInputAndGetFilesU8Arrs.mjs.html +1 -1
  119. package/docs/domTooltip.mjs.html +1 -1
  120. package/docs/domTriggerEvent.mjs.html +1 -1
  121. package/docs/domVirtualCreate.mjs.html +1 -1
  122. package/docs/domVirtualCreateQueue.mjs.html +1 -1
  123. package/docs/downloadExcelFileFromData.mjs.html +1 -1
  124. package/docs/downloadExcelFileFromDataDyn.mjs.html +1 -1
  125. package/docs/downloadFileFromB64.mjs.html +1 -1
  126. package/docs/downloadFileFromBlob.mjs.html +1 -1
  127. package/docs/downloadFileFromText.mjs.html +1 -1
  128. package/docs/downloadFileFromU8Arr.mjs.html +1 -1
  129. package/docs/dtmapping.mjs.html +1 -1
  130. package/docs/dtpick.mjs.html +1 -1
  131. package/docs/evem.mjs.html +1 -1
  132. package/docs/examples/ex-blob2b64.html +1 -1
  133. package/docs/examples/ex-clearXSS.html +1 -1
  134. package/docs/examples/ex-colorConverter.html +1 -1
  135. package/docs/examples/ex-cryptojs.html +1 -1
  136. package/docs/examples/ex-dayjs.html +1 -1
  137. package/docs/examples/ex-domCompareText.html +1 -1
  138. package/docs/examples/ex-domCompareTextDyn.html +1 -1
  139. package/docs/examples/ex-domConvertToPic.html +1 -1
  140. package/docs/examples/ex-domConvertToPicDyn.html +1 -1
  141. package/docs/examples/ex-domDrag.html +1 -1
  142. package/docs/examples/ex-domDropFiles.html +1 -1
  143. package/docs/examples/ex-domIsVisible.html +1 -1
  144. package/docs/examples/ex-domRenderMarkdownMind.html +1 -1
  145. package/docs/examples/ex-domRenderMarkdownMindDyn.html +1 -1
  146. package/docs/examples/ex-domRipple.html +1 -1
  147. package/docs/examples/ex-domScrollIntoView.html +1 -1
  148. package/docs/examples/ex-domScrollTo.html +1 -1
  149. package/docs/examples/ex-domShowImages.html +1 -1
  150. package/docs/examples/ex-domShowImagesDyn.html +1 -1
  151. package/docs/examples/ex-domShowInputAndGetFiles.html +1 -1
  152. package/docs/examples/ex-domTooltip.html +1 -1
  153. package/docs/examples/ex-getUserAgent.html +1 -1
  154. package/docs/examples/ex-getUserAgentDyn.html +1 -1
  155. package/docs/examples/ex-html2pic.html +1 -1
  156. package/docs/examples/ex-html2picDyn.html +1 -1
  157. package/docs/examples/ex-html2str.html +1 -1
  158. package/docs/examples/ex-html2strDyn.html +1 -1
  159. package/docs/examples/ex-lodash.html +1 -1
  160. package/docs/examples/ex-obj2u8arr-u8arr2obj.html +1 -1
  161. package/docs/examples/ex-ocr.html +1 -1
  162. package/docs/examples/ex-ocrDyn.html +1 -1
  163. package/docs/examples/ex-openLink.html +1 -1
  164. package/docs/examples/ex-strFindFuzz.html +1 -1
  165. package/docs/examples/ex-strFindFuzzDyn.html +1 -1
  166. package/docs/examples/ex-timeTZ2expire-timeTZ2past.html +1 -1
  167. package/docs/examples/ex-xlsx.html +1 -1
  168. package/docs/examples/ex-xlsxDyn.html +1 -1
  169. package/docs/execProcess.mjs.html +1 -1
  170. package/docs/execScript.mjs.html +1 -1
  171. package/docs/f2c.mjs.html +1 -1
  172. package/docs/filepathToTree.mjs.html +1 -1
  173. package/docs/files2data.mjs.html +1 -1
  174. package/docs/flattenToConn.mjs.html +1 -1
  175. package/docs/flattenTree.mjs.html +1 -1
  176. package/docs/fsCleanFolder.mjs.html +1 -1
  177. package/docs/fsCopyFolder.mjs.html +1 -1
  178. package/docs/fsCreateFile.mjs.html +1 -1
  179. package/docs/fsCreateFolder.mjs.html +1 -1
  180. package/docs/fsDeleteFile.mjs.html +1 -1
  181. package/docs/fsDeleteFolder.mjs.html +1 -1
  182. package/docs/fsEvem.mjs.html +1 -1
  183. package/docs/fsGetFilesInFolder.mjs.html +1 -1
  184. package/docs/fsGetFoldersInFolder.mjs.html +1 -1
  185. package/docs/fsIsFile.mjs.html +1 -1
  186. package/docs/fsIsFolder.mjs.html +1 -1
  187. package/docs/fsReadText.mjs.html +1 -1
  188. package/docs/fsRenameFile.mjs.html +1 -1
  189. package/docs/fsRenameFolder.mjs.html +1 -1
  190. package/docs/fsTreeFolder.mjs.html +1 -1
  191. package/docs/fsWatchFile.mjs.html +1 -1
  192. package/docs/fsWriteText.mjs.html +1 -1
  193. package/docs/genGradientColor.mjs.html +1 -1
  194. package/docs/genID.mjs.html +1 -1
  195. package/docs/genPm.mjs.html +1 -1
  196. package/docs/getBufferSize.mjs.html +1 -1
  197. package/docs/getClearPathName.mjs.html +1 -1
  198. package/docs/getCsvStrFromData.mjs.html +1 -1
  199. package/docs/getDataFromExcelFileU8Arr.mjs.html +1 -1
  200. package/docs/getDataFromExcelFileU8ArrDyn.mjs.html +1 -1
  201. package/docs/getDirName.mjs.html +1 -1
  202. package/docs/getEnv.mjs.html +1 -1
  203. package/docs/getExcelU8ArrFromData.mjs.html +1 -1
  204. package/docs/getExcelU8ArrFromWorkbook.mjs.html +1 -1
  205. package/docs/getExcelWorkbookFromData.mjs.html +1 -1
  206. package/docs/getExcelWorkbookFromWorksheet.mjs.html +1 -1
  207. package/docs/getExcelWorksheetFromData.mjs.html +1 -1
  208. package/docs/getFileAccept.mjs.html +1 -1
  209. package/docs/getFileName.mjs.html +1 -1
  210. package/docs/getFileTrueName.mjs.html +1 -1
  211. package/docs/getGlobal.mjs.html +1 -1
  212. package/docs/getObjSize.mjs.html +1 -1
  213. package/docs/getTimeBetween.mjs.html +1 -1
  214. package/docs/getTimeFromUnit.mjs.html +1 -1
  215. package/docs/getTimeObject.mjs.html +1 -1
  216. package/docs/getTimeRange.mjs.html +1 -1
  217. package/docs/getUserAgent.mjs.html +1 -1
  218. package/docs/getUserAgentDyn.mjs.html +1 -1
  219. package/docs/getltdtkeys.mjs.html +1 -1
  220. package/docs/haskey.mjs.html +1 -1
  221. package/docs/html2pic.mjs.html +1 -1
  222. package/docs/html2picDyn.mjs.html +1 -1
  223. package/docs/html2str.mjs.html +1 -1
  224. package/docs/html2strDyn.mjs.html +1 -1
  225. package/docs/htmlDecode.mjs.html +1 -1
  226. package/docs/htmlEncode.mjs.html +1 -1
  227. package/docs/importResources.mjs.html +1 -1
  228. package/docs/index.html +1 -1
  229. package/docs/interp1.mjs.html +1 -1
  230. package/docs/isDev.mjs.html +1 -1
  231. package/docs/isEle.mjs.html +1 -1
  232. package/docs/isEleExistByID.mjs.html +1 -1
  233. package/docs/isEmail.mjs.html +1 -1
  234. package/docs/isIE.mjs.html +1 -1
  235. package/docs/isNarrow.mjs.html +1 -1
  236. package/docs/isStrHasCapital.mjs.html +1 -1
  237. package/docs/isStrHasLowerCase.mjs.html +1 -1
  238. package/docs/isStrHasNumber.mjs.html +1 -1
  239. package/docs/isUserIdentify.mjs.html +1 -1
  240. package/docs/isUserName.mjs.html +1 -1
  241. package/docs/isUserPW.mjs.html +1 -1
  242. package/docs/isWindow.mjs.html +1 -1
  243. package/docs/isab.mjs.html +1 -1
  244. package/docs/isarr.mjs.html +1 -1
  245. package/docs/isarr0.mjs.html +1 -1
  246. package/docs/isblob.mjs.html +1 -1
  247. package/docs/isbol.mjs.html +1 -1
  248. package/docs/isday.mjs.html +1 -1
  249. package/docs/isearr.mjs.html +1 -1
  250. package/docs/iseobj.mjs.html +1 -1
  251. package/docs/iser.mjs.html +1 -1
  252. package/docs/isernot.mjs.html +1 -1
  253. package/docs/isestr.mjs.html +1 -1
  254. package/docs/isfun.mjs.html +1 -1
  255. package/docs/isint.mjs.html +1 -1
  256. package/docs/ismonth.mjs.html +1 -1
  257. package/docs/isn0int.mjs.html +1 -1
  258. package/docs/isn0num.mjs.html +1 -1
  259. package/docs/isnbr.mjs.html +1 -1
  260. package/docs/isnint.mjs.html +1 -1
  261. package/docs/isnnum.mjs.html +1 -1
  262. package/docs/isnull.mjs.html +1 -1
  263. package/docs/isnum.mjs.html +1 -1
  264. package/docs/isobj.mjs.html +1 -1
  265. package/docs/isobj0.mjs.html +1 -1
  266. package/docs/isp0int.mjs.html +1 -1
  267. package/docs/isp0num.mjs.html +1 -1
  268. package/docs/ispint.mjs.html +1 -1
  269. package/docs/ispm.mjs.html +1 -1
  270. package/docs/ispnum.mjs.html +1 -1
  271. package/docs/isstr.mjs.html +1 -1
  272. package/docs/isstr0.mjs.html +1 -1
  273. package/docs/istime.mjs.html +1 -1
  274. package/docs/istimeTZ.mjs.html +1 -1
  275. package/docs/istimems.mjs.html +1 -1
  276. package/docs/istimemsTZ.mjs.html +1 -1
  277. package/docs/isu16arr.mjs.html +1 -1
  278. package/docs/isu8arr.mjs.html +1 -1
  279. package/docs/isundefined.mjs.html +1 -1
  280. package/docs/j2o.mjs.html +1 -1
  281. package/docs/keysmat2ltdt.mjs.html +1 -1
  282. package/docs/log.mjs.html +1 -1
  283. package/docs/ltdt2vrtsable.mjs.html +1 -1
  284. package/docs/ltdtDiff.mjs.html +1 -1
  285. package/docs/ltdtDiffByKey.mjs.html +1 -1
  286. package/docs/ltdtkeys2mat.mjs.html +1 -1
  287. package/docs/ltdtkeysheads2mat.mjs.html +1 -1
  288. package/docs/ltdtmapping.mjs.html +1 -1
  289. package/docs/ltdtmerge.mjs.html +1 -1
  290. package/docs/ltdtpick.mjs.html +1 -1
  291. package/docs/ltdtpull.mjs.html +1 -1
  292. package/docs/mat2ltdt.mjs.html +1 -1
  293. package/docs/matConcat.mjs.html +1 -1
  294. package/docs/matDiff.mjs.html +1 -1
  295. package/docs/matat.mjs.html +1 -1
  296. package/docs/now2str.mjs.html +1 -1
  297. package/docs/now2strp.mjs.html +1 -1
  298. package/docs/nowDay2str.mjs.html +1 -1
  299. package/docs/nowms2str.mjs.html +1 -1
  300. package/docs/nowms2strp.mjs.html +1 -1
  301. package/docs/o2j.mjs.html +1 -1
  302. package/docs/obj2b64.mjs.html +1 -1
  303. package/docs/obj2pb64.mjs.html +1 -1
  304. package/docs/obj2str.mjs.html +1 -1
  305. package/docs/obj2stru8arr.mjs.html +1 -1
  306. package/docs/obj2u8arr.mjs.html +1 -1
  307. package/docs/objSortBy.mjs.html +1 -1
  308. package/docs/objSortByKeys.mjs.html +1 -1
  309. package/docs/ocr.mjs.html +1 -1
  310. package/docs/ocrDyn.mjs.html +1 -1
  311. package/docs/oo.mjs.html +1 -1
  312. package/docs/openLink.mjs.html +1 -1
  313. package/docs/pb642obj.mjs.html +1 -1
  314. package/docs/pmChain.mjs.html +1 -1
  315. package/docs/pmConvertResolve.mjs.html +1 -1
  316. package/docs/pmHook.mjs.html +1 -1
  317. package/docs/pmHookReject.mjs.html +1 -1
  318. package/docs/pmIni.mjs.html +1 -1
  319. package/docs/pmInvResolve.mjs.html +1 -1
  320. package/docs/pmMap.mjs.html +1 -1
  321. package/docs/pmQueue.mjs.html +1 -1
  322. package/docs/pmSeries.mjs.html +1 -1
  323. package/docs/pmThrottle.mjs.html +1 -1
  324. package/docs/pseudoRandom.mjs.html +1 -1
  325. package/docs/pseudoRandomIntRange.mjs.html +1 -1
  326. package/docs/pseudoRandomRange.mjs.html +1 -1
  327. package/docs/queue.mjs.html +1 -1
  328. package/docs/rang.mjs.html +1 -1
  329. package/docs/rep.mjs.html +1 -1
  330. package/docs/repObj.mjs.html +1 -1
  331. package/docs/replace.mjs.html +1 -1
  332. package/docs/replaceObj.mjs.html +1 -1
  333. package/docs/replacePlus.mjs.html +1 -1
  334. package/docs/round.mjs.html +1 -1
  335. package/docs/secd.mjs.html +1 -1
  336. package/docs/sep.mjs.html +1 -1
  337. package/docs/sepInt.mjs.html +1 -1
  338. package/docs/sind.mjs.html +1 -1
  339. package/docs/split.mjs.html +1 -1
  340. package/docs/str2aes.mjs.html +1 -1
  341. package/docs/str2b64.mjs.html +1 -1
  342. package/docs/str2hint.mjs.html +1 -1
  343. package/docs/str2md5.mjs.html +1 -1
  344. package/docs/str2obj.mjs.html +1 -1
  345. package/docs/str2sha512.mjs.html +1 -1
  346. package/docs/str2u8arr.mjs.html +1 -1
  347. package/docs/strCompare.mjs.html +1 -1
  348. package/docs/strDiff.mjs.html +1 -1
  349. package/docs/strFindFuzz.mjs.html +1 -1
  350. package/docs/strFindFuzzDyn.mjs.html +1 -1
  351. package/docs/strFindSimilar.mjs.html +1 -1
  352. package/docs/strdelleft.mjs.html +1 -1
  353. package/docs/strdelright.mjs.html +1 -1
  354. package/docs/strleft.mjs.html +1 -1
  355. package/docs/strmid.mjs.html +1 -1
  356. package/docs/strright.mjs.html +1 -1
  357. package/docs/stru8arr2obj.mjs.html +1 -1
  358. package/docs/tand.mjs.html +1 -1
  359. package/docs/time2day.mjs.html +1 -1
  360. package/docs/time2hour.mjs.html +1 -1
  361. package/docs/time2min.mjs.html +1 -1
  362. package/docs/timeTZ2day.mjs.html +1 -1
  363. package/docs/timeTZ2expire.mjs.html +1 -1
  364. package/docs/timeTZ2hour.mjs.html +1 -1
  365. package/docs/timeTZ2min.mjs.html +1 -1
  366. package/docs/timeTZ2past.mjs.html +1 -1
  367. package/docs/timems2day.mjs.html +1 -1
  368. package/docs/timems2hour.mjs.html +1 -1
  369. package/docs/timems2min.mjs.html +1 -1
  370. package/docs/timems2time.mjs.html +1 -1
  371. package/docs/timemsTZ2day.mjs.html +1 -1
  372. package/docs/timemsTZ2expire.mjs.html +1 -1
  373. package/docs/timemsTZ2hour.mjs.html +1 -1
  374. package/docs/timemsTZ2min.mjs.html +1 -1
  375. package/docs/timemsTZ2past.mjs.html +1 -1
  376. package/docs/timemsTZ2time.mjs.html +1 -1
  377. package/docs/treeObj.mjs.html +1 -1
  378. package/docs/treeToFilepath.mjs.html +1 -1
  379. package/docs/trim.mjs.html +1 -1
  380. package/docs/u16arr2b64.mjs.html +1 -1
  381. package/docs/u16arr2u8arr.mjs.html +1 -1
  382. package/docs/u8arr2ab.mjs.html +1 -1
  383. package/docs/u8arr2b64.mjs.html +1 -1
  384. package/docs/u8arr2blob.mjs.html +1 -1
  385. package/docs/u8arr2bs.mjs.html +1 -1
  386. package/docs/u8arr2obj.mjs.html +1 -1
  387. package/docs/u8arr2str.mjs.html +1 -1
  388. package/docs/u8arr2u16arr.mjs.html +1 -1
  389. package/docs/urlParse.mjs.html +1 -1
  390. package/docs/verifyValue.mjs.html +1 -1
  391. package/docs/waitFun.mjs.html +1 -1
  392. package/docs/wsemi.html +3 -3
  393. package/g.mjs +269 -260
  394. package/package.json +1 -1
  395. package/src/attstr.mjs +391 -330
  396. package/test/attstr.test.mjs +95 -89
package/src/attstr.mjs CHANGED
@@ -5,340 +5,15 @@ import size from 'lodash/size'
5
5
  import each from 'lodash/each'
6
6
  import filter from 'lodash/filter'
7
7
  import join from 'lodash/join'
8
+ import drop from 'lodash/drop'
8
9
  import sep from './sep.mjs'
10
+ import isarr from './isarr.mjs'
9
11
  import isearr from './isearr.mjs'
12
+ import isstr from './isstr.mjs'
10
13
  import isestr from './isestr.mjs'
11
14
  import arrHas from './arrHas.mjs'
12
15
 
13
16
 
14
- function sepItems(composItems) {
15
-
16
- //check
17
- if (!isestr(composItems)) {
18
- return []
19
- }
20
-
21
- //arrItems
22
- let arrItems = sep(composItems, ';')
23
-
24
- //uniq
25
- arrItems = uniq(arrItems)
26
-
27
- return arrItems
28
- }
29
-
30
-
31
- function joinItems(arrItems) {
32
-
33
- //check
34
- if (!isearr(arrItems)) {
35
- return ''
36
- }
37
-
38
- //uniq
39
- arrItems = uniq(arrItems)
40
-
41
- //str
42
- let str = join(arrItems, ';')
43
-
44
- return str
45
- }
46
-
47
-
48
- function atItemsMergeS1(its) {
49
-
50
- //filter
51
- its = filter(its, isestr)
52
-
53
- //uniq
54
- its = uniq(its)
55
-
56
- return joinItems(its)
57
- }
58
-
59
-
60
- function atItemsMergeS2(its) {
61
-
62
- //itsTemp
63
- let itsTemp = []
64
- each(its, (v) => {
65
- let table = get(v, 'table', '')
66
- let id = get(v, 'id', '')
67
- if (trim(table) === '') {
68
- console.log('atItemsMergeS2: invalid table in its', v, its)
69
- }
70
- else if (trim(id) === '') {
71
- console.log('atItemsMergeS2: invalid id in its', v, its)
72
- }
73
- else {
74
- itsTemp.push(`${table}@${id}`)
75
- }
76
- })
77
-
78
- //itsTemp
79
- its = joinItems(itsTemp)
80
-
81
- return its
82
- }
83
-
84
-
85
- function atJoin(its) {
86
-
87
- //check
88
- if (!isearr(its)) {
89
- return ''
90
- }
91
-
92
- //it0
93
- let it0 = get(its, 0)
94
-
95
- //mode
96
- let table = trim(get(it0, 'table', ''))
97
- let id = trim(get(it0, 'id', ''))
98
- let mode = '1p'
99
- if (isestr(table) && isestr(id)) {
100
- mode = '2p'
101
- }
102
-
103
- if (mode === '1p') {
104
- return atItemsMergeS1(its)
105
- }
106
- else if (mode === '2p') {
107
- return atItemsMergeS2(its)
108
- }
109
- return ''
110
- }
111
-
112
-
113
- function atParseS1(composItems) {
114
-
115
- //check
116
- if (!isestr(composItems)) {
117
- return []
118
- }
119
-
120
- //arrItems
121
- let arrItems = sepItems(composItems)
122
-
123
- //ids
124
- let ids = filter(arrItems, isestr)
125
-
126
- return ids
127
- }
128
-
129
-
130
- function atParseS2(composItems) {
131
-
132
- //check
133
- if (!isestr(composItems)) {
134
- return []
135
- }
136
-
137
- //arrItems
138
- let arrItems = sepItems(composItems)
139
-
140
- //ids
141
- let ids = []
142
- each(arrItems, (v) => {
143
- let s = sep(v, '@')
144
- let table = get(s, 0, '')
145
- let id = get(s, 1, '')
146
- if (table === '') {
147
- console.log('atParseS2: invalid table in composItems', v, composItems)
148
- }
149
- else if (id === '') {
150
- console.log('atParseS2: invalid id in composItems', v, composItems)
151
- }
152
- else {
153
- ids.push({
154
- item: v,
155
- table,
156
- id,
157
- })
158
- }
159
- })
160
-
161
- return ids
162
- }
163
-
164
-
165
- function atParse(composItems, opt = {}) {
166
-
167
- //check
168
- if (!isestr(composItems)) {
169
- return []
170
- }
171
-
172
- //mode
173
- let mode = get(opt, 'mode')
174
- if (mode !== '1p' && mode !== '2p') {
175
- mode = 'auto'
176
- }
177
-
178
- //mode
179
- if (mode === '1p') {
180
- return atParseS1(composItems)
181
- }
182
- else if (mode === '2p') {
183
- return atParseS2(composItems)
184
- }
185
-
186
- //indexOf
187
- let bc = composItems.indexOf('@') >= 0
188
-
189
- if (bc) {
190
- return atParseS2(composItems)
191
- }
192
- return atParseS1(composItems)
193
- }
194
-
195
-
196
- function atAddS1(composItems1, composItems2) {
197
-
198
- //atParseS1
199
- let itp1 = atParseS1(composItems1)
200
- let itp2 = atParseS1(composItems2)
201
-
202
- //its
203
- let its = [...itp1, ...itp2]
204
-
205
- //check
206
- if (size(its) === 0) {
207
- return ''
208
- }
209
-
210
- return atItemsMergeS1(its)
211
- }
212
-
213
-
214
- function atAddS2(composItems1, composItems2) {
215
-
216
- //atParseS2
217
- let itp1 = atParseS2(composItems1)
218
- let itp2 = atParseS2(composItems2)
219
-
220
- //its
221
- let its = [...itp1, ...itp2]
222
-
223
- //check
224
- if (size(its) === 0) {
225
- return ''
226
- }
227
-
228
- return atItemsMergeS2(its)
229
- }
230
-
231
-
232
- function atAdd(composItems1, composItems2, opt = {}) {
233
-
234
- //mode
235
- let mode = get(opt, 'mode')
236
- if (mode !== '1p' && mode !== '2p') {
237
- mode = 'auto'
238
- }
239
-
240
- //mode
241
- if (mode === '1p') {
242
- atAddS1(composItems1, composItems2)
243
- }
244
- else if (mode === '2p') {
245
- return atAddS2(composItems1, composItems2)
246
- }
247
-
248
- //indexOf
249
- let bc1 = composItems1.indexOf('@') >= 0
250
- let bc2 = composItems2.indexOf('@') >= 0
251
-
252
- if (bc1 || bc2) {
253
- return atAddS2(composItems1, composItems2)
254
- }
255
- return atAddS1(composItems1, composItems2)
256
- }
257
-
258
-
259
- function atRemoveS1(composItems1, composItems2) {
260
-
261
- //atParseS1
262
- let itp1 = atParseS1(composItems1)
263
- let itp2 = atParseS1(composItems2)
264
-
265
- //its
266
- let its = []
267
- each(itp1, (v) => {
268
- if (!arrHas(v, itp2)) {
269
- its.push(v)
270
- }
271
- })
272
-
273
- //check
274
- if (size(its) === 0) {
275
- return ''
276
- }
277
-
278
- return atItemsMergeS1(its)
279
- }
280
-
281
-
282
- function atRemoveS2(composItems1, composItems2) {
283
-
284
- //atParseS2
285
- let itp1 = atParseS2(composItems1)
286
- let itp2 = atParseS2(composItems2)
287
-
288
- //its
289
- let its = []
290
- each(itp1, (v) => {
291
- if (!arrHas(v, itp2)) {
292
- its.push(v)
293
- }
294
- })
295
-
296
- //check
297
- if (size(its) === 0) {
298
- return ''
299
- }
300
-
301
- return atItemsMergeS2(its)
302
- }
303
-
304
-
305
- function atRemove(composItems, removeItemOrId, opt = {}) {
306
-
307
- //check composItems
308
- if (!isestr(composItems)) {
309
- return ''
310
- }
311
-
312
- //check removeItemOrId
313
- if (!isestr(removeItemOrId)) {
314
- return composItems
315
- }
316
-
317
- //mode
318
- let mode = get(opt, 'mode')
319
- if (mode !== '1p' && mode !== '2p') {
320
- mode = 'auto'
321
- }
322
-
323
- //mode
324
- if (mode === '1p') {
325
- return atRemoveS1(composItems, removeItemOrId)
326
- }
327
- else if (mode === '2p') {
328
- return atRemoveS2(composItems, removeItemOrId)
329
- }
330
-
331
- //indexOf
332
- // let bc = composItems.indexOf('@') >= 0
333
- let bt = removeItemOrId.indexOf('@') >= 0
334
-
335
- if (bt) { //bc可為空字串故不一定有@
336
- return atRemoveS2(composItems, removeItemOrId)
337
- }
338
- return atRemoveS1(composItems, removeItemOrId)
339
- }
340
-
341
-
342
17
  /**
343
18
  * 屬性字串處理
344
19
  *
@@ -613,15 +288,401 @@ function atRemove(composItems, removeItemOrId, opt = {}) {
613
288
  * // => ''
614
289
  *
615
290
  */
616
- function attstr() {
291
+ function attstr(opt = {}) {
292
+ let dlmItem = ';'
293
+ let dlmSep = '@'
294
+ let keyTable = 'table'
295
+ let keyId = 'id'
296
+
297
+
298
+ //dlmItem
299
+ let _dlmItem = get(opt, 'dlmItem', '')
300
+ if (isestr(_dlmItem)) {
301
+ dlmItem = _dlmItem
302
+ }
303
+
304
+
305
+ //dlmSep
306
+ let _dlmSep = get(opt, 'dlmSep', '')
307
+ if (isestr(_dlmSep)) {
308
+ dlmSep = _dlmSep
309
+ }
310
+
311
+
312
+ //keyTable
313
+ let _keyTable = get(opt, 'keyTable', '')
314
+ if (isestr(_keyTable)) {
315
+ keyTable = _keyTable
316
+ }
317
+
318
+
319
+ //keyId
320
+ let _keyId = get(opt, 'keyId', '')
321
+ if (isestr(_keyId)) {
322
+ keyId = _keyId
323
+ }
324
+
325
+
326
+ function sepItems(composItems) {
327
+
328
+ //check
329
+ if (!isestr(composItems)) {
330
+ return []
331
+ }
332
+
333
+ //arrItems
334
+ let arrItems = sep(composItems, dlmItem)
335
+
336
+ //uniq
337
+ arrItems = uniq(arrItems)
338
+
339
+ return arrItems
340
+ }
341
+
342
+
343
+ function joinItems(arrItems) {
344
+
345
+ //check
346
+ if (!isearr(arrItems)) {
347
+ return ''
348
+ }
349
+
350
+ //uniq
351
+ arrItems = uniq(arrItems)
352
+
353
+ //str
354
+ let str = join(arrItems, dlmItem)
355
+
356
+ return str
357
+ }
358
+
359
+
360
+ function atItemsMergeS1(its) {
361
+
362
+ //filter
363
+ its = filter(its, isestr)
364
+
365
+ //uniq
366
+ its = uniq(its)
367
+
368
+ return joinItems(its)
369
+ }
370
+
371
+
372
+ function atItemsMergeS2(its) {
373
+
374
+ //itsTemp
375
+ let itsTemp = []
376
+ each(its, (v) => {
377
+ let table = get(v, keyTable, '')
378
+ console.log('table', table)
379
+ let id = get(v, keyId, '')
380
+ console.log('id', id)
381
+ if (!isestr(table)) {
382
+ console.log(`atItemsMergeS2: invalid keyTable[${keyTable}] in its`, v, its)
383
+ }
384
+ if (isstr(id)) {
385
+ if (id === '') {
386
+ console.log(`atItemsMergeS2: invalid keyId[${keyId}] in its`, v, its)
387
+ }
388
+ }
389
+ else if (isarr(id)) {
390
+ if (size(id) === 0) {
391
+ console.log(`atItemsMergeS2: invalid keyId[${keyId}] in its`, v, its)
392
+ }
393
+ }
394
+ else {
395
+ console.log(`atItemsMergeS2: keyId[${keyId}] is not a string or an array in its`, v, its)
396
+ }
397
+ if (isstr(id)) {
398
+ itsTemp.push(`${table}${dlmSep}${id}`)
399
+ }
400
+ else if (isarr(id)) {
401
+ let ids = join(id, dlmSep)
402
+ itsTemp.push(`${table}${dlmSep}${ids}`)
403
+ }
404
+ })
405
+
406
+ //itsTemp
407
+ its = joinItems(itsTemp)
408
+
409
+ return its
410
+ }
411
+
412
+
413
+ function atJoin(its) {
414
+
415
+ //check
416
+ if (!isearr(its)) {
417
+ return ''
418
+ }
419
+
420
+ //it0
421
+ let it0 = get(its, 0)
422
+
423
+ //mode
424
+ let table = trim(get(it0, keyTable, ''))
425
+ let id = trim(get(it0, keyId, ''))
426
+ let mode = '1p'
427
+ if (isestr(table) && isestr(id)) {
428
+ mode = '2p'
429
+ }
430
+
431
+ if (mode === '1p') {
432
+ return atItemsMergeS1(its)
433
+ }
434
+ else if (mode === '2p') {
435
+ return atItemsMergeS2(its)
436
+ }
437
+ return ''
438
+ }
439
+
440
+
441
+ function atParseS1(composItems) {
442
+
443
+ //check
444
+ if (!isestr(composItems)) {
445
+ return []
446
+ }
447
+
448
+ //arrItems
449
+ let arrItems = sepItems(composItems)
450
+
451
+ //ids
452
+ let ids = filter(arrItems, isestr)
453
+
454
+ return ids
455
+ }
456
+
457
+
458
+ function atParseS2(composItems) {
459
+
460
+ //check
461
+ if (!isestr(composItems)) {
462
+ return []
463
+ }
464
+
465
+ //arrItems
466
+ let arrItems = sepItems(composItems)
467
+
468
+ //ids
469
+ let ids = []
470
+ each(arrItems, (v) => {
471
+ let s = sep(v, dlmSep)
472
+ let table = get(s, 0, '')
473
+ table = trim(table)
474
+ let id = get(s, 1, '')
475
+ id = trim(id)
476
+ if (table === '') {
477
+ console.log(`atParseS2: invalid keyTable[${keyTable}] in composItems`, v, composItems)
478
+ }
479
+ else if (id === '') {
480
+ console.log(`atParseS2: invalid keyId[${keyId}] in composItems`, v, composItems)
481
+ }
482
+ if (size(s) > 2) {
483
+ //有2個以上id
484
+ s = drop(s)
485
+ id = s //改儲存為陣列
486
+ }
487
+ else {
488
+ ids.push({
489
+ item: v,
490
+ [keyTable]: table,
491
+ [keyId]: id,
492
+ })
493
+ }
494
+ })
495
+
496
+ return ids
497
+ }
498
+
499
+
500
+ function atParse(composItems, opt = {}) {
501
+
502
+ //check
503
+ if (!isestr(composItems)) {
504
+ return []
505
+ }
506
+
507
+ //mode
508
+ let mode = get(opt, 'mode')
509
+ if (mode !== '1p' && mode !== '2p') {
510
+ mode = 'auto'
511
+ }
512
+
513
+ //mode
514
+ if (mode === '1p') {
515
+ return atParseS1(composItems)
516
+ }
517
+ else if (mode === '2p') {
518
+ return atParseS2(composItems)
519
+ }
520
+
521
+ //indexOf
522
+ let bc = composItems.indexOf(dlmSep) >= 0
523
+
524
+ if (bc) {
525
+ return atParseS2(composItems)
526
+ }
527
+ return atParseS1(composItems)
528
+ }
529
+
530
+
531
+ function atAddS1(composItems1, composItems2) {
532
+
533
+ //atParseS1
534
+ let itp1 = atParseS1(composItems1)
535
+ let itp2 = atParseS1(composItems2)
536
+
537
+ //its
538
+ let its = [...itp1, ...itp2]
539
+
540
+ //check
541
+ if (size(its) === 0) {
542
+ return ''
543
+ }
544
+
545
+ return atItemsMergeS1(its)
546
+ }
547
+
548
+
549
+ function atAddS2(composItems1, composItems2) {
550
+
551
+ //atParseS2
552
+ let itp1 = atParseS2(composItems1)
553
+ let itp2 = atParseS2(composItems2)
554
+
555
+ //its
556
+ let its = [...itp1, ...itp2]
557
+
558
+ //check
559
+ if (size(its) === 0) {
560
+ return ''
561
+ }
562
+
563
+ return atItemsMergeS2(its)
564
+ }
565
+
566
+
567
+ function atAdd(composItems1, composItems2, opt = {}) {
568
+
569
+ //mode
570
+ let mode = get(opt, 'mode')
571
+ if (mode !== '1p' && mode !== '2p') {
572
+ mode = 'auto'
573
+ }
574
+
575
+ //mode
576
+ if (mode === '1p') {
577
+ atAddS1(composItems1, composItems2)
578
+ }
579
+ else if (mode === '2p') {
580
+ return atAddS2(composItems1, composItems2)
581
+ }
582
+
583
+ //indexOf
584
+ let bc1 = composItems1.indexOf(dlmSep) >= 0
585
+ let bc2 = composItems2.indexOf(dlmSep) >= 0
586
+
587
+ if (bc1 || bc2) {
588
+ return atAddS2(composItems1, composItems2)
589
+ }
590
+ return atAddS1(composItems1, composItems2)
591
+ }
592
+
593
+
594
+ function atRemoveS1(composItems1, composItems2) {
595
+
596
+ //atParseS1
597
+ let itp1 = atParseS1(composItems1)
598
+ let itp2 = atParseS1(composItems2)
599
+
600
+ //its
601
+ let its = []
602
+ each(itp1, (v) => {
603
+ if (!arrHas(v, itp2)) {
604
+ its.push(v)
605
+ }
606
+ })
607
+
608
+ //check
609
+ if (size(its) === 0) {
610
+ return ''
611
+ }
612
+
613
+ return atItemsMergeS1(its)
614
+ }
615
+
616
+
617
+ function atRemoveS2(composItems1, composItems2) {
618
+
619
+ //atParseS2
620
+ let itp1 = atParseS2(composItems1)
621
+ let itp2 = atParseS2(composItems2)
622
+
623
+ //its
624
+ let its = []
625
+ each(itp1, (v) => {
626
+ if (!arrHas(v, itp2)) {
627
+ its.push(v)
628
+ }
629
+ })
630
+
631
+ //check
632
+ if (size(its) === 0) {
633
+ return ''
634
+ }
635
+
636
+ return atItemsMergeS2(its)
637
+ }
638
+
639
+
640
+ function atRemove(composItems, removeItemOrId, opt = {}) {
641
+
642
+ //check composItems
643
+ if (!isestr(composItems)) {
644
+ return ''
645
+ }
646
+
647
+ //check removeItemOrId
648
+ if (!isestr(removeItemOrId)) {
649
+ return composItems
650
+ }
651
+
652
+ //mode
653
+ let mode = get(opt, 'mode')
654
+ if (mode !== '1p' && mode !== '2p') {
655
+ mode = 'auto'
656
+ }
657
+
658
+ //mode
659
+ if (mode === '1p') {
660
+ return atRemoveS1(composItems, removeItemOrId)
661
+ }
662
+ else if (mode === '2p') {
663
+ return atRemoveS2(composItems, removeItemOrId)
664
+ }
665
+
666
+ //indexOf
667
+ // let bc = composItems.indexOf(dlmSep) >= 0
668
+ let bt = removeItemOrId.indexOf(dlmSep) >= 0
669
+
670
+ if (bt) { //bc可為空字串故不一定有dlmSep
671
+ return atRemoveS2(composItems, removeItemOrId)
672
+ }
673
+ return atRemoveS1(composItems, removeItemOrId)
674
+ }
675
+
676
+ //at
617
677
  let at = {
618
678
  parse: atParse,
619
679
  join: atJoin,
620
680
  remove: atRemove,
621
681
  add: atAdd,
622
682
  }
683
+
623
684
  return at
624
685
  }
625
686
 
626
687
 
627
- export default attstr()
688
+ export default attstr