wsemi 1.7.21 → 1.7.23

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 +403 -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 +16 -4
  393. package/g.mjs +269 -258
  394. package/package.json +1 -1
  395. package/src/attstr.mjs +402 -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
  *
@@ -352,6 +27,8 @@ function atRemove(composItems, removeItemOrId, opt = {}) {
352
27
  * let c2
353
28
  * let r
354
29
  *
30
+ * let at = attstr()
31
+ *
355
32
  * //parse
356
33
  * console.log('parse')
357
34
  *
@@ -612,16 +289,411 @@ function atRemove(composItems, removeItemOrId, opt = {}) {
612
289
  * console.log(r)
613
290
  * // => ''
614
291
  *
292
+ * let at2 = attstr({ dlmItem: ',', dlmSep: '|' })
293
+ *
294
+ * c = 'x1|abc@123|def@456,x2|ghi@789'
295
+ * r = at2.parse(c)
296
+ * console.log(r)
297
+ * // => [
298
+ * // { item: 'x1|abc@123|def@456', table: 'x1', id: ['abc@123','def@456'] },
299
+ * // { item: 'x2|ghi@789', table: 'x2', id: 'ghi@789' }
300
+ * // ]
301
+ *
615
302
  */
616
- function attstr() {
303
+ function attstr(opt = {}) {
304
+ let dlmItem = ';'
305
+ let dlmSep = '@'
306
+ let keyTable = 'table'
307
+ let keyId = 'id'
308
+
309
+
310
+ //dlmItem
311
+ let _dlmItem = get(opt, 'dlmItem', '')
312
+ if (isestr(_dlmItem)) {
313
+ dlmItem = _dlmItem
314
+ }
315
+
316
+
317
+ //dlmSep
318
+ let _dlmSep = get(opt, 'dlmSep', '')
319
+ if (isestr(_dlmSep)) {
320
+ dlmSep = _dlmSep
321
+ }
322
+
323
+
324
+ //keyTable
325
+ let _keyTable = get(opt, 'keyTable', '')
326
+ if (isestr(_keyTable)) {
327
+ keyTable = _keyTable
328
+ }
329
+
330
+
331
+ //keyId
332
+ let _keyId = get(opt, 'keyId', '')
333
+ if (isestr(_keyId)) {
334
+ keyId = _keyId
335
+ }
336
+
337
+
338
+ function sepItems(composItems) {
339
+
340
+ //check
341
+ if (!isestr(composItems)) {
342
+ return []
343
+ }
344
+
345
+ //arrItems
346
+ let arrItems = sep(composItems, dlmItem)
347
+
348
+ //uniq
349
+ arrItems = uniq(arrItems)
350
+
351
+ return arrItems
352
+ }
353
+
354
+
355
+ function joinItems(arrItems) {
356
+
357
+ //check
358
+ if (!isearr(arrItems)) {
359
+ return ''
360
+ }
361
+
362
+ //uniq
363
+ arrItems = uniq(arrItems)
364
+
365
+ //str
366
+ let str = join(arrItems, dlmItem)
367
+
368
+ return str
369
+ }
370
+
371
+
372
+ function atItemsMergeS1(its) {
373
+
374
+ //filter
375
+ its = filter(its, isestr)
376
+
377
+ //uniq
378
+ its = uniq(its)
379
+
380
+ return joinItems(its)
381
+ }
382
+
383
+
384
+ function atItemsMergeS2(its) {
385
+
386
+ //itsTemp
387
+ let itsTemp = []
388
+ each(its, (v) => {
389
+ let table = get(v, keyTable, '')
390
+ console.log('table', table)
391
+ let id = get(v, keyId, '')
392
+ console.log('id', id)
393
+ if (!isestr(table)) {
394
+ console.log(`atItemsMergeS2: invalid keyTable[${keyTable}] in its`, v, its)
395
+ }
396
+ if (isstr(id)) {
397
+ if (id === '') {
398
+ console.log(`atItemsMergeS2: invalid keyId[${keyId}] in its`, v, its)
399
+ }
400
+ }
401
+ else if (isarr(id)) {
402
+ if (size(id) === 0) {
403
+ console.log(`atItemsMergeS2: invalid keyId[${keyId}] in its`, v, its)
404
+ }
405
+ }
406
+ else {
407
+ console.log(`atItemsMergeS2: keyId[${keyId}] is not a string or an array in its`, v, its)
408
+ }
409
+ if (isstr(id)) {
410
+ itsTemp.push(`${table}${dlmSep}${id}`)
411
+ }
412
+ else if (isarr(id)) {
413
+ let ids = join(id, dlmSep)
414
+ itsTemp.push(`${table}${dlmSep}${ids}`)
415
+ }
416
+ })
417
+
418
+ //itsTemp
419
+ its = joinItems(itsTemp)
420
+
421
+ return its
422
+ }
423
+
424
+
425
+ function atJoin(its) {
426
+
427
+ //check
428
+ if (!isearr(its)) {
429
+ return ''
430
+ }
431
+
432
+ //it0
433
+ let it0 = get(its, 0)
434
+
435
+ //mode
436
+ let table = trim(get(it0, keyTable, ''))
437
+ let id = trim(get(it0, keyId, ''))
438
+ let mode = '1p'
439
+ if (isestr(table) && isestr(id)) {
440
+ mode = '2p'
441
+ }
442
+
443
+ if (mode === '1p') {
444
+ return atItemsMergeS1(its)
445
+ }
446
+ else if (mode === '2p') {
447
+ return atItemsMergeS2(its)
448
+ }
449
+ return ''
450
+ }
451
+
452
+
453
+ function atParseS1(composItems) {
454
+
455
+ //check
456
+ if (!isestr(composItems)) {
457
+ return []
458
+ }
459
+
460
+ //arrItems
461
+ let arrItems = sepItems(composItems)
462
+
463
+ //ids
464
+ let ids = filter(arrItems, isestr)
465
+
466
+ return ids
467
+ }
468
+
469
+
470
+ function atParseS2(composItems) {
471
+
472
+ //check
473
+ if (!isestr(composItems)) {
474
+ return []
475
+ }
476
+
477
+ //arrItems
478
+ let arrItems = sepItems(composItems)
479
+
480
+ //ids
481
+ let ids = []
482
+ each(arrItems, (v) => {
483
+ let s = sep(v, dlmSep)
484
+ // console.log(`size(s)`, size(s))
485
+ let table = get(s, 0, '')
486
+ table = trim(table)
487
+ let id = get(s, 1, '')
488
+ id = trim(id)
489
+ if (table === '') {
490
+ console.log(`atParseS2: invalid keyTable[${keyTable}] in composItems`, v, composItems)
491
+ }
492
+ else if (id === '') {
493
+ console.log(`atParseS2: invalid keyId[${keyId}] in composItems`, v, composItems)
494
+ }
495
+ if (size(s) >= 3) {
496
+ //有2個以上id
497
+ s = drop(s)
498
+ id = s //改儲存為陣列
499
+ }
500
+ ids.push({
501
+ item: v,
502
+ [keyTable]: table,
503
+ [keyId]: id,
504
+ })
505
+ })
506
+
507
+ return ids
508
+ }
509
+
510
+
511
+ function atParse(composItems, opt = {}) {
512
+
513
+ //check
514
+ if (!isestr(composItems)) {
515
+ return []
516
+ }
517
+
518
+ //mode
519
+ let mode = get(opt, 'mode')
520
+ if (mode !== '1p' && mode !== '2p') {
521
+ mode = 'auto'
522
+ }
523
+
524
+ //mode
525
+ if (mode === '1p') {
526
+ return atParseS1(composItems)
527
+ }
528
+ else if (mode === '2p') {
529
+ return atParseS2(composItems)
530
+ }
531
+
532
+ //indexOf
533
+ let bc = composItems.indexOf(dlmSep) >= 0
534
+
535
+ if (bc) {
536
+ return atParseS2(composItems)
537
+ }
538
+ return atParseS1(composItems)
539
+ }
540
+
541
+
542
+ function atAddS1(composItems1, composItems2) {
543
+
544
+ //atParseS1
545
+ let itp1 = atParseS1(composItems1)
546
+ let itp2 = atParseS1(composItems2)
547
+
548
+ //its
549
+ let its = [...itp1, ...itp2]
550
+
551
+ //check
552
+ if (size(its) === 0) {
553
+ return ''
554
+ }
555
+
556
+ return atItemsMergeS1(its)
557
+ }
558
+
559
+
560
+ function atAddS2(composItems1, composItems2) {
561
+
562
+ //atParseS2
563
+ let itp1 = atParseS2(composItems1)
564
+ let itp2 = atParseS2(composItems2)
565
+
566
+ //its
567
+ let its = [...itp1, ...itp2]
568
+
569
+ //check
570
+ if (size(its) === 0) {
571
+ return ''
572
+ }
573
+
574
+ return atItemsMergeS2(its)
575
+ }
576
+
577
+
578
+ function atAdd(composItems1, composItems2, opt = {}) {
579
+
580
+ //mode
581
+ let mode = get(opt, 'mode')
582
+ if (mode !== '1p' && mode !== '2p') {
583
+ mode = 'auto'
584
+ }
585
+
586
+ //mode
587
+ if (mode === '1p') {
588
+ atAddS1(composItems1, composItems2)
589
+ }
590
+ else if (mode === '2p') {
591
+ return atAddS2(composItems1, composItems2)
592
+ }
593
+
594
+ //indexOf
595
+ let bc1 = composItems1.indexOf(dlmSep) >= 0
596
+ let bc2 = composItems2.indexOf(dlmSep) >= 0
597
+
598
+ if (bc1 || bc2) {
599
+ return atAddS2(composItems1, composItems2)
600
+ }
601
+ return atAddS1(composItems1, composItems2)
602
+ }
603
+
604
+
605
+ function atRemoveS1(composItems1, composItems2) {
606
+
607
+ //atParseS1
608
+ let itp1 = atParseS1(composItems1)
609
+ let itp2 = atParseS1(composItems2)
610
+
611
+ //its
612
+ let its = []
613
+ each(itp1, (v) => {
614
+ if (!arrHas(v, itp2)) {
615
+ its.push(v)
616
+ }
617
+ })
618
+
619
+ //check
620
+ if (size(its) === 0) {
621
+ return ''
622
+ }
623
+
624
+ return atItemsMergeS1(its)
625
+ }
626
+
627
+
628
+ function atRemoveS2(composItems1, composItems2) {
629
+
630
+ //atParseS2
631
+ let itp1 = atParseS2(composItems1)
632
+ let itp2 = atParseS2(composItems2)
633
+
634
+ //its
635
+ let its = []
636
+ each(itp1, (v) => {
637
+ if (!arrHas(v, itp2)) {
638
+ its.push(v)
639
+ }
640
+ })
641
+
642
+ //check
643
+ if (size(its) === 0) {
644
+ return ''
645
+ }
646
+
647
+ return atItemsMergeS2(its)
648
+ }
649
+
650
+
651
+ function atRemove(composItems, removeItemOrId, opt = {}) {
652
+
653
+ //check composItems
654
+ if (!isestr(composItems)) {
655
+ return ''
656
+ }
657
+
658
+ //check removeItemOrId
659
+ if (!isestr(removeItemOrId)) {
660
+ return composItems
661
+ }
662
+
663
+ //mode
664
+ let mode = get(opt, 'mode')
665
+ if (mode !== '1p' && mode !== '2p') {
666
+ mode = 'auto'
667
+ }
668
+
669
+ //mode
670
+ if (mode === '1p') {
671
+ return atRemoveS1(composItems, removeItemOrId)
672
+ }
673
+ else if (mode === '2p') {
674
+ return atRemoveS2(composItems, removeItemOrId)
675
+ }
676
+
677
+ //indexOf
678
+ // let bc = composItems.indexOf(dlmSep) >= 0
679
+ let bt = removeItemOrId.indexOf(dlmSep) >= 0
680
+
681
+ if (bt) { //bc可為空字串故不一定有dlmSep
682
+ return atRemoveS2(composItems, removeItemOrId)
683
+ }
684
+ return atRemoveS1(composItems, removeItemOrId)
685
+ }
686
+
687
+ //at
617
688
  let at = {
618
689
  parse: atParse,
619
690
  join: atJoin,
620
691
  remove: atRemove,
621
692
  add: atAdd,
622
693
  }
694
+
623
695
  return at
624
696
  }
625
697
 
626
698
 
627
- export default attstr()
699
+ export default attstr