wsemi 1.9.13 → 1.9.14
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.
- package/README.md +1 -1
- package/dist/wsemi.umd.js +7 -7
- package/dist/wsemi.umd.js.map +1 -1
- package/docs/-_class.mjs.html +1 -1
- package/docs/-_const.mjs.html +1 -1
- package/docs/-_detector.mjs.html +1 -1
- package/docs/-_optNum.mjs.html +1 -1
- package/docs/ab2blob.mjs.html +1 -1
- package/docs/ab2u8arr.mjs.html +1 -1
- package/docs/addExcelWorksheetFromData.mjs.html +1 -1
- package/docs/addMonth.mjs.html +1 -1
- package/docs/aes2str.mjs.html +1 -1
- package/docs/alive.mjs.html +106 -5
- package/docs/arr2dt.mjs.html +1 -1
- package/docs/arrAccum.mjs.html +1 -1
- package/docs/arrAdd.mjs.html +1 -1
- package/docs/arrAt.mjs.html +1 -1
- package/docs/arrDiff.mjs.html +1 -1
- package/docs/arrFilterByKeywords.mjs.html +1 -1
- package/docs/arrFilterByNum.mjs.html +1 -1
- package/docs/arrFilterByPnum.mjs.html +1 -1
- package/docs/arrFilterByPnumAndToLog.mjs.html +1 -1
- package/docs/arrFind.mjs.html +1 -1
- package/docs/arrGroupByMaxmin.mjs.html +1 -1
- package/docs/arrHas.mjs.html +1 -1
- package/docs/arrInsert.mjs.html +1 -1
- package/docs/arrLookupByMaxmin.mjs.html +1 -1
- package/docs/arrMax.mjs.html +1 -1
- package/docs/arrMin.mjs.html +1 -1
- package/docs/arrMulti.mjs.html +1 -1
- package/docs/arrNorm.mjs.html +1 -1
- package/docs/arrProduct.mjs.html +1 -1
- package/docs/arrPull.mjs.html +1 -1
- package/docs/arrPullAt.mjs.html +1 -1
- package/docs/arrReduce.mjs.html +1 -1
- package/docs/arrReverse.mjs.html +1 -1
- package/docs/arrSep.mjs.html +1 -1
- package/docs/arrSort.mjs.html +1 -1
- package/docs/asind.mjs.html +1 -1
- package/docs/atan2d.mjs.html +1 -1
- package/docs/atand.mjs.html +1 -1
- package/docs/attstr.mjs.html +1 -1
- package/docs/b642obj.mjs.html +1 -1
- package/docs/b642str.mjs.html +1 -1
- package/docs/b642u16arr.mjs.html +1 -1
- package/docs/b642u8arr.mjs.html +1 -1
- package/docs/binstr.mjs.html +1 -1
- package/docs/blob2ab.mjs.html +1 -1
- package/docs/blob2b64.mjs.html +1 -1
- package/docs/blob2str.mjs.html +1 -1
- package/docs/blob2u8arr.mjs.html +1 -1
- package/docs/blobs2b64s.mjs.html +1 -1
- package/docs/blobs2u8arrs.mjs.html +1 -1
- package/docs/bodyLog.mjs.html +1 -1
- package/docs/browserView.mjs.html +1 -1
- package/docs/browserViewFromBlob.mjs.html +1 -1
- package/docs/browserViewFromText.mjs.html +1 -1
- package/docs/browserViewFromU8arr.mjs.html +1 -1
- package/docs/bs2u8arr.mjs.html +1 -1
- package/docs/bufRead.mjs.html +1 -1
- package/docs/bufReadDbl.mjs.html +1 -1
- package/docs/bufWrite.mjs.html +1 -1
- package/docs/bufWriteDbl.mjs.html +1 -1
- package/docs/cache.mjs.html +3 -3
- package/docs/cacheBd.mjs.html +1 -1
- package/docs/cacheSt.mjs.html +2 -2
- package/docs/cbol.mjs.html +1 -1
- package/docs/cdbl.mjs.html +1 -1
- package/docs/ceil.mjs.html +1 -1
- package/docs/cfilesize.mjs.html +1 -1
- package/docs/cfinancial.mjs.html +1 -1
- package/docs/cint.mjs.html +1 -1
- package/docs/clearXSS.mjs.html +1 -1
- package/docs/clearXSSDyn.mjs.html +1 -1
- package/docs/color.mjs.html +1 -1
- package/docs/composeToTree.mjs.html +1 -1
- package/docs/convertToTree.mjs.html +1 -1
- package/docs/copyStrToClipboard.mjs.html +1 -1
- package/docs/cosd.mjs.html +1 -1
- package/docs/cotd.mjs.html +1 -1
- package/docs/createExcelWorkbook.mjs.html +1 -1
- package/docs/cscd.mjs.html +1 -1
- package/docs/cstr.mjs.html +1 -1
- package/docs/day2cht.mjs.html +1 -1
- package/docs/debounce.mjs.html +1 -1
- package/docs/delay.mjs.html +1 -1
- package/docs/detectXSS.mjs.html +1 -1
- package/docs/detectXSSDyn.mjs.html +1 -1
- package/docs/dig.mjs.html +1 -1
- package/docs/digExp.mjs.html +1 -1
- package/docs/domAlert.mjs.html +1 -1
- package/docs/domAppend.mjs.html +1 -1
- package/docs/domCancelEvent.mjs.html +1 -1
- package/docs/domCompareText.mjs.html +1 -1
- package/docs/domConvertToPic.mjs.html +1 -1
- package/docs/domConvertToPicDyn.mjs.html +1 -1
- package/docs/domDetect.mjs.html +1 -1
- package/docs/domDrag.mjs.html +1 -1
- package/docs/domDragBarAndScroll.mjs.html +1 -1
- package/docs/domDragPointer.mjs.html +1 -1
- package/docs/domDragPreview.mjs.html +1 -1
- package/docs/domDropFiles.mjs.html +1 -1
- package/docs/domElementsFromPoint.mjs.html +1 -1
- package/docs/domFadeIn.mjs.html +1 -1
- package/docs/domFadeOut.mjs.html +1 -1
- package/docs/domFind.mjs.html +1 -1
- package/docs/domFinds.mjs.html +1 -1
- package/docs/domGetAttr.mjs.html +1 -1
- package/docs/domGetBoudRect.mjs.html +1 -1
- package/docs/domGetBoudRectRefSelf.mjs.html +1 -1
- package/docs/domGetFileAccept.mjs.html +1 -1
- package/docs/domGetFiles.mjs.html +1 -1
- package/docs/domGetParents.mjs.html +1 -1
- package/docs/domGetPointFromEvent.mjs.html +1 -1
- package/docs/domGetScrollableParent.mjs.html +1 -1
- package/docs/domGetWindowSize.mjs.html +1 -1
- package/docs/domIsClientXYIn.mjs.html +1 -1
- package/docs/domIsFocused.mjs.html +1 -1
- package/docs/domIsRendered.mjs.html +1 -1
- package/docs/domIsStable.mjs.html +1 -1
- package/docs/domIsVisible.mjs.html +1 -1
- package/docs/domPrepend.mjs.html +1 -1
- package/docs/domRemove.mjs.html +1 -1
- package/docs/domRenderMarkdownMind.mjs.html +1 -1
- package/docs/domRenderMarkdownMindDyn.mjs.html +1 -1
- package/docs/domRipple.mjs.html +1 -1
- package/docs/domScrollIntoView.mjs.html +1 -1
- package/docs/domScrollTo.mjs.html +1 -1
- package/docs/domSetAttr.mjs.html +1 -1
- package/docs/domShowImages.mjs.html +1 -1
- package/docs/domShowImagesDyn.mjs.html +1 -1
- package/docs/domShowInputAndGetFiles.mjs.html +1 -1
- package/docs/domShowInputAndGetFilesU8Arrs.mjs.html +1 -1
- package/docs/domShowInputDatatime.mjs.html +1 -1
- package/docs/domTooltip.mjs.html +1 -1
- package/docs/domTriggerEvent.mjs.html +1 -1
- package/docs/domVirtualCreate.mjs.html +1 -1
- package/docs/domVirtualCreateQueue.mjs.html +1 -1
- package/docs/downloadExcelFileFromData.mjs.html +1 -1
- package/docs/downloadExcelFileFromDataDyn.mjs.html +1 -1
- package/docs/downloadFileFromB64.mjs.html +1 -1
- package/docs/downloadFileFromBlob.mjs.html +1 -1
- package/docs/downloadFileFromText.mjs.html +1 -1
- package/docs/downloadFileFromU8Arr.mjs.html +1 -1
- package/docs/dtmapping.mjs.html +1 -1
- package/docs/dtpick.mjs.html +1 -1
- package/docs/estimateTicks.mjs.html +1 -1
- package/docs/evEmit.mjs.html +2 -2
- package/docs/evEmitDelay.mjs.html +1 -1
- package/docs/evem.mjs.html +1 -1
- package/docs/examples/ex-blob2b64.html +1 -1
- package/docs/examples/ex-clearXSS.html +1 -1
- package/docs/examples/ex-clearXSSDyn.html +1 -1
- package/docs/examples/ex-colorConverter.html +1 -1
- package/docs/examples/ex-detectXSS.html +1 -1
- package/docs/examples/ex-detectXSSDyn.html +1 -1
- package/docs/examples/ex-domCompareText.html +1 -1
- package/docs/examples/ex-domConvertToPic.html +1 -1
- package/docs/examples/ex-domDrag.html +1 -1
- package/docs/examples/ex-domDropFiles.html +1 -1
- package/docs/examples/ex-domIsVisible.html +1 -1
- package/docs/examples/ex-domRenderMarkdownMind.html +1 -1
- package/docs/examples/ex-domRenderMarkdownMindDyn.html +1 -1
- package/docs/examples/ex-domRipple.html +1 -1
- package/docs/examples/ex-domScrollIntoView.html +1 -1
- package/docs/examples/ex-domScrollTo.html +1 -1
- package/docs/examples/ex-domShowImages.html +1 -1
- package/docs/examples/ex-domShowImagesDyn.html +1 -1
- package/docs/examples/ex-domShowInputAndGetFiles.html +1 -1
- package/docs/examples/ex-domTooltip.html +1 -1
- package/docs/examples/ex-getFileHash.html +1 -1
- package/docs/examples/ex-getUserAgent.html +1 -1
- package/docs/examples/ex-getUserAgentDyn.html +1 -1
- package/docs/examples/ex-html2str.html +1 -1
- package/docs/examples/ex-obj2u8arr-u8arr2obj.html +1 -1
- package/docs/examples/ex-openLink.html +1 -1
- package/docs/examples/ex-str2aes-aes2str.html +1 -1
- package/docs/examples/ex-str2b64-b642str.html +1 -1
- package/docs/examples/ex-strFindFuzz.html +1 -1
- package/docs/examples/ex-timeTZ2expire-timeTZ2past.html +1 -1
- package/docs/examples/ex-xlsx.html +1 -1
- package/docs/execCli.mjs.html +1 -1
- package/docs/execCliCore.mjs.html +1 -1
- package/docs/execCliJsonRpc.mjs.html +1 -1
- package/docs/execCliSession.mjs.html +1 -1
- package/docs/execJsCode.mjs.html +1 -1
- package/docs/execProcess.mjs.html +1 -1
- package/docs/execProcessKillPid.mjs.html +1 -1
- package/docs/filepathToTree.mjs.html +1 -1
- package/docs/files2data.mjs.html +1 -1
- package/docs/flattenToConn.mjs.html +1 -1
- package/docs/flattenTree.mjs.html +1 -1
- package/docs/floor.mjs.html +1 -1
- package/docs/fsBuildReadStreamText.mjs.html +1 -1
- package/docs/fsBuildWriteStreamText.mjs.html +1 -1
- package/docs/fsCleanFolder.mjs.html +1 -1
- package/docs/fsCleanFolderCore.mjs.html +1 -1
- package/docs/fsCopyFile.mjs.html +1 -1
- package/docs/fsCopyFileCore.mjs.html +1 -1
- package/docs/fsCopyFolder.mjs.html +1 -1
- package/docs/fsCopyFolderCore.mjs.html +1 -1
- package/docs/fsCreateFile.mjs.html +1 -1
- package/docs/fsCreateFileCore.mjs.html +1 -1
- package/docs/fsCreateFolder.mjs.html +1 -1
- package/docs/fsCreateFolderCore.mjs.html +1 -1
- package/docs/fsDeleteFile.mjs.html +1 -1
- package/docs/fsDeleteFileCore.mjs.html +1 -1
- package/docs/fsDeleteFileSafe.mjs.html +1 -1
- package/docs/fsDeleteFileSafeCore.mjs.html +1 -1
- package/docs/fsDeleteFolder.mjs.html +1 -1
- package/docs/fsDeleteFolderCore.mjs.html +1 -1
- package/docs/fsDeleteFolderSafe.mjs.html +1 -1
- package/docs/fsDeleteFolderSafeCore.mjs.html +1 -1
- package/docs/fsDownloadFile.mjs.html +1 -1
- package/docs/fsDownloadFileCore.mjs.html +1 -1
- package/docs/fsEvem.mjs.html +1 -1
- package/docs/fsExists.mjs.html +1 -1
- package/docs/fsExistsCore.mjs.html +1 -1
- package/docs/fsGetFileBasicHash.mjs.html +1 -1
- package/docs/fsGetFileBasicHashCore.mjs.html +1 -1
- package/docs/fsGetFileHash.mjs.html +1 -1
- package/docs/fsGetFileHashCore.mjs.html +1 -1
- package/docs/fsGetFileXxHash.mjs.html +1 -1
- package/docs/fsGetFileXxHashCore.mjs.html +1 -1
- package/docs/fsGetFilesInFolder.mjs.html +1 -1
- package/docs/fsGetFilesInFolderCore.mjs.html +1 -1
- package/docs/fsGetFilesWithHashInFolder.mjs.html +1 -1
- package/docs/fsGetFilesWithHashInFolderCore.mjs.html +1 -1
- package/docs/fsGetFolderBasicHash.mjs.html +1 -1
- package/docs/fsGetFolderBasicHashCore.mjs.html +1 -1
- package/docs/fsGetFoldersInFolder.mjs.html +1 -1
- package/docs/fsGetFoldersInFolderCore.mjs.html +1 -1
- package/docs/fsIsFile.mjs.html +1 -1
- package/docs/fsIsFileCore.mjs.html +1 -1
- package/docs/fsIsFolder.mjs.html +1 -1
- package/docs/fsIsFolderCore.mjs.html +1 -1
- package/docs/fsMergeFiles.mjs.html +1 -1
- package/docs/fsMergeFilesCore.mjs.html +1 -1
- package/docs/fsReadJson.mjs.html +1 -1
- package/docs/fsReadText.mjs.html +1 -1
- package/docs/fsReadTextCore.mjs.html +1 -1
- package/docs/fsRenameFile.mjs.html +1 -1
- package/docs/fsRenameFileCore.mjs.html +1 -1
- package/docs/fsRenameFolder.mjs.html +1 -1
- package/docs/fsRenameFolderCore.mjs.html +1 -1
- package/docs/fsSrlog.mjs.html +1 -1
- package/docs/fsSyncFolder.mjs.html +1 -1
- package/docs/fsSyncFolderCore.mjs.html +1 -1
- package/docs/fsTask.mjs.html +1 -1
- package/docs/fsTaskCp.mjs.html +1 -1
- package/docs/fsTreeFolder.mjs.html +1 -1
- package/docs/fsTreeFolderCore.mjs.html +1 -1
- package/docs/fsTreeFolderWithHash.mjs.html +1 -1
- package/docs/fsTreeFolderWithHashCore.mjs.html +1 -1
- package/docs/fsWatchFile.mjs.html +1 -1
- package/docs/fsWatchFolder.mjs.html +1 -1
- package/docs/fsWriteJson.mjs.html +1 -1
- package/docs/fsWriteText.mjs.html +1 -1
- package/docs/fsWriteTextCore.mjs.html +1 -1
- package/docs/genGradientColor.mjs.html +1 -1
- package/docs/genID.mjs.html +1 -1
- package/docs/genIDSeq.mjs.html +1 -1
- package/docs/genPm.mjs.html +1 -1
- package/docs/getBufferSize.mjs.html +1 -1
- package/docs/getClearPathName.mjs.html +1 -1
- package/docs/getCsvStrFromData.mjs.html +1 -1
- package/docs/getDataFromExcelFileU8Arr.mjs.html +1 -1
- package/docs/getDataFromExcelFileU8ArrDyn.mjs.html +1 -1
- package/docs/getEnv.mjs.html +1 -1
- package/docs/getErrorMessage.mjs.html +1 -1
- package/docs/getExcelU8ArrFromData.mjs.html +1 -1
- package/docs/getExcelU8ArrFromWorkbook.mjs.html +1 -1
- package/docs/getExcelWorkbookFromData.mjs.html +1 -1
- package/docs/getExcelWorkbookFromWorksheet.mjs.html +1 -1
- package/docs/getExcelWorksheetFromData.mjs.html +1 -1
- package/docs/getFileAccept.mjs.html +1 -1
- package/docs/getFileBasicHash.mjs.html +1 -1
- package/docs/getFileHash.mjs.html +1 -1
- package/docs/getFileName.mjs.html +1 -1
- package/docs/getFileNameExt.mjs.html +1 -1
- package/docs/getFileTrueName.mjs.html +1 -1
- package/docs/getFileType.mjs.html +1 -1
- package/docs/getFileXxHash.mjs.html +1 -1
- package/docs/getGlobal.mjs.html +1 -1
- package/docs/getObjSize.mjs.html +1 -1
- package/docs/getPathParent.mjs.html +1 -1
- package/docs/getTimeBetween.mjs.html +1 -1
- package/docs/getTimeFromUnit.mjs.html +1 -1
- package/docs/getTimeHp.mjs.html +1 -1
- package/docs/getTimeObject.mjs.html +1 -1
- package/docs/getTimeRange.mjs.html +1 -1
- package/docs/getUserAgent.mjs.html +1 -1
- package/docs/getUserAgentDyn.mjs.html +1 -1
- package/docs/getltdtkeys.mjs.html +1 -1
- package/docs/global.html +1 -1
- package/docs/haskey.mjs.html +1 -1
- package/docs/html2str.mjs.html +1 -1
- package/docs/htmlDecode.mjs.html +1 -1
- package/docs/htmlEncode.mjs.html +1 -1
- package/docs/importResources.mjs.html +1 -1
- package/docs/index.html +1 -1
- package/docs/interp1.mjs.html +1 -1
- package/docs/isDate.mjs.html +1 -1
- package/docs/isDev.mjs.html +1 -1
- package/docs/isEle.mjs.html +1 -1
- package/docs/isEleExistByID.mjs.html +1 -1
- package/docs/isEmail.mjs.html +1 -1
- package/docs/isErr.mjs.html +1 -1
- package/docs/isIE.mjs.html +1 -1
- package/docs/isNarrow.mjs.html +1 -1
- package/docs/isStrHasCapital.mjs.html +1 -1
- package/docs/isStrHasLetter.mjs.html +1 -1
- package/docs/isStrHasLowerCase.mjs.html +1 -1
- package/docs/isStrHasNumber.mjs.html +1 -1
- package/docs/isStrHasSpace.mjs.html +1 -1
- package/docs/isStrHasSymbol.mjs.html +1 -1
- package/docs/isUserIdentify.mjs.html +1 -1
- package/docs/isUserName.mjs.html +1 -1
- package/docs/isUserPw.mjs.html +1 -1
- package/docs/isWindow.mjs.html +1 -1
- package/docs/isab.mjs.html +1 -1
- package/docs/isarr.mjs.html +1 -1
- package/docs/isarr0.mjs.html +1 -1
- package/docs/isarr1.mjs.html +1 -1
- package/docs/isbigint.mjs.html +1 -1
- package/docs/isblob.mjs.html +1 -1
- package/docs/isbol.mjs.html +1 -1
- package/docs/isday.mjs.html +1 -1
- package/docs/isearr.mjs.html +1 -1
- package/docs/iseobj.mjs.html +1 -1
- package/docs/iser.mjs.html +1 -1
- package/docs/isernot.mjs.html +1 -1
- package/docs/isestr.mjs.html +1 -1
- package/docs/isfile.mjs.html +1 -1
- package/docs/isfun.mjs.html +1 -1
- package/docs/isint.mjs.html +1 -1
- package/docs/ismonth.mjs.html +1 -1
- package/docs/isn0int.mjs.html +1 -1
- package/docs/isn0num.mjs.html +1 -1
- package/docs/isnan.mjs.html +1 -1
- package/docs/isnbr.mjs.html +1 -1
- package/docs/isnint.mjs.html +1 -1
- package/docs/isnnum.mjs.html +1 -1
- package/docs/isnull.mjs.html +1 -1
- package/docs/isnum.mjs.html +1 -1
- package/docs/isobj.mjs.html +1 -1
- package/docs/isobj0.mjs.html +1 -1
- package/docs/isp0int.mjs.html +1 -1
- package/docs/isp0num.mjs.html +1 -1
- package/docs/ispint.mjs.html +1 -1
- package/docs/ispm.mjs.html +1 -1
- package/docs/ispnum.mjs.html +1 -1
- package/docs/isstr.mjs.html +1 -1
- package/docs/isstr0.mjs.html +1 -1
- package/docs/istime.mjs.html +1 -1
- package/docs/istimeTZ.mjs.html +1 -1
- package/docs/istimems.mjs.html +1 -1
- package/docs/istimemsTZ.mjs.html +1 -1
- package/docs/isu16arr.mjs.html +1 -1
- package/docs/isu8arr.mjs.html +1 -1
- package/docs/isundefined.mjs.html +1 -1
- package/docs/j2o.mjs.html +1 -1
- package/docs/judge.mjs.html +1 -1
- package/docs/keysmat2ltdt.mjs.html +1 -1
- package/docs/ltdt2vrtsable.mjs.html +1 -1
- package/docs/ltdtDiff.mjs.html +1 -1
- package/docs/ltdtDiffByKey.mjs.html +1 -1
- package/docs/ltdtkeys2mat.mjs.html +1 -1
- package/docs/ltdtkeysheads2mat.mjs.html +1 -1
- package/docs/ltdtmapping.mjs.html +1 -1
- package/docs/ltdtmerge.mjs.html +1 -1
- package/docs/ltdtpick.mjs.html +1 -1
- package/docs/ltdtpull.mjs.html +1 -1
- package/docs/mat2ltdt.mjs.html +1 -1
- package/docs/matConcat.mjs.html +1 -1
- package/docs/matDiff.mjs.html +1 -1
- package/docs/matat.mjs.html +1 -1
- package/docs/now2str.mjs.html +1 -1
- package/docs/now2strp.mjs.html +1 -1
- package/docs/nowDay2str.mjs.html +1 -1
- package/docs/nowms2str.mjs.html +1 -1
- package/docs/nowms2strp.mjs.html +1 -1
- package/docs/o2j.mjs.html +1 -1
- package/docs/obj2b64.mjs.html +1 -1
- package/docs/obj2pb64.mjs.html +1 -1
- package/docs/obj2str.mjs.html +1 -1
- package/docs/obj2stru8arr.mjs.html +1 -1
- package/docs/obj2u8arr.mjs.html +1 -1
- package/docs/objSortBy.mjs.html +1 -1
- package/docs/objSortByKeys.mjs.html +1 -1
- package/docs/oo.mjs.html +1 -1
- package/docs/openLink.mjs.html +1 -1
- package/docs/pb642obj.mjs.html +1 -1
- package/docs/pmChain.mjs.html +1 -1
- package/docs/pmConvertResolve.mjs.html +1 -1
- package/docs/pmDebounce.mjs.html +1 -1
- package/docs/pmHook.mjs.html +1 -1
- package/docs/pmHookReject.mjs.html +1 -1
- package/docs/pmIni.mjs.html +1 -1
- package/docs/pmInvResolve.mjs.html +1 -1
- package/docs/pmKeyMutex.mjs.html +1 -1
- package/docs/pmMap.mjs.html +1 -1
- package/docs/pmQueue.mjs.html +1 -1
- package/docs/pmSeries.mjs.html +1 -1
- package/docs/pmThrottle.mjs.html +1 -1
- package/docs/pmTimeout.mjs.html +1 -1
- package/docs/preciseNum.mjs.html +1 -1
- package/docs/pseudoRandom.mjs.html +1 -1
- package/docs/pseudoRandomIntRange.mjs.html +1 -1
- package/docs/pseudoRandomIntsNdpRange.mjs.html +1 -1
- package/docs/pseudoRandomIntsRange.mjs.html +1 -1
- package/docs/pseudoRandomRange.mjs.html +1 -1
- package/docs/pseudoRandomsRange.mjs.html +1 -1
- package/docs/queue.mjs.html +1 -1
- package/docs/random.mjs.html +1 -1
- package/docs/randomIntRange.mjs.html +1 -1
- package/docs/randomIntsNdpRange.mjs.html +1 -1
- package/docs/randomIntsRange.mjs.html +1 -1
- package/docs/randomRange.mjs.html +1 -1
- package/docs/randomsRange.mjs.html +1 -1
- package/docs/rang.mjs.html +1 -1
- package/docs/rep.mjs.html +1 -1
- package/docs/repObj.mjs.html +1 -1
- package/docs/replace.mjs.html +1 -1
- package/docs/replaceObj.mjs.html +1 -1
- package/docs/replacePlus.mjs.html +1 -1
- package/docs/round.mjs.html +1 -1
- package/docs/secd.mjs.html +1 -1
- package/docs/sep.mjs.html +1 -1
- package/docs/sepInt.mjs.html +1 -1
- package/docs/setIntervalHp.mjs.html +1 -1
- package/docs/setTimeoutHp.mjs.html +1 -1
- package/docs/sind.mjs.html +1 -1
- package/docs/split.mjs.html +1 -1
- package/docs/str2aes.mjs.html +1 -1
- package/docs/str2b64.mjs.html +1 -1
- package/docs/str2hint.mjs.html +1 -1
- package/docs/str2md5.mjs.html +1 -1
- package/docs/str2obj.mjs.html +1 -1
- package/docs/str2sha.mjs.html +1 -1
- package/docs/str2sha512.mjs.html +1 -1
- package/docs/str2u8arr.mjs.html +1 -1
- package/docs/strCompare.mjs.html +1 -1
- package/docs/strCompareForVersion.mjs.html +1 -1
- package/docs/strDiff.mjs.html +1 -1
- package/docs/strDiffToHtml.mjs.html +1 -1
- package/docs/strFindFuzz.mjs.html +1 -1
- package/docs/strFindSimilar.mjs.html +1 -1
- package/docs/strTruncate.mjs.html +1 -1
- package/docs/strdelleft.mjs.html +1 -1
- package/docs/strdelright.mjs.html +1 -1
- package/docs/strleft.mjs.html +1 -1
- package/docs/strmid.mjs.html +1 -1
- package/docs/strright.mjs.html +1 -1
- package/docs/stru8arr2obj.mjs.html +1 -1
- package/docs/tand.mjs.html +1 -1
- package/docs/time2day.mjs.html +1 -1
- package/docs/time2hour.mjs.html +1 -1
- package/docs/time2min.mjs.html +1 -1
- package/docs/timeTZ2day.mjs.html +1 -1
- package/docs/timeTZ2expire.mjs.html +1 -1
- package/docs/timeTZ2hour.mjs.html +1 -1
- package/docs/timeTZ2min.mjs.html +1 -1
- package/docs/timeTZ2past.mjs.html +1 -1
- package/docs/timems2day.mjs.html +1 -1
- package/docs/timems2hour.mjs.html +1 -1
- package/docs/timems2min.mjs.html +1 -1
- package/docs/timems2time.mjs.html +1 -1
- package/docs/timemsTZ2day.mjs.html +1 -1
- package/docs/timemsTZ2expire.mjs.html +1 -1
- package/docs/timemsTZ2hour.mjs.html +1 -1
- package/docs/timemsTZ2min.mjs.html +1 -1
- package/docs/timemsTZ2past.mjs.html +1 -1
- package/docs/timemsTZ2time.mjs.html +1 -1
- package/docs/treeObj.mjs.html +1 -1
- package/docs/treeToFilepath.mjs.html +1 -1
- package/docs/trim.mjs.html +1 -1
- package/docs/u16arr2b64.mjs.html +1 -1
- package/docs/u16arr2u8arr.mjs.html +1 -1
- package/docs/u8arr2ab.mjs.html +1 -1
- package/docs/u8arr2b64.mjs.html +1 -1
- package/docs/u8arr2blob.mjs.html +1 -1
- package/docs/u8arr2bs.mjs.html +1 -1
- package/docs/u8arr2obj.mjs.html +1 -1
- package/docs/u8arr2str.mjs.html +1 -1
- package/docs/u8arr2u16arr.mjs.html +1 -1
- package/docs/urlParse.mjs.html +1 -1
- package/docs/verifyValue.mjs.html +1 -1
- package/docs/waitFun.mjs.html +1 -1
- package/docs/wsemi.html +5 -5
- package/package.json +1 -1
- package/src/alive.mjs +105 -4
- package/src/cache.mjs +2 -2
- package/src/cacheSt.mjs +1 -1
- package/src/evEmit.mjs +1 -1
- package/test/alive.test.mjs +201 -0
- package/test/cache.test.mjs +26 -0
- package/test/cacheSt.test.mjs +40 -0
- package/toolfp/dist/wsemip.umd.js +1 -1
- package/toolparfor/dist/wpf.umd.js +1 -1
- package/toolparfor/dist/wpf_pmSeries.umd.js +1 -1
package/test/alive.test.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import assert from 'assert'
|
|
2
|
+
import { spawnSync } from 'child_process'
|
|
2
3
|
import alive from '../src/alive.mjs'
|
|
3
4
|
|
|
4
5
|
|
|
@@ -65,4 +66,204 @@ describe(`alive`, function() {
|
|
|
65
66
|
assert.strict.deepStrictEqual(JSON.stringify(ms), r1)
|
|
66
67
|
})
|
|
67
68
|
|
|
69
|
+
function test2() {
|
|
70
|
+
return new Promise((resolve, reject) => {
|
|
71
|
+
let ms = []
|
|
72
|
+
|
|
73
|
+
let oAL = alive({ timeAlive: 1500 })
|
|
74
|
+
|
|
75
|
+
oAL.on('message', function({ eventName, key }) {
|
|
76
|
+
ms.push(eventName + '|' + key)
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
oAL.trigger('a', { data: 123 })
|
|
80
|
+
|
|
81
|
+
setTimeout(() => {
|
|
82
|
+
oAL.trigger('b', { data: '34.56' })
|
|
83
|
+
let r = oAL.clear() //b剛trigger尚未發出enter, 故只回傳a, 且b之enter不再發出
|
|
84
|
+
ms.push('clear|' + r.map((v) => v.key).join(','))
|
|
85
|
+
}, 500)
|
|
86
|
+
|
|
87
|
+
setTimeout(() => {
|
|
88
|
+
resolve(ms)
|
|
89
|
+
}, 2500)
|
|
90
|
+
|
|
91
|
+
})
|
|
92
|
+
}
|
|
93
|
+
let r2 = '["enter|a","clear|a"]'
|
|
94
|
+
it(`should return '${r2}' when run test2'`, async function() {
|
|
95
|
+
let ms = await test2()
|
|
96
|
+
assert.strict.deepStrictEqual(JSON.stringify(ms), r2)
|
|
97
|
+
})
|
|
98
|
+
|
|
99
|
+
describe(`key`, function() {
|
|
100
|
+
|
|
101
|
+
let sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms))
|
|
102
|
+
|
|
103
|
+
//trigger之key為任意非空字串, 每個key皆須於首次trigger時enter、逾時leave、存活期間列於get
|
|
104
|
+
//__proto__與Object原型之屬性名(constructor、toString等)亦同, 不得被誤判為已存在或改掉佇列之原型
|
|
105
|
+
let keys = ['__proto__', 'data', 'time', 'constructor', 'toString', 'hasOwnProperty', 'valueOf', 'isPrototypeOf', '__defineGetter__']
|
|
106
|
+
|
|
107
|
+
it(`should treat __proto__ and names on Object.prototype as ordinary keys`, async function() {
|
|
108
|
+
let ms = []
|
|
109
|
+
let o = alive({ timeAlive: 100, timeDetect: 20 })
|
|
110
|
+
o.on('message', (m) => ms.push(m.eventName + '|' + m.key))
|
|
111
|
+
for (let k of keys) {
|
|
112
|
+
o.trigger(k, { k })
|
|
113
|
+
}
|
|
114
|
+
await sleep(30)
|
|
115
|
+
assert.strict.deepStrictEqual(o.get(), keys.map((k) => ({ key: k, data: { k } })))
|
|
116
|
+
await sleep(300)
|
|
117
|
+
assert.strict.deepStrictEqual(ms, [...keys.map((k) => 'enter|' + k), ...keys.map((k) => 'leave|' + k)])
|
|
118
|
+
assert.strict.deepStrictEqual(o.get(), [])
|
|
119
|
+
})
|
|
120
|
+
|
|
121
|
+
it(`should return __proto__ and names on Object.prototype from clear`, async function() {
|
|
122
|
+
let o = alive({ timeAlive: 300 })
|
|
123
|
+
o.trigger('__proto__', 1)
|
|
124
|
+
o.trigger('constructor', 2)
|
|
125
|
+
await sleep(30)
|
|
126
|
+
assert.strict.deepStrictEqual(o.clear(), [{ key: '__proto__', data: 1 }, { key: 'constructor', data: 2 }])
|
|
127
|
+
})
|
|
128
|
+
|
|
129
|
+
})
|
|
130
|
+
|
|
131
|
+
describe(`clear`, function() {
|
|
132
|
+
|
|
133
|
+
let sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms))
|
|
134
|
+
|
|
135
|
+
let create = (opt) => {
|
|
136
|
+
let ms = []
|
|
137
|
+
let errs = []
|
|
138
|
+
let o = alive(opt)
|
|
139
|
+
o.on('error', (e) => errs.push(e))
|
|
140
|
+
o.on('message', (m) => ms.push(m.eventName + '|' + m.key))
|
|
141
|
+
return { o, ms, errs }
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
it(`should return entered units, emit nothing afterwards and get [] (two units entered then clear)`, async function() {
|
|
145
|
+
let { o, ms } = create({ timeAlive: 300 })
|
|
146
|
+
o.trigger('a', { x: 1 })
|
|
147
|
+
o.trigger('b', { x: 2 })
|
|
148
|
+
await sleep(30)
|
|
149
|
+
let r = o.clear()
|
|
150
|
+
assert.strict.deepStrictEqual(r, [{ key: 'a', data: { x: 1 } }, { key: 'b', data: { x: 2 } }])
|
|
151
|
+
await sleep(500) //逾timeAlive仍不得發leave
|
|
152
|
+
assert.strict.deepStrictEqual(ms, ['enter|a', 'enter|b'])
|
|
153
|
+
assert.strict.deepStrictEqual(o.get(), [])
|
|
154
|
+
})
|
|
155
|
+
|
|
156
|
+
it(`should return [] and cancel the enter when cleared right after trigger`, async function() {
|
|
157
|
+
let { o, ms } = create({ timeAlive: 300 })
|
|
158
|
+
o.trigger('a', 1)
|
|
159
|
+
let r = o.clear()
|
|
160
|
+
await sleep(400)
|
|
161
|
+
assert.strict.deepStrictEqual(r, [])
|
|
162
|
+
assert.strict.deepStrictEqual(ms, [])
|
|
163
|
+
})
|
|
164
|
+
|
|
165
|
+
it(`should return only units whose enter was emitted`, async function() {
|
|
166
|
+
let { o, ms } = create({ timeAlive: 300 })
|
|
167
|
+
o.trigger('a', 1)
|
|
168
|
+
await sleep(30)
|
|
169
|
+
o.trigger('b', 2)
|
|
170
|
+
let r = o.clear()
|
|
171
|
+
await sleep(400)
|
|
172
|
+
assert.strict.deepStrictEqual(r, [{ key: 'a', data: 1 }])
|
|
173
|
+
assert.strict.deepStrictEqual(ms, ['enter|a'])
|
|
174
|
+
})
|
|
175
|
+
|
|
176
|
+
it(`should not return a unit that left and was triggered again but not yet re-entered`, async function() {
|
|
177
|
+
let { o, ms } = create({ timeAlive: 100, timeDetect: 20 })
|
|
178
|
+
o.trigger('a', 1)
|
|
179
|
+
await sleep(300) //a已enter且已leave
|
|
180
|
+
o.trigger('a', 2)
|
|
181
|
+
let r = o.clear()
|
|
182
|
+
await sleep(100)
|
|
183
|
+
assert.strict.deepStrictEqual(r, [])
|
|
184
|
+
assert.strict.deepStrictEqual(ms, ['enter|a', 'leave|a'])
|
|
185
|
+
})
|
|
186
|
+
|
|
187
|
+
it(`should not throw and return [] when called repeatedly or before any trigger`, function() {
|
|
188
|
+
let o = alive()
|
|
189
|
+
assert.strict.deepStrictEqual(o.clear(), [])
|
|
190
|
+
assert.strict.deepStrictEqual(o.clear(), [])
|
|
191
|
+
})
|
|
192
|
+
|
|
193
|
+
it(`should ignore trigger after clear`, async function() {
|
|
194
|
+
let { o, ms } = create({ timeAlive: 300 })
|
|
195
|
+
o.trigger('a', 1)
|
|
196
|
+
await sleep(30)
|
|
197
|
+
o.clear()
|
|
198
|
+
o.trigger('b', 2)
|
|
199
|
+
o.trigger('a', 3)
|
|
200
|
+
await sleep(400)
|
|
201
|
+
assert.strict.deepStrictEqual(ms, ['enter|a'])
|
|
202
|
+
assert.strict.deepStrictEqual(o.get(), [])
|
|
203
|
+
assert.strict.deepStrictEqual(o.clear(), [])
|
|
204
|
+
})
|
|
205
|
+
|
|
206
|
+
it(`should return the unit being dispatched and stop pending enters when cleared in an enter listener`, async function() {
|
|
207
|
+
let { o, ms, errs } = create({ timeAlive: 300 })
|
|
208
|
+
let rc = null
|
|
209
|
+
o.on('message', (m) => {
|
|
210
|
+
if (m.key === 'a' && rc === null) {
|
|
211
|
+
rc = o.clear()
|
|
212
|
+
}
|
|
213
|
+
})
|
|
214
|
+
o.trigger('a', 1)
|
|
215
|
+
o.trigger('b', 2)
|
|
216
|
+
await sleep(400)
|
|
217
|
+
assert.strict.deepStrictEqual(rc, [{ key: 'a', data: 1 }])
|
|
218
|
+
assert.strict.deepStrictEqual(ms, ['enter|a'])
|
|
219
|
+
assert.strict.deepStrictEqual(errs, [])
|
|
220
|
+
})
|
|
221
|
+
|
|
222
|
+
it(`should stop the eviction round without throwing when cleared in a leave listener`, async function() {
|
|
223
|
+
//三單元同一輪逾時, 第一則leave中clear: 其餘二單元不再發leave且由clear回傳; 未防護時同輪下一單元會讀到已清空之佇列而拋錯
|
|
224
|
+
let { o, ms, errs } = create({ timeAlive: 100, timeDetect: 20 })
|
|
225
|
+
let rc = null
|
|
226
|
+
o.on('message', (m) => {
|
|
227
|
+
if (m.eventName === 'leave' && rc === null) {
|
|
228
|
+
rc = o.clear()
|
|
229
|
+
}
|
|
230
|
+
})
|
|
231
|
+
o.trigger('a', 1)
|
|
232
|
+
o.trigger('b', 2)
|
|
233
|
+
o.trigger('c', 3)
|
|
234
|
+
await sleep(400)
|
|
235
|
+
assert.strict.deepStrictEqual(ms, ['enter|a', 'enter|b', 'enter|c', 'leave|a'])
|
|
236
|
+
assert.strict.deepStrictEqual(rc, [{ key: 'b', data: 2 }, { key: 'c', data: 3 }])
|
|
237
|
+
assert.strict.deepStrictEqual(errs, [])
|
|
238
|
+
})
|
|
239
|
+
|
|
240
|
+
it(`should leave no active timer so the process exits at once (child process)`, function() {
|
|
241
|
+
//於呼叫clear之計時器回呼結束後(setImmediate)才查資源, 回呼內該計時器自身仍會列出
|
|
242
|
+
let url = new URL('../src/alive.mjs', import.meta.url).href
|
|
243
|
+
let code = `
|
|
244
|
+
import alive from '${url}'
|
|
245
|
+
let t0 = Date.now()
|
|
246
|
+
let o = alive()
|
|
247
|
+
o.trigger('a', 1)
|
|
248
|
+
o.trigger('b', 2)
|
|
249
|
+
setTimeout(() => {
|
|
250
|
+
let r = o.clear()
|
|
251
|
+
setImmediate(() => {
|
|
252
|
+
let res = process.getActiveResourcesInfo().filter((x) => x !== 'TTYWrap' && x !== 'Immediate')
|
|
253
|
+
process.on('exit', () => {
|
|
254
|
+
console.log(JSON.stringify({ r, res, ms: Date.now() - t0 }))
|
|
255
|
+
})
|
|
256
|
+
})
|
|
257
|
+
}, 100)
|
|
258
|
+
`
|
|
259
|
+
let p = spawnSync(process.execPath, ['--input-type=module', '-e', code], { encoding: 'utf8', timeout: 20000 })
|
|
260
|
+
assert.strict.deepStrictEqual(p.status, 0, p.stderr)
|
|
261
|
+
let o = JSON.parse(p.stdout.trim())
|
|
262
|
+
assert.strict.deepStrictEqual(o.r, [{ key: 'a', data: 1 }, { key: 'b', data: 2 }])
|
|
263
|
+
assert.strict.deepStrictEqual(o.res, [])
|
|
264
|
+
assert.strict.deepStrictEqual(o.ms < 2000, true, `exit after ${o.ms}ms`) //未clear時須逾timeAlive(預設10000)才結束
|
|
265
|
+
})
|
|
266
|
+
|
|
267
|
+
})
|
|
268
|
+
|
|
68
269
|
})
|
package/test/cache.test.mjs
CHANGED
|
@@ -706,4 +706,30 @@ describe(`cache`, function() {
|
|
|
706
706
|
assert.strict.deepStrictEqual(r, { defIsolated: true, getFalseSame: true, setFalseSame: true, overrideCloned: true, invalidUseSet: true, waitTrueIsolated: true, waitFalseSame: true, proxySame: true })
|
|
707
707
|
})
|
|
708
708
|
|
|
709
|
+
//key為任意字串, __proto__與Object原型之屬性名(constructor、toString等)亦為一般key: 未set視為無效key、不得寫到原型上之物件, set後可取回
|
|
710
|
+
it(`should treat __proto__ and names on Object.prototype as ordinary keys`, async function() {
|
|
711
|
+
let had = Object.prototype.hasOwnProperty.call(Object, 'value')
|
|
712
|
+
try {
|
|
713
|
+
let oc = cache()
|
|
714
|
+
for (let k of ['__proto__', 'constructor', 'toString', 'hasOwnProperty', 'valueOf']) {
|
|
715
|
+
assert.strict.deepStrictEqual(await oc.get(k), null, `get ${k} before set`)
|
|
716
|
+
}
|
|
717
|
+
oc.update('constructor', 5) //未set之key不得寫入, 一般物件時會寫到Object本身
|
|
718
|
+
oc.clear('constructor')
|
|
719
|
+
assert.strict.deepStrictEqual(Object.prototype.hasOwnProperty.call(Object, 'value'), had)
|
|
720
|
+
oc.set('constructor', { fun: async () => 1 })
|
|
721
|
+
oc.set('__proto__', { fun: async () => 2 })
|
|
722
|
+
assert.strict.deepStrictEqual(await oc.get('constructor'), 1)
|
|
723
|
+
assert.strict.deepStrictEqual(await oc.get('__proto__'), 2)
|
|
724
|
+
assert.strict.deepStrictEqual(await oc.get('needExec'), null) //set __proto__不得使未set之key被視為存在
|
|
725
|
+
oc.remove('constructor')
|
|
726
|
+
assert.strict.deepStrictEqual(await oc.get('constructor'), null)
|
|
727
|
+
}
|
|
728
|
+
finally {
|
|
729
|
+
if (!had) {
|
|
730
|
+
delete Object.value //修正前之版本會寫入Object.value, 測試後還原以免影響同檔其他測試
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
})
|
|
734
|
+
|
|
709
735
|
})
|
package/test/cacheSt.test.mjs
CHANGED
|
@@ -256,4 +256,44 @@ describe(`cacheSt`, function() {
|
|
|
256
256
|
assert.strict.deepStrictEqual(ms, ms9)
|
|
257
257
|
})
|
|
258
258
|
|
|
259
|
+
//key為任意字串, __proto__與Object原型之屬性名(constructor、toString等)亦為一般key: 未set不存在、set後可取回、不影響其他key
|
|
260
|
+
it(`should treat __proto__ and names on Object.prototype as ordinary keys`, async function() {
|
|
261
|
+
let cs = cacheSt({ timeDetect: 1000 })
|
|
262
|
+
try {
|
|
263
|
+
let names = ['__proto__', 'constructor', 'toString', 'hasOwnProperty', 'valueOf']
|
|
264
|
+
for (let k of names) {
|
|
265
|
+
assert.strict.deepStrictEqual(await cs.check(k), false, `check ${k} before set`)
|
|
266
|
+
assert.strict.deepStrictEqual(await cs.get(k), null, `get ${k} before set`)
|
|
267
|
+
}
|
|
268
|
+
assert.strict.deepStrictEqual(cs.checkWithSet('toString'), true)
|
|
269
|
+
assert.strict.deepStrictEqual(await cs.check('toString'), true)
|
|
270
|
+
await cs.set('__proto__', 'v')
|
|
271
|
+
assert.strict.deepStrictEqual(await cs.get('__proto__'), 'v')
|
|
272
|
+
assert.strict.deepStrictEqual(await cs.check('value'), false) //set __proto__不得使未set之key被視為存在
|
|
273
|
+
assert.strict.deepStrictEqual(await cs.check('time'), false)
|
|
274
|
+
await cs.set('constructor', 1)
|
|
275
|
+
assert.strict.deepStrictEqual(await cs.get('constructor'), 1)
|
|
276
|
+
await cs.del('constructor')
|
|
277
|
+
assert.strict.deepStrictEqual(await cs.check('constructor'), false)
|
|
278
|
+
await cs.del('__proto__')
|
|
279
|
+
assert.strict.deepStrictEqual(await cs.check('__proto__'), false)
|
|
280
|
+
}
|
|
281
|
+
finally {
|
|
282
|
+
cs.clear()
|
|
283
|
+
}
|
|
284
|
+
})
|
|
285
|
+
|
|
286
|
+
it(`should expire __proto__ like other keys`, async function() {
|
|
287
|
+
let cs = cacheSt({ timeExpire: 100, timeDetect: 50 })
|
|
288
|
+
try {
|
|
289
|
+
await cs.set('__proto__', 1)
|
|
290
|
+
assert.strict.deepStrictEqual(await cs.check('__proto__'), true)
|
|
291
|
+
await delay(300)
|
|
292
|
+
assert.strict.deepStrictEqual(await cs.check('__proto__'), false)
|
|
293
|
+
}
|
|
294
|
+
finally {
|
|
295
|
+
cs.clear()
|
|
296
|
+
}
|
|
297
|
+
})
|
|
298
|
+
|
|
259
299
|
})
|