wsemi 1.6.21 → 1.6.25

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 (380) hide show
  1. package/.github/workflows/ci-test.yml +2 -1
  2. package/README.md +30 -30
  3. package/SECURITY.md +5 -0
  4. package/dist/wsemi.umd.js +3 -3
  5. package/dist/wsemi.umd.js.map +1 -1
  6. package/docs/-_class.mjs.html +2 -2
  7. package/docs/ab2blob.mjs.html +2 -2
  8. package/docs/ab2u8arr.mjs.html +2 -2
  9. package/docs/addMonth.mjs.html +2 -2
  10. package/docs/aes2str.mjs.html +2 -2
  11. package/docs/alive.mjs.html +2 -2
  12. package/docs/arr2dt.mjs.html +2 -2
  13. package/docs/arrAccum.mjs.html +2 -2
  14. package/docs/arrAdd.mjs.html +2 -2
  15. package/docs/arrAt.mjs.html +2 -2
  16. package/docs/arrFilter.mjs.html +2 -2
  17. package/docs/arrFind.mjs.html +2 -2
  18. package/docs/arrGroupByMaxmin.mjs.html +2 -2
  19. package/docs/arrHas.mjs.html +2 -2
  20. package/docs/arrInsert.mjs.html +2 -2
  21. package/docs/arrLookupByMaxmin.mjs.html +2 -2
  22. package/docs/arrSep.mjs.html +2 -2
  23. package/docs/arrSort.mjs.html +2 -2
  24. package/docs/asind.mjs.html +2 -2
  25. package/docs/atan2d.mjs.html +2 -2
  26. package/docs/atand.mjs.html +2 -2
  27. package/docs/b642obj.mjs.html +2 -2
  28. package/docs/b642str.mjs.html +2 -2
  29. package/docs/b642u16arr.mjs.html +2 -2
  30. package/docs/b642u8arr.mjs.html +2 -2
  31. package/docs/binstr.mjs.html +2 -2
  32. package/docs/blob2ab.mjs.html +2 -2
  33. package/docs/blob2b64.mjs.html +2 -2
  34. package/docs/blob2str.mjs.html +2 -2
  35. package/docs/blob2u8arr.mjs.html +2 -2
  36. package/docs/blobs2b64s.mjs.html +2 -2
  37. package/docs/blobs2u8arrs.mjs.html +2 -2
  38. package/docs/bodyLog.mjs.html +2 -2
  39. package/docs/browserView.mjs.html +2 -2
  40. package/docs/browserViewFromBlob.mjs.html +2 -2
  41. package/docs/browserViewFromText.mjs.html +2 -2
  42. package/docs/browserViewFromU8arr.mjs.html +2 -2
  43. package/docs/bs2u8arr.mjs.html +2 -2
  44. package/docs/bufRead.mjs.html +2 -2
  45. package/docs/bufReadDbl.mjs.html +2 -2
  46. package/docs/bufWrite.mjs.html +2 -2
  47. package/docs/bufWriteDbl.mjs.html +2 -2
  48. package/docs/cache.mjs.html +2 -2
  49. package/docs/cbol.mjs.html +2 -2
  50. package/docs/cdbl.mjs.html +2 -2
  51. package/docs/cfilesize.mjs.html +2 -2
  52. package/docs/cfinancial.mjs.html +2 -2
  53. package/docs/cint.mjs.html +2 -2
  54. package/docs/clearXSS.mjs.html +2 -2
  55. package/docs/color.mjs.html +2 -2
  56. package/docs/composeTreeObj.mjs.html +2 -2
  57. package/docs/copyStrToClipboard.mjs.html +2 -2
  58. package/docs/cosd.mjs.html +2 -2
  59. package/docs/cotd.mjs.html +2 -2
  60. package/docs/cscd.mjs.html +2 -2
  61. package/docs/cstr.mjs.html +2 -2
  62. package/docs/day2cht.mjs.html +2 -2
  63. package/docs/debounce.mjs.html +2 -2
  64. package/docs/delay.mjs.html +2 -2
  65. package/docs/dig.mjs.html +2 -2
  66. package/docs/digExp.mjs.html +2 -2
  67. package/docs/domAlert.mjs.html +2 -2
  68. package/docs/domAppend.mjs.html +2 -2
  69. package/docs/domCancelEvent.mjs.html +2 -2
  70. package/docs/domConvertToPic.mjs.html +3 -2
  71. package/docs/domConvertToPicDyn.mjs.html +2 -2
  72. package/docs/domDetect.mjs.html +2 -2
  73. package/docs/domDrag.mjs.html +2 -2
  74. package/docs/domDragBarAndScroll.mjs.html +2 -2
  75. package/docs/domDragPreview.mjs.html +2 -2
  76. package/docs/domDropFiles.mjs.html +2 -2
  77. package/docs/domFadeIn.mjs.html +2 -2
  78. package/docs/domFadeOut.mjs.html +2 -2
  79. package/docs/domFind.mjs.html +2 -2
  80. package/docs/domFinds.mjs.html +2 -2
  81. package/docs/domGetAttr.mjs.html +2 -2
  82. package/docs/domGetBoudRect.mjs.html +2 -2
  83. package/docs/domGetBoudRectRefSelf.mjs.html +2 -2
  84. package/docs/domGetFileAccept.mjs.html +2 -2
  85. package/docs/domGetFiles.mjs.html +2 -2
  86. package/docs/domGetPointFromEvent.mjs.html +2 -2
  87. package/docs/domGetScrollableParent.mjs.html +2 -2
  88. package/docs/domIsClientXYIn.mjs.html +2 -2
  89. package/docs/domIsFocused.mjs.html +2 -2
  90. package/docs/domIsVisible.mjs.html +2 -2
  91. package/docs/domPrepend.mjs.html +2 -2
  92. package/docs/domRemove.mjs.html +2 -2
  93. package/docs/domRipple.mjs.html +2 -2
  94. package/docs/domScrollIntoView.mjs.html +2 -2
  95. package/docs/domScrollTo.mjs.html +2 -2
  96. package/docs/domShowImages.mjs.html +2 -2
  97. package/docs/domShowImagesDyn.mjs.html +2 -2
  98. package/docs/domShowInputAndGetFiles.mjs.html +2 -2
  99. package/docs/domShowInputAndGetFilesU8Arrs.mjs.html +2 -2
  100. package/docs/domTooltip.mjs.html +2 -2
  101. package/docs/domTriggerEvent.mjs.html +2 -2
  102. package/docs/domVirtualCreate.mjs.html +2 -2
  103. package/docs/domVirtualCreateQueue.mjs.html +2 -2
  104. package/docs/downloadExcelFileFromData.mjs.html +2 -2
  105. package/docs/downloadExcelFileFromDataDyn.mjs.html +2 -2
  106. package/docs/downloadFileFromB64.mjs.html +2 -2
  107. package/docs/downloadFileFromBlob.mjs.html +2 -2
  108. package/docs/downloadFileFromText.mjs.html +2 -2
  109. package/docs/downloadFileFromU8Arr.mjs.html +2 -2
  110. package/docs/dtmapping.mjs.html +2 -2
  111. package/docs/dtpick.mjs.html +2 -2
  112. package/docs/evem.mjs.html +2 -2
  113. package/docs/examples/{ex-xss.html → ex-clearXSS.html} +2 -2
  114. package/docs/examples/ex-colorConverter.html +1 -1
  115. package/docs/examples/ex-cryptojs.html +1 -1
  116. package/docs/examples/ex-dayjs.html +1 -1
  117. package/docs/examples/{ex-html-to-image.html → ex-domConvertToPic.html} +2 -2
  118. package/docs/examples/{ex-html-to-image-dynamic.html → ex-domConvertToPicDyn.html} +2 -2
  119. package/docs/examples/ex-domDrag.html +1 -1
  120. package/docs/examples/ex-domDropFiles.html +1 -1
  121. package/docs/examples/ex-domIsVisible.html +1 -1
  122. package/docs/examples/ex-domRipple.html +1 -1
  123. package/docs/examples/{ex-scrollIntoView.html → ex-domScrollIntoView.html} +2 -2
  124. package/docs/examples/{ex-scrollTo.html → ex-domScrollTo.html} +2 -2
  125. package/docs/examples/{ex-viewerjs.html → ex-domShowImages.html} +2 -2
  126. package/docs/examples/{ex-viewerjs-dynamic.html → ex-domShowImagesDyn.html} +2 -2
  127. package/docs/examples/{ex-tippyjs.html → ex-domTooltip.html} +2 -2
  128. package/docs/examples/{ex-uaparser.html → ex-getUserAgent.html} +2 -2
  129. package/docs/examples/{ex-uaparser-dynamic.html → ex-getUserAgentDyn.html} +2 -2
  130. package/docs/examples/{ex-html2canvas.html → ex-html2pic.html} +2 -2
  131. package/docs/examples/{ex-html2canvas-dynamic.html → ex-html2picDyn.html} +2 -2
  132. package/docs/examples/{ex-htmlparser.html → ex-html2str.html} +2 -2
  133. package/docs/examples/{ex-htmlparser-dynamic.html → ex-html2strDyn.html} +2 -2
  134. package/docs/examples/ex-lodash.html +1 -1
  135. package/docs/examples/ex-obj2u8arr-u8arr2obj.html +1 -1
  136. package/docs/examples/{ex-tesseract.html → ex-ocr.html} +2 -2
  137. package/docs/examples/{ex-tesseract-dynamic.html → ex-ocrDyn.html} +2 -2
  138. package/docs/examples/{ex-openlink.html → ex-openLink.html} +1 -1
  139. package/docs/examples/{ex-fuzzball.html → ex-strFindFuzz.html} +2 -2
  140. package/docs/examples/{ex-fuzzball-dynamic.html → ex-strFindFuzzDyn.html} +2 -2
  141. package/docs/examples/ex-timeTZ2expire-timeTZ2past.html +1 -1
  142. package/docs/examples/ex-xlsx.html +1 -1
  143. package/docs/examples/{ex-xlsx-dynamic.html → ex-xlsxDyn.html} +1 -1
  144. package/docs/execScript.mjs.html +2 -2
  145. package/docs/f2c.mjs.html +2 -2
  146. package/docs/files2data.mjs.html +2 -2
  147. package/docs/flattenTreeObj.mjs.html +2 -2
  148. package/docs/fsCleanFolder.mjs.html +2 -2
  149. package/docs/fsCopyFolder.mjs.html +2 -2
  150. package/docs/fsCreateFolder.mjs.html +2 -2
  151. package/docs/fsDeleteFolder.mjs.html +2 -2
  152. package/docs/fsGetFilesInFolder.mjs.html +2 -2
  153. package/docs/fsGetFoldersInFolder.mjs.html +2 -2
  154. package/docs/fsIsFile.mjs.html +2 -2
  155. package/docs/fsIsFolder.mjs.html +2 -2
  156. package/docs/fsReadText.mjs.html +2 -2
  157. package/docs/fsTreeFolder.mjs.html +2 -2
  158. package/docs/fsWriteText.mjs.html +2 -2
  159. package/docs/genGradientColor.mjs.html +2 -2
  160. package/docs/genID.mjs.html +2 -2
  161. package/docs/genPm.mjs.html +2 -2
  162. package/docs/getBufferSize.mjs.html +2 -2
  163. package/docs/getClearPathName.mjs.html +2 -2
  164. package/docs/getCsvStrFromData.mjs.html +2 -2
  165. package/docs/getDataFromExcelFileU8Arr.mjs.html +2 -2
  166. package/docs/getDataFromExcelFileU8ArrDyn.mjs.html +2 -2
  167. package/docs/getDirName.mjs.html +2 -2
  168. package/docs/getEnv.mjs.html +2 -2
  169. package/docs/getExcelU8ArrFromData.mjs.html +2 -2
  170. package/docs/getExcelWorkbookFromData.mjs.html +2 -2
  171. package/docs/getExcelWorkbookFromWorksheet.mjs.html +2 -2
  172. package/docs/getFileAccept.mjs.html +2 -2
  173. package/docs/getFileName.mjs.html +2 -2
  174. package/docs/getFileTrueName.mjs.html +2 -2
  175. package/docs/getGlobal.mjs.html +2 -2
  176. package/docs/getObjSize.mjs.html +2 -2
  177. package/docs/getTimeBetween.mjs.html +2 -2
  178. package/docs/getTimeFromUnit.mjs.html +2 -2
  179. package/docs/getTimeObject.mjs.html +2 -2
  180. package/docs/getTimeRange.mjs.html +2 -2
  181. package/docs/getUserAgent.mjs.html +2 -2
  182. package/docs/getUserAgentDyn.mjs.html +2 -2
  183. package/docs/getltdtkeys.mjs.html +2 -2
  184. package/docs/haskey.mjs.html +4 -3
  185. package/docs/html2pic.mjs.html +2 -2
  186. package/docs/html2picDyn.mjs.html +2 -2
  187. package/docs/html2str.mjs.html +2 -2
  188. package/docs/html2strDyn.mjs.html +2 -2
  189. package/docs/htmlDecode.mjs.html +2 -2
  190. package/docs/htmlEncode.mjs.html +2 -2
  191. package/docs/importResources.mjs.html +2 -2
  192. package/docs/index.html +2 -2
  193. package/docs/interp1.mjs.html +2 -2
  194. package/docs/isDev.mjs.html +2 -2
  195. package/docs/isEle.mjs.html +2 -2
  196. package/docs/isEleExistByID.mjs.html +2 -2
  197. package/docs/isEmail.mjs.html +2 -2
  198. package/docs/isIE.mjs.html +2 -2
  199. package/docs/isNarrow.mjs.html +2 -2
  200. package/docs/isStrHasCapital.mjs.html +2 -2
  201. package/docs/isStrHasLowerCase.mjs.html +2 -2
  202. package/docs/isStrHasNumber.mjs.html +2 -2
  203. package/docs/isUserIdentify.mjs.html +2 -2
  204. package/docs/isUserName.mjs.html +2 -2
  205. package/docs/isUserPW.mjs.html +2 -2
  206. package/docs/isWindow.mjs.html +2 -2
  207. package/docs/isab.mjs.html +2 -2
  208. package/docs/isarr.mjs.html +2 -2
  209. package/docs/isarr0.mjs.html +2 -2
  210. package/docs/isblob.mjs.html +2 -2
  211. package/docs/isbol.mjs.html +2 -2
  212. package/docs/isday.mjs.html +2 -2
  213. package/docs/isearr.mjs.html +2 -2
  214. package/docs/iseobj.mjs.html +2 -2
  215. package/docs/iser.mjs.html +2 -2
  216. package/docs/isernot.mjs.html +2 -2
  217. package/docs/isestr.mjs.html +2 -2
  218. package/docs/isfun.mjs.html +2 -2
  219. package/docs/isint.mjs.html +2 -2
  220. package/docs/ismonth.mjs.html +2 -2
  221. package/docs/isn0int.mjs.html +23 -2
  222. package/docs/isn0num.mjs.html +17 -8
  223. package/docs/isnbr.mjs.html +2 -2
  224. package/docs/isnint.mjs.html +23 -2
  225. package/docs/isnnum.mjs.html +127 -0
  226. package/docs/isnull.mjs.html +2 -2
  227. package/docs/isnum.mjs.html +2 -2
  228. package/docs/isobj.mjs.html +2 -2
  229. package/docs/isobj0.mjs.html +2 -2
  230. package/docs/isp0int.mjs.html +20 -2
  231. package/docs/isp0num.mjs.html +19 -4
  232. package/docs/ispint.mjs.html +21 -3
  233. package/docs/ispm.mjs.html +2 -2
  234. package/docs/ispnum.mjs.html +127 -0
  235. package/docs/isstr.mjs.html +2 -2
  236. package/docs/isstr0.mjs.html +2 -2
  237. package/docs/istime.mjs.html +2 -2
  238. package/docs/istimeTZ.mjs.html +2 -2
  239. package/docs/istimems.mjs.html +2 -2
  240. package/docs/istimemsTZ.mjs.html +2 -2
  241. package/docs/isu16arr.mjs.html +2 -2
  242. package/docs/isu8arr.mjs.html +2 -2
  243. package/docs/isundefined.mjs.html +2 -2
  244. package/docs/j2o.mjs.html +2 -2
  245. package/docs/keysmat2ltdt.mjs.html +2 -2
  246. package/docs/log.mjs.html +2 -2
  247. package/docs/ltdt2vrtsable.mjs.html +2 -2
  248. package/docs/ltdtdiff.mjs.html +2 -2
  249. package/docs/ltdtkeys2mat.mjs.html +2 -2
  250. package/docs/ltdtkeysheads2mat.mjs.html +2 -2
  251. package/docs/ltdtmapping.mjs.html +2 -2
  252. package/docs/ltdtmerge.mjs.html +2 -2
  253. package/docs/ltdtpick.mjs.html +2 -2
  254. package/docs/ltdtpull.mjs.html +2 -2
  255. package/docs/mat2ltdt.mjs.html +2 -2
  256. package/docs/matat.mjs.html +2 -2
  257. package/docs/now2str.mjs.html +2 -2
  258. package/docs/now2strp.mjs.html +2 -2
  259. package/docs/nowDay2str.mjs.html +2 -2
  260. package/docs/nowms2str.mjs.html +2 -2
  261. package/docs/nowms2strp.mjs.html +2 -2
  262. package/docs/o2j.mjs.html +2 -2
  263. package/docs/obj2b64.mjs.html +2 -2
  264. package/docs/obj2pb64.mjs.html +2 -2
  265. package/docs/obj2str.mjs.html +2 -2
  266. package/docs/obj2stru8arr.mjs.html +2 -2
  267. package/docs/obj2u8arr.mjs.html +2 -2
  268. package/docs/objSortBy.mjs.html +2 -2
  269. package/docs/ocr.mjs.html +2 -2
  270. package/docs/ocrDyn.mjs.html +2 -2
  271. package/docs/oo.mjs.html +2 -2
  272. package/docs/openLink.mjs.html +2 -2
  273. package/docs/pb642obj.mjs.html +2 -2
  274. package/docs/pm2resolve.mjs.html +2 -2
  275. package/docs/pmChain.mjs.html +2 -2
  276. package/docs/pmHook.mjs.html +2 -2
  277. package/docs/pmHookReject.mjs.html +2 -2
  278. package/docs/pmIni.mjs.html +2 -2
  279. package/docs/pmMap.mjs.html +2 -2
  280. package/docs/pmQueue.mjs.html +2 -2
  281. package/docs/pmSeries.mjs.html +2 -2
  282. package/docs/pmThrottle.mjs.html +2 -2
  283. package/docs/queue.mjs.html +2 -2
  284. package/docs/rep.mjs.html +2 -2
  285. package/docs/repObj.mjs.html +2 -2
  286. package/docs/replace.mjs.html +2 -2
  287. package/docs/replaceObj.mjs.html +2 -2
  288. package/docs/replacePlus.mjs.html +2 -2
  289. package/docs/round.mjs.html +2 -2
  290. package/docs/secd.mjs.html +2 -2
  291. package/docs/sep.mjs.html +2 -2
  292. package/docs/sepInt.mjs.html +2 -2
  293. package/docs/sind.mjs.html +2 -2
  294. package/docs/split.mjs.html +2 -2
  295. package/docs/str2aes.mjs.html +2 -2
  296. package/docs/str2b64.mjs.html +2 -2
  297. package/docs/str2md5.mjs.html +2 -2
  298. package/docs/str2obj.mjs.html +2 -2
  299. package/docs/str2sha512.mjs.html +2 -2
  300. package/docs/str2u8arr.mjs.html +2 -2
  301. package/docs/strCompare.mjs.html +2 -2
  302. package/docs/strFindFuzz.mjs.html +2 -2
  303. package/docs/strFindFuzzDyn.mjs.html +2 -2
  304. package/docs/strFindSimilar.mjs.html +2 -2
  305. package/docs/strdelleft.mjs.html +2 -2
  306. package/docs/strdelright.mjs.html +2 -2
  307. package/docs/strleft.mjs.html +2 -2
  308. package/docs/strmid.mjs.html +2 -2
  309. package/docs/strright.mjs.html +2 -2
  310. package/docs/stru8arr2obj.mjs.html +2 -2
  311. package/docs/tand.mjs.html +2 -2
  312. package/docs/time2day.mjs.html +2 -2
  313. package/docs/time2hour.mjs.html +2 -2
  314. package/docs/time2min.mjs.html +2 -2
  315. package/docs/timeTZ2day.mjs.html +2 -2
  316. package/docs/timeTZ2expire.mjs.html +2 -2
  317. package/docs/timeTZ2hour.mjs.html +2 -2
  318. package/docs/timeTZ2min.mjs.html +2 -2
  319. package/docs/timeTZ2past.mjs.html +2 -2
  320. package/docs/timems2day.mjs.html +2 -2
  321. package/docs/timems2hour.mjs.html +2 -2
  322. package/docs/timems2min.mjs.html +2 -2
  323. package/docs/timems2time.mjs.html +2 -2
  324. package/docs/timemsTZ2day.mjs.html +2 -2
  325. package/docs/timemsTZ2expire.mjs.html +2 -2
  326. package/docs/timemsTZ2hour.mjs.html +2 -2
  327. package/docs/timemsTZ2min.mjs.html +2 -2
  328. package/docs/timemsTZ2past.mjs.html +2 -2
  329. package/docs/timemsTZ2time.mjs.html +2 -2
  330. package/docs/treeObj.mjs.html +2 -2
  331. package/docs/trim.mjs.html +2 -2
  332. package/docs/u16arr2b64.mjs.html +2 -2
  333. package/docs/u16arr2u8arr.mjs.html +2 -2
  334. package/docs/u8arr2ab.mjs.html +2 -2
  335. package/docs/u8arr2b64.mjs.html +2 -2
  336. package/docs/u8arr2blob.mjs.html +2 -2
  337. package/docs/u8arr2bs.mjs.html +2 -2
  338. package/docs/u8arr2obj.mjs.html +2 -2
  339. package/docs/u8arr2str.mjs.html +2 -2
  340. package/docs/u8arr2u16arr.mjs.html +2 -2
  341. package/docs/urlParse.mjs.html +2 -2
  342. package/docs/verifyValue.mjs.html +2 -2
  343. package/docs/waitFun.mjs.html +2 -2
  344. package/docs/wsemi.html +508 -22
  345. package/examples/{ex-xss.html → ex-clearXSS.html} +1 -1
  346. package/examples/{ex-html-to-image.html → ex-domConvertToPic.html} +1 -1
  347. package/examples/{ex-html-to-image-dynamic.html → ex-domConvertToPicDyn.html} +1 -1
  348. package/examples/{ex-scrollIntoView.html → ex-domScrollIntoView.html} +1 -1
  349. package/examples/{ex-scrollTo.html → ex-domScrollTo.html} +1 -1
  350. package/examples/{ex-viewerjs.html → ex-domShowImages.html} +1 -1
  351. package/examples/{ex-viewerjs-dynamic.html → ex-domShowImagesDyn.html} +1 -1
  352. package/examples/{ex-tippyjs.html → ex-domTooltip.html} +1 -1
  353. package/examples/{ex-uaparser.html → ex-getUserAgent.html} +1 -1
  354. package/examples/{ex-uaparser-dynamic.html → ex-getUserAgentDyn.html} +1 -1
  355. package/examples/{ex-html2canvas.html → ex-html2pic.html} +1 -1
  356. package/examples/{ex-html2canvas-dynamic.html → ex-html2picDyn.html} +1 -1
  357. package/examples/{ex-htmlparser.html → ex-html2str.html} +1 -1
  358. package/examples/{ex-htmlparser-dynamic.html → ex-html2strDyn.html} +1 -1
  359. package/examples/{ex-tesseract.html → ex-ocr.html} +1 -1
  360. package/examples/{ex-tesseract-dynamic.html → ex-ocrDyn.html} +1 -1
  361. package/examples/{ex-openlink.html → ex-openLink.html} +0 -0
  362. package/examples/{ex-fuzzball.html → ex-strFindFuzz.html} +1 -1
  363. package/examples/{ex-fuzzball-dynamic.html → ex-strFindFuzzDyn.html} +1 -1
  364. package/examples/{ex-xlsx-dynamic.html → ex-xlsxDyn.html} +0 -0
  365. package/package.json +3 -3
  366. package/src/domConvertToPic.mjs +1 -0
  367. package/src/haskey.mjs +2 -1
  368. package/src/index.mjs +2 -0
  369. package/src/isn0int.mjs +21 -0
  370. package/src/isn0num.mjs +15 -6
  371. package/src/isnint.mjs +21 -0
  372. package/src/isnnum.mjs +58 -0
  373. package/src/isp0int.mjs +18 -0
  374. package/src/isp0num.mjs +17 -2
  375. package/src/ispint.mjs +19 -1
  376. package/src/ispnum.mjs +58 -0
  377. package/test/haskey.test.mjs +41 -0
  378. package/test/isn0num.test.mjs +5 -0
  379. package/test/isnnum.test.mjs +157 -0
  380. package/test/ispnum.test.mjs +157 -0
@@ -2,7 +2,7 @@
2
2
  <html xmlns="http://www.w3.org/1999/xhtml" lang="zh-tw">
3
3
  <head>
4
4
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
5
- <title>examples for xss</title>
5
+ <title>examples for clearXSS(xss)</title>
6
6
 
7
7
  <!-- @babel/polyfill已廢棄 -->
8
8
  <script nomodule src="https://cdn.jsdelivr.net/npm/@babel/polyfill@7.12.1/dist/polyfill.min.js"></script>
@@ -2,7 +2,7 @@
2
2
  <html xmlns="http://www.w3.org/1999/xhtml" lang="zh-tw">
3
3
  <head>
4
4
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
5
- <title>examples for html-to-image</title>
5
+ <title>examples for domConvertToPic(html-to-image)</title>
6
6
 
7
7
  <!-- @babel/polyfill已廢棄, 因html-to-image不支援IE11故不須引用 -->
8
8
  <script nomodule _src="https://cdn.jsdelivr.net/npm/@babel/polyfill@7.12.1/dist/polyfill.min.js"></script>
@@ -2,7 +2,7 @@
2
2
  <html xmlns="http://www.w3.org/1999/xhtml" lang="zh-tw">
3
3
  <head>
4
4
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
5
- <title>examples for html-to-image by dynamic import</title>
5
+ <title>examples for domConvertToPicDyn(html-to-image)</title>
6
6
 
7
7
  <!-- @babel/polyfill已廢棄 -->
8
8
  <script nomodule src="https://cdn.jsdelivr.net/npm/@babel/polyfill@7.12.1/dist/polyfill.min.js"></script>
@@ -2,7 +2,7 @@
2
2
  <html xmlns="http://www.w3.org/1999/xhtml" lang="zh-tw">
3
3
  <head>
4
4
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
5
- <title>examples for scrollIntoView</title>
5
+ <title>examples for domScrollIntoView</title>
6
6
 
7
7
  <!-- @babel/polyfill已廢棄 -->
8
8
  <script nomodule src="https://cdn.jsdelivr.net/npm/@babel/polyfill@7.12.1/dist/polyfill.min.js"></script>
@@ -2,7 +2,7 @@
2
2
  <html xmlns="http://www.w3.org/1999/xhtml" lang="zh-tw">
3
3
  <head>
4
4
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
5
- <title>examples for scrollTo</title>
5
+ <title>examples for domScrollTo</title>
6
6
 
7
7
  <!-- @babel/polyfill已廢棄 -->
8
8
  <script nomodule src="https://cdn.jsdelivr.net/npm/@babel/polyfill@7.12.1/dist/polyfill.min.js"></script>
@@ -2,7 +2,7 @@
2
2
  <html xmlns="http://www.w3.org/1999/xhtml" lang="zh-tw">
3
3
  <head>
4
4
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
5
- <title>examples for viewerjs</title>
5
+ <title>examples for domShowImages(viewerjs)</title>
6
6
 
7
7
  <!-- @babel/polyfill已廢棄 -->
8
8
  <script nomodule src="https://cdn.jsdelivr.net/npm/@babel/polyfill@7.12.1/dist/polyfill.min.js"></script>
@@ -2,7 +2,7 @@
2
2
  <html xmlns="http://www.w3.org/1999/xhtml" lang="zh-tw">
3
3
  <head>
4
4
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
5
- <title>examples for viewerjs by dynamic import</title>
5
+ <title>examples for domShowImagesDyn(viewerjs)</title>
6
6
 
7
7
  <!-- @babel/polyfill已廢棄 -->
8
8
  <script nomodule src="https://cdn.jsdelivr.net/npm/@babel/polyfill@7.12.1/dist/polyfill.min.js"></script>
@@ -2,7 +2,7 @@
2
2
  <html xmlns="http://www.w3.org/1999/xhtml" lang="zh-tw">
3
3
  <head>
4
4
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
5
- <title>examples for tippyjs</title>
5
+ <title>examples for domTooltip</title>
6
6
 
7
7
  <!-- @babel/polyfill已廢棄 -->
8
8
  <script nomodule src="https://cdn.jsdelivr.net/npm/@babel/polyfill@7.12.1/dist/polyfill.min.js"></script>
@@ -2,7 +2,7 @@
2
2
  <html xmlns="http://www.w3.org/1999/xhtml" lang="zh-tw">
3
3
  <head>
4
4
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
5
- <title>examples for ua-parser-js</title>
5
+ <title>examples for getUserAgent(ua-parser-js)</title>
6
6
 
7
7
  <!-- @babel/polyfill已廢棄 -->
8
8
  <script nomodule src="https://cdn.jsdelivr.net/npm/@babel/polyfill@7.12.1/dist/polyfill.min.js"></script>
@@ -2,7 +2,7 @@
2
2
  <html xmlns="http://www.w3.org/1999/xhtml" lang="zh-tw">
3
3
  <head>
4
4
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
5
- <title>examples for ua-parser-js by dynamic import</title>
5
+ <title>examples for getUserAgentDyn(ua-parser-js)</title>
6
6
 
7
7
  <!-- @babel/polyfill已廢棄 -->
8
8
  <script nomodule src="https://cdn.jsdelivr.net/npm/@babel/polyfill@7.12.1/dist/polyfill.min.js"></script>
@@ -2,7 +2,7 @@
2
2
  <html xmlns="http://www.w3.org/1999/xhtml" lang="zh-tw">
3
3
  <head>
4
4
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
5
- <title>examples for html2canvas</title>
5
+ <title>examples for html2pic(html2canvas)</title>
6
6
 
7
7
  <!-- @babel/polyfill已廢棄 -->
8
8
  <script nomodule src="https://cdn.jsdelivr.net/npm/@babel/polyfill@7.12.1/dist/polyfill.min.js"></script>
@@ -2,7 +2,7 @@
2
2
  <html xmlns="http://www.w3.org/1999/xhtml" lang="zh-tw">
3
3
  <head>
4
4
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
5
- <title>examples for html2canvas by dynamic import</title>
5
+ <title>examples for html2picDyn(html2canvas)</title>
6
6
 
7
7
  <!-- @babel/polyfill已廢棄 -->
8
8
  <script nomodule src="https://cdn.jsdelivr.net/npm/@babel/polyfill@7.12.1/dist/polyfill.min.js"></script>
@@ -2,7 +2,7 @@
2
2
  <html xmlns="http://www.w3.org/1999/xhtml" lang="zh-tw">
3
3
  <head>
4
4
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
5
- <title>examples for htmlparser</title>
5
+ <title>examples for html2str(htmlparser)</title>
6
6
 
7
7
  <!-- @babel/polyfill已廢棄 -->
8
8
  <script nomodule src="https://cdn.jsdelivr.net/npm/@babel/polyfill@7.12.1/dist/polyfill.min.js"></script>
@@ -2,7 +2,7 @@
2
2
  <html xmlns="http://www.w3.org/1999/xhtml" lang="zh-tw">
3
3
  <head>
4
4
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
5
- <title>examples for htmlparser</title>
5
+ <title>examples for html2strDyn(htmlparser)</title>
6
6
 
7
7
  <!-- @babel/polyfill已廢棄 -->
8
8
  <script nomodule src="https://cdn.jsdelivr.net/npm/@babel/polyfill@7.12.1/dist/polyfill.min.js"></script>
@@ -2,7 +2,7 @@
2
2
  <html xmlns="http://www.w3.org/1999/xhtml" lang="zh-tw">
3
3
  <head>
4
4
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
5
- <title>examples for tesseract.js</title>
5
+ <title>examples for ocr(tesseract.js)</title>
6
6
 
7
7
  <!-- @babel/polyfill已廢棄 -->
8
8
  <script nomodule src="https://cdn.jsdelivr.net/npm/@babel/polyfill@7.12.1/dist/polyfill.min.js"></script>
@@ -2,7 +2,7 @@
2
2
  <html xmlns="http://www.w3.org/1999/xhtml" lang="zh-tw">
3
3
  <head>
4
4
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
5
- <title>examples for tesseract.js by dynamic import</title>
5
+ <title>examples for ocrDyn(tesseract.js)</title>
6
6
 
7
7
  <!-- @babel/polyfill已廢棄 -->
8
8
  <script nomodule src="https://cdn.jsdelivr.net/npm/@babel/polyfill@7.12.1/dist/polyfill.min.js"></script>
File without changes
@@ -2,7 +2,7 @@
2
2
  <html xmlns="http://www.w3.org/1999/xhtml" lang="zh-tw">
3
3
  <head>
4
4
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
5
- <title>examples for fuzzball</title>
5
+ <title>examples for strFindFuzz(fuzzball)</title>
6
6
 
7
7
  <!-- @babel/polyfill已廢棄 -->
8
8
  <script nomodule src="https://cdn.jsdelivr.net/npm/@babel/polyfill@7.12.1/dist/polyfill.min.js"></script>
@@ -2,7 +2,7 @@
2
2
  <html xmlns="http://www.w3.org/1999/xhtml" lang="zh-tw">
3
3
  <head>
4
4
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
5
- <title>examples for fuzzball by dynamic import</title>
5
+ <title>examples for strFindFuzzDyn(fuzzball)</title>
6
6
 
7
7
  <!-- @babel/polyfill已廢棄 -->
8
8
  <script nomodule src="https://cdn.jsdelivr.net/npm/@babel/polyfill@7.12.1/dist/polyfill.min.js"></script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wsemi",
3
- "version": "1.6.21",
3
+ "version": "1.6.25",
4
4
  "description": "A support package for web developer.",
5
5
  "main": "dist/wsemi.umd.js",
6
6
  "dependencies": {
@@ -16,11 +16,11 @@
16
16
  "ua-parser-js": "^0.7.28",
17
17
  "viewerjs": "^1.10.1",
18
18
  "xlsx": "^0.17.2",
19
- "xss": "^1.0.9"
19
+ "xss": "^1.0.10"
20
20
  },
21
21
  "devDependencies": {
22
22
  "cheerio": "^1.0.0-rc.10",
23
- "w-package-tools": "^1.0.56"
23
+ "w-package-tools": "^1.0.59"
24
24
  },
25
25
  "scripts": {
26
26
  "test": "mocha --parallel --timeout 60000 --experimental-modules --es-module-specifier-resolution=node",
@@ -83,6 +83,7 @@ async function domConvertToPic(ele, opt = {}) {
83
83
 
84
84
  //eleOut
85
85
  let eleOut = document.createElement('div')
86
+ eleOut.style.opacity = 0
86
87
  eleOut.style.position = 'relative'
87
88
  eleOut.appendChild(eleIn)
88
89
 
package/src/haskey.mjs CHANGED
@@ -1,5 +1,6 @@
1
1
  import isobj from './isobj.mjs'
2
2
  import isestr from './isestr.mjs'
3
+ import isnum from './isnum.mjs'
3
4
 
4
5
 
5
6
  /**
@@ -22,7 +23,7 @@ function haskey(obj, key) {
22
23
  if (!isobj(obj)) {
23
24
  return false
24
25
  }
25
- if (!isestr(key)) {
26
+ if (!isestr(key) && !isnum(key)) {
26
27
  return false
27
28
  }
28
29
 
package/src/index.mjs CHANGED
@@ -177,6 +177,7 @@ export { default as isn0num } from './isn0num.mjs'
177
177
  export { default as isNarrow } from './isNarrow.mjs'
178
178
  export { default as isnbr } from './isnbr.mjs'
179
179
  export { default as isnint } from './isnint.mjs'
180
+ export { default as isnnum } from './isnnum.mjs'
180
181
  export { default as isnull } from './isnull.mjs'
181
182
  export { default as isnum } from './isnum.mjs'
182
183
  export { default as isobj } from './isobj.mjs'
@@ -185,6 +186,7 @@ export { default as isp0int } from './isp0int.mjs'
185
186
  export { default as isp0num } from './isp0num.mjs'
186
187
  export { default as ispint } from './ispint.mjs'
187
188
  export { default as ispm } from './ispm.mjs'
189
+ export { default as ispnum } from './ispnum.mjs'
188
190
  export { default as isstr } from './isstr.mjs'
189
191
  export { default as isstr0 } from './isstr0.mjs'
190
192
  export { default as isStrHasCapital } from './isStrHasCapital.mjs'
package/src/isn0int.mjs CHANGED
@@ -15,12 +15,33 @@ import cint from './cint.mjs'
15
15
  * console.log(isn0int(0))
16
16
  * // => true
17
17
  *
18
+ * console.log(isn0int('0'))
19
+ * // => true
20
+ *
18
21
  * console.log(isn0int(125))
19
22
  * // => false
20
23
  *
24
+ * console.log(isn0int(1.25))
25
+ * // => false
26
+ *
27
+ * console.log(isn0int('125'))
28
+ * // => false
29
+ *
30
+ * console.log(isn0int('1.25'))
31
+ * // => false
32
+
21
33
  * console.log(isn0int(-125))
22
34
  * // => true
23
35
  *
36
+ * console.log(isn0int(-1.25))
37
+ * // => false
38
+ *
39
+ * console.log(isn0int('-125'))
40
+ * // => true
41
+ *
42
+ * console.log(isn0int('-1.25'))
43
+ * // => false
44
+ *
24
45
  */
25
46
  function isn0int(v) {
26
47
 
package/src/isn0num.mjs CHANGED
@@ -15,24 +15,33 @@ import cdbl from './cdbl.mjs'
15
15
  * console.log(isn0num(0))
16
16
  * // => true
17
17
  *
18
+ * console.log(isn0num('0'))
19
+ * // => true
20
+ *
21
+ * console.log(isn0num(125))
22
+ * // => false
23
+ *
24
+ * console.log(isn0num(1.25))
25
+ * // => false
26
+ *
27
+ * console.log(isn0num('125'))
28
+ * // => false
29
+ *
30
+ * console.log(isn0num('1.25'))
31
+ * // => false
32
+ *
18
33
  * console.log(isn0num(-125))
19
34
  * // => true
20
35
  *
21
36
  * console.log(isn0num(-1.25))
22
37
  * // => true
23
38
  *
24
- * console.log(isn0num(125))
25
- * // => false
26
- *
27
39
  * console.log(isn0num('-125'))
28
40
  * // => true
29
41
  *
30
42
  * console.log(isn0num('-1.25'))
31
43
  * // => true
32
44
  *
33
- * console.log(isn0num('125'))
34
- * // => false
35
- *
36
45
  */
37
46
  function isn0num(v) {
38
47
 
package/src/isnint.mjs CHANGED
@@ -15,12 +15,33 @@ import cint from './cint.mjs'
15
15
  * console.log(isnint(0))
16
16
  * // => false
17
17
  *
18
+ * console.log(isnint('0'))
19
+ * // => false
20
+ *
18
21
  * console.log(isnint(125))
19
22
  * // => false
20
23
  *
24
+ * console.log(isnint(1.25))
25
+ * // => false
26
+ *
27
+ * console.log(isnint('125'))
28
+ * // => false
29
+ *
30
+ * console.log(isnint('1.25'))
31
+ * // => false
32
+
21
33
  * console.log(isnint(-125))
22
34
  * // => true
23
35
  *
36
+ * console.log(isnint(-1.25))
37
+ * // => false
38
+ *
39
+ * console.log(isnint('-125'))
40
+ * // => true
41
+ *
42
+ * console.log(isnint('-1.25'))
43
+ * // => false
44
+ *
24
45
  */
25
46
  function isnint(v) {
26
47
 
package/src/isnnum.mjs ADDED
@@ -0,0 +1,58 @@
1
+ import isnum from './isnum.mjs'
2
+ import cdbl from './cdbl.mjs'
3
+
4
+
5
+ /**
6
+ * 判斷是否為小於0浮點數
7
+ *
8
+ * Unit Test: {@link https://github.com/yuda-lyu/wsemi/blob/master/test/isnnum.test.mjs Github}
9
+ * @memberOf wsemi
10
+ * @param {*} v 輸入任意資料
11
+ * @returns {Boolean} 回傳判斷布林值
12
+ * @example
13
+ *
14
+ * console.log(isnnum(0))
15
+ * // => false
16
+ *
17
+ * console.log(isnnum('0'))
18
+ * // => false
19
+ *
20
+ * console.log(isnnum(125))
21
+ * // => false
22
+ *
23
+ * console.log(isnnum(1.25))
24
+ * // => false
25
+ *
26
+ * console.log(isnnum('125'))
27
+ * // => false
28
+ *
29
+ * console.log(isnnum('1.25'))
30
+ * // => false
31
+ *
32
+ * console.log(isnnum(-125))
33
+ * // => true
34
+ *
35
+ * console.log(isnnum(-1.25))
36
+ * // => true
37
+ *
38
+ * console.log(isnnum('-125'))
39
+ * // => true
40
+ *
41
+ * console.log(isnnum('-1.25'))
42
+ * // => true
43
+ *
44
+ */
45
+ function isnnum(v) {
46
+
47
+ //check
48
+ if (!isnum(v)) {
49
+ return false
50
+ }
51
+
52
+ let r = cdbl(v) < 0
53
+
54
+ return r
55
+ }
56
+
57
+
58
+ export default isnnum
package/src/isp0int.mjs CHANGED
@@ -15,6 +15,9 @@ import cint from './cint.mjs'
15
15
  * console.log(isp0int(0))
16
16
  * // => true
17
17
  *
18
+ * console.log(isp0int('0'))
19
+ * // => true
20
+ *
18
21
  * console.log(isp0int(125))
19
22
  * // => true
20
23
  *
@@ -24,6 +27,21 @@ import cint from './cint.mjs'
24
27
  * console.log(isp0int('125'))
25
28
  * // => true
26
29
  *
30
+ * console.log(isp0int('1.25'))
31
+ * // => false
32
+
33
+ * console.log(isp0int(-125))
34
+ * // => false
35
+ *
36
+ * console.log(isp0int(-1.25))
37
+ * // => false
38
+ *
39
+ * console.log(isp0int('-125'))
40
+ * // => false
41
+ *
42
+ * console.log(isp0int('-1.25'))
43
+ * // => false
44
+ *
27
45
  */
28
46
  function isp0int(v) {
29
47
 
package/src/isp0num.mjs CHANGED
@@ -15,17 +15,32 @@ import cdbl from './cdbl.mjs'
15
15
  * console.log(isp0num(0))
16
16
  * // => true
17
17
  *
18
+ * console.log(isp0num('0'))
19
+ * // => true
20
+ *
18
21
  * console.log(isp0num(125))
19
22
  * // => true
20
23
  *
21
24
  * console.log(isp0num(1.25))
22
25
  * // => true
23
26
  *
24
- * console.log(isp0num(-1.25))
25
- * // => false
27
+ * console.log(isp0num('125'))
28
+ * // => true
26
29
  *
27
30
  * console.log(isp0num('1.25'))
28
31
  * // => true
32
+
33
+ * console.log(isp0num(-125))
34
+ * // => false
35
+ *
36
+ * console.log(isp0num(-1.25))
37
+ * // => false
38
+ *
39
+ * console.log(isp0num('-125'))
40
+ * // => false
41
+ *
42
+ * console.log(isp0num('-1.25'))
43
+ * // => false
29
44
  *
30
45
  */
31
46
  function isp0num(v) {
package/src/ispint.mjs CHANGED
@@ -15,13 +15,31 @@ import cint from './cint.mjs'
15
15
  * console.log(ispint(0))
16
16
  * // => false
17
17
  *
18
+ * console.log(ispint('0'))
19
+ * // => false
20
+ *
18
21
  * console.log(ispint(125))
19
22
  * // => true
20
23
  *
24
+ * console.log(ispint(1.25))
25
+ * // => false
26
+ *
21
27
  * console.log(ispint('125'))
22
28
  * // => true
23
29
  *
24
- * console.log(ispint(1.25))
30
+ * console.log(ispint('1.25'))
31
+ * // => false
32
+
33
+ * console.log(ispint(-125))
34
+ * // => false
35
+ *
36
+ * console.log(ispint(-1.25))
37
+ * // => false
38
+ *
39
+ * console.log(ispint('-125'))
40
+ * // => false
41
+ *
42
+ * console.log(ispint('-1.25'))
25
43
  * // => false
26
44
  *
27
45
  */
package/src/ispnum.mjs ADDED
@@ -0,0 +1,58 @@
1
+ import isnum from './isnum.mjs'
2
+ import cdbl from './cdbl.mjs'
3
+
4
+
5
+ /**
6
+ * 判斷是否為大於0浮點數
7
+ *
8
+ * Unit Test: {@link https://github.com/yuda-lyu/wsemi/blob/master/test/ispnum.test.mjs Github}
9
+ * @memberOf wsemi
10
+ * @param {*} v 輸入任意資料
11
+ * @returns {Boolean} 回傳判斷布林值
12
+ * @example
13
+ *
14
+ * console.log(ispnum(0))
15
+ * // => false
16
+ *
17
+ * console.log(ispnum('0'))
18
+ * // => false
19
+ *
20
+ * console.log(ispnum(125))
21
+ * // => true
22
+ *
23
+ * console.log(ispnum(1.25))
24
+ * // => true
25
+ *
26
+ * console.log(ispnum('125'))
27
+ * // => true
28
+ *
29
+ * console.log(ispnum('1.25'))
30
+ * // => true
31
+
32
+ * console.log(ispnum(-125))
33
+ * // => false
34
+ *
35
+ * console.log(ispnum(-1.25))
36
+ * // => false
37
+ *
38
+ * console.log(ispnum('-125'))
39
+ * // => false
40
+ *
41
+ * console.log(ispnum('-1.25'))
42
+ * // => false
43
+ *
44
+ */
45
+ function ispnum(v) {
46
+
47
+ //check
48
+ if (!isnum(v)) {
49
+ return false
50
+ }
51
+
52
+ let r = cdbl(v) > 0
53
+
54
+ return r
55
+ }
56
+
57
+
58
+ export default ispnum
@@ -4,6 +4,47 @@ import haskey from '../src/haskey.mjs'
4
4
 
5
5
  describe(`haskey`, function() {
6
6
 
7
+ it(`should return true when input { 1: 'abc', a: 123, b: 'xyz', c: '45op', d: null }, 1`, function() {
8
+ let r = haskey({ 1: 'abc', a: 123, b: 'xyz', c: '45op', d: null }, 1)
9
+ assert.strict.deepStrictEqual(r, true)
10
+ })
11
+
12
+ it(`should return true when input { 1: 'abc', a: 123, b: 'xyz', c: '45op', d: null }, '1'`, function() {
13
+ let r = haskey({ 1: 'abc', a: 123, b: 'xyz', c: '45op', d: null }, '1')
14
+ assert.strict.deepStrictEqual(r, true) //字串型數字key會自動轉成數字
15
+ })
16
+
17
+ it(`should return true when input { 1.2: 'abc', a: 123, b: 'xyz', c: '45op', d: null }, 1.2`, function() {
18
+ let r = haskey({ 1.2: 'abc', a: 123, b: 'xyz', c: '45op', d: null }, 1.2)
19
+ assert.strict.deepStrictEqual(r, true)
20
+ })
21
+
22
+ it(`should return true when input { 1.2: 'abc', a: 123, b: 'xyz', c: '45op', d: null }, '1.2'`, function() {
23
+ let r = haskey({ 1.2: 'abc', a: 123, b: 'xyz', c: '45op', d: null }, '1.2')
24
+ assert.strict.deepStrictEqual(r, true) //字串型數字key會自動轉成數字
25
+ })
26
+
27
+
28
+ it(`should return true when input { '1': 'abc', a: 123, b: 'xyz', c: '45op', d: null }, 1`, function() {
29
+ let r = haskey({ '1': 'abc', 'a': 123, 'b': 'xyz', 'c': '45op', 'd': null }, 1)
30
+ assert.strict.deepStrictEqual(r, true) //數字key會自動轉成字串才判斷
31
+ })
32
+
33
+ it(`should return true when input { '1': 'abc', a: 123, b: 'xyz', c: '45op', d: null }, '1'`, function() {
34
+ let r = haskey({ '1': 'abc', 'a': 123, 'b': 'xyz', 'c': '45op', 'd': null }, '1')
35
+ assert.strict.deepStrictEqual(r, true)
36
+ })
37
+
38
+ it(`should return true when input { '1.2': 'abc', a: 123, b: 'xyz', c: '45op', d: null }, 1.2`, function() {
39
+ let r = haskey({ '1.2': 'abc', 'a': 123, 'b': 'xyz', 'c': '45op', 'd': null }, 1.2)
40
+ assert.strict.deepStrictEqual(r, true) //數字key會自動轉成字串才判斷
41
+ })
42
+
43
+ it(`should return true when input { '1.2': 'abc', a: 123, b: 'xyz', c: '45op', d: null }, '1.2'`, function() {
44
+ let r = haskey({ '1.2': 'abc', 'a': 123, 'b': 'xyz', 'c': '45op', 'd': null }, '1.2')
45
+ assert.strict.deepStrictEqual(r, true)
46
+ })
47
+
7
48
  it(`should return true when input { a: 123, b: 'xyz', c: '45op', d: null }, 'a'`, function() {
8
49
  let r = haskey({ a: 123, b: 'xyz', c: '45op', d: null }, 'a')
9
50
  assert.strict.deepStrictEqual(r, true)
@@ -34,6 +34,11 @@ describe(`isn0num`, function() {
34
34
  assert.strict.deepStrictEqual(r, true)
35
35
  })
36
36
 
37
+ it(`should return true when input '0'`, function() {
38
+ let r = isn0num('0')
39
+ assert.strict.deepStrictEqual(r, true)
40
+ })
41
+
37
42
  it(`should return false when input 125`, function() {
38
43
  let r = isn0num(125)
39
44
  assert.strict.deepStrictEqual(r, false)