@bbn/bbn 1.0.203 → 1.0.205
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/dist/$.d.ts +1 -2
- package/dist/$.js +3 -3
- package/dist/_.d.ts +1 -2
- package/dist/_.js +4 -4
- package/dist/bbn.js +1689 -1672
- package/dist/bbn.js.map +1 -1
- package/dist/db.d.ts +16 -9
- package/dist/db.js +5 -5
- package/dist/env.d.ts +2 -2
- package/dist/env.js +1 -2
- package/dist/fn/ajax/_addLoader.d.ts +1 -2
- package/dist/fn/ajax/_addLoader.js +4 -4
- package/dist/fn/ajax/_deleteLoader.d.ts +1 -2
- package/dist/fn/ajax/_deleteLoader.js +6 -6
- package/dist/fn/ajax/abort.d.ts +1 -2
- package/dist/fn/ajax/abort.js +4 -4
- package/dist/fn/ajax/abortURL.d.ts +1 -2
- package/dist/fn/ajax/abortURL.js +5 -5
- package/dist/fn/ajax/ajax.d.ts +1 -2
- package/dist/fn/ajax/ajax.js +12 -12
- package/dist/fn/ajax/callback.d.ts +1 -2
- package/dist/fn/ajax/callback.js +6 -6
- package/dist/fn/ajax/download.d.ts +1 -2
- package/dist/fn/ajax/download.js +9 -9
- package/dist/fn/ajax/downloadContent.d.ts +1 -2
- package/dist/fn/ajax/downloadContent.js +7 -7
- package/dist/fn/ajax/getLoader.d.ts +1 -2
- package/dist/fn/ajax/getLoader.js +4 -4
- package/dist/fn/ajax/getRequestId.d.ts +1 -2
- package/dist/fn/ajax/getRequestId.js +5 -5
- package/dist/fn/ajax/link.d.ts +1 -2
- package/dist/fn/ajax/link.js +11 -11
- package/dist/fn/ajax/post.d.ts +1 -2
- package/dist/fn/ajax/post.js +6 -6
- package/dist/fn/ajax/postOut.d.ts +1 -2
- package/dist/fn/ajax/postOut.js +6 -6
- package/dist/fn/ajax/setNavigationVars.d.ts +1 -2
- package/dist/fn/ajax/setNavigationVars.js +7 -7
- package/dist/fn/ajax/treatAjaxArguments.d.ts +1 -2
- package/dist/fn/ajax/treatAjaxArguments.js +7 -7
- package/dist/fn/ajax/upload.d.ts +1 -2
- package/dist/fn/ajax/upload.js +5 -5
- package/dist/fn/browser/copy.d.ts +1 -2
- package/dist/fn/browser/copy.js +5 -5
- package/dist/fn/browser/eraseCookie.d.ts +1 -2
- package/dist/fn/browser/eraseCookie.js +3 -3
- package/dist/fn/browser/error.d.ts +1 -2
- package/dist/fn/browser/error.js +4 -4
- package/dist/fn/browser/getBrowserName.d.ts +1 -2
- package/dist/fn/browser/getBrowserName.js +3 -3
- package/dist/fn/browser/getBrowserVersion.d.ts +1 -2
- package/dist/fn/browser/getBrowserVersion.js +3 -3
- package/dist/fn/browser/getCookie.d.ts +1 -2
- package/dist/fn/browser/getCookie.js +3 -3
- package/dist/fn/browser/getDeviceType.d.ts +1 -2
- package/dist/fn/browser/getDeviceType.js +3 -3
- package/dist/fn/browser/getEventData.d.ts +1 -2
- package/dist/fn/browser/getEventData.js +5 -5
- package/dist/fn/browser/happy.d.ts +1 -2
- package/dist/fn/browser/happy.js +4 -4
- package/dist/fn/browser/history.d.ts +1 -2
- package/dist/fn/browser/history.js +3 -3
- package/dist/fn/browser/info.d.ts +1 -2
- package/dist/fn/browser/info.js +4 -4
- package/dist/fn/browser/isActiveInterface.d.ts +1 -2
- package/dist/fn/browser/isActiveInterface.js +3 -3
- package/dist/fn/browser/isDesktopDevice.d.ts +1 -2
- package/dist/fn/browser/isDesktopDevice.js +4 -4
- package/dist/fn/browser/isFocused.d.ts +1 -2
- package/dist/fn/browser/isFocused.js +3 -3
- package/dist/fn/browser/isMobile.d.ts +1 -2
- package/dist/fn/browser/isMobile.js +5 -5
- package/dist/fn/browser/isMobileDevice.d.ts +1 -2
- package/dist/fn/browser/isMobileDevice.js +4 -4
- package/dist/fn/browser/isTabletDevice.d.ts +1 -2
- package/dist/fn/browser/isTabletDevice.js +4 -4
- package/dist/fn/browser/log.d.ts +1 -2
- package/dist/fn/browser/log.js +4 -4
- package/dist/fn/browser/replaceSelection.d.ts +1 -2
- package/dist/fn/browser/replaceSelection.js +3 -3
- package/dist/fn/browser/selectElementText.d.ts +1 -2
- package/dist/fn/browser/selectElementText.js +3 -3
- package/dist/fn/browser/setCookie.d.ts +1 -2
- package/dist/fn/browser/setCookie.js +3 -3
- package/dist/fn/browser/toggleFullScreen.d.ts +1 -2
- package/dist/fn/browser/toggleFullScreen.js +4 -4
- package/dist/fn/browser/warning.d.ts +1 -2
- package/dist/fn/browser/warning.js +4 -4
- package/dist/fn/convert/arrayBuffer2String.d.ts +1 -2
- package/dist/fn/convert/arrayBuffer2String.js +3 -3
- package/dist/fn/convert/canvasToImage.d.ts +1 -2
- package/dist/fn/convert/canvasToImage.js +3 -3
- package/dist/fn/convert/colorToHex.d.ts +1 -2
- package/dist/fn/convert/colorToHex.js +3 -3
- package/dist/fn/convert/fromXml.d.ts +1 -2
- package/dist/fn/convert/fromXml.js +3 -3
- package/dist/fn/convert/hex2rgb.d.ts +1 -2
- package/dist/fn/convert/hex2rgb.js +3 -3
- package/dist/fn/convert/imageToCanvas.d.ts +1 -2
- package/dist/fn/convert/imageToCanvas.js +3 -3
- package/dist/fn/convert/imgToBase64.d.ts +1 -2
- package/dist/fn/convert/imgToBase64.js +4 -4
- package/dist/fn/convert/rgb2hex.d.ts +1 -2
- package/dist/fn/convert/rgb2hex.js +3 -3
- package/dist/fn/convert/string2ArrayBuffer.d.ts +1 -2
- package/dist/fn/convert/string2ArrayBuffer.js +3 -3
- package/dist/fn/convert/toCSV.d.ts +1 -2
- package/dist/fn/convert/toCSV.js +6 -6
- package/dist/fn/datetime/calendar.d.ts +1 -2
- package/dist/fn/datetime/calendar.js +11 -9
- package/dist/fn/datetime/date.d.ts +1 -2
- package/dist/fn/datetime/date.js +6 -6
- package/dist/fn/datetime/dateSQL.d.ts +1 -2
- package/dist/fn/datetime/dateSQL.js +4 -4
- package/dist/fn/datetime/daysInMonth.d.ts +1 -2
- package/dist/fn/datetime/daysInMonth.js +4 -4
- package/dist/fn/datetime/fdate.d.ts +1 -2
- package/dist/fn/datetime/fdate.js +7 -7
- package/dist/fn/datetime/fdatetime.d.ts +1 -2
- package/dist/fn/datetime/fdatetime.js +6 -6
- package/dist/fn/datetime/formatDate.d.ts +1 -2
- package/dist/fn/datetime/formatDate.js +3 -3
- package/dist/fn/datetime/ftime.d.ts +1 -2
- package/dist/fn/datetime/ftime.js +6 -6
- package/dist/fn/datetime/getDay.d.ts +1 -2
- package/dist/fn/datetime/getDay.js +4 -4
- package/dist/fn/datetime/startChrono.d.ts +11 -0
- package/dist/fn/datetime/startChrono.js +23 -0
- package/dist/fn/datetime/stopChrono.d.ts +13 -0
- package/dist/fn/datetime/stopChrono.js +22 -0
- package/dist/fn/datetime/timestamp.d.ts +1 -2
- package/dist/fn/datetime/timestamp.js +3 -3
- package/dist/fn/default/defaultAjaxAbortFunction.d.ts +1 -2
- package/dist/fn/default/defaultAjaxAbortFunction.js +4 -4
- package/dist/fn/default/defaultAjaxErrorFunction.d.ts +1 -2
- package/dist/fn/default/defaultAjaxErrorFunction.js +4 -4
- package/dist/fn/default/defaultAlertFunction.d.ts +1 -2
- package/dist/fn/default/defaultAlertFunction.js +3 -3
- package/dist/fn/default/defaultConfirmFunction.d.ts +1 -2
- package/dist/fn/default/defaultConfirmFunction.js +4 -4
- package/dist/fn/default/defaultEndLoadingFunction.d.ts +1 -2
- package/dist/fn/default/defaultEndLoadingFunction.js +3 -3
- package/dist/fn/default/defaultErrorFunction.d.ts +1 -2
- package/dist/fn/default/defaultErrorFunction.js +4 -4
- package/dist/fn/default/defaultHistoryFunction.d.ts +1 -2
- package/dist/fn/default/defaultHistoryFunction.js +3 -3
- package/dist/fn/default/defaultLinkFunction.d.ts +1 -2
- package/dist/fn/default/defaultLinkFunction.js +3 -3
- package/dist/fn/default/defaultPostLinkFunction.d.ts +1 -2
- package/dist/fn/default/defaultPostLinkFunction.js +3 -3
- package/dist/fn/default/defaultPreLinkFunction.d.ts +1 -2
- package/dist/fn/default/defaultPreLinkFunction.js +4 -4
- package/dist/fn/default/defaultResizeFunction.d.ts +1 -2
- package/dist/fn/default/defaultResizeFunction.js +3 -3
- package/dist/fn/default/defaultStartLoadingFunction.d.ts +1 -1
- package/dist/fn/default/defaultStartLoadingFunction.js +3 -2
- package/dist/fn/form/addInputs.d.ts +1 -2
- package/dist/fn/form/addInputs.js +4 -4
- package/dist/fn/form/fieldValue.d.ts +1 -2
- package/dist/fn/form/fieldValue.js +3 -3
- package/dist/fn/form/formdata.d.ts +1 -2
- package/dist/fn/form/formdata.js +7 -7
- package/dist/fn/form/objectToFormData.d.ts +1 -2
- package/dist/fn/form/objectToFormData.js +8 -8
- package/dist/fn/form/submit.d.ts +1 -2
- package/dist/fn/form/submit.js +5 -5
- package/dist/fn/html/adjustHeight.d.ts +1 -2
- package/dist/fn/html/adjustHeight.js +5 -5
- package/dist/fn/html/adjustSize.d.ts +1 -2
- package/dist/fn/html/adjustSize.js +4 -4
- package/dist/fn/html/adjustWidth.d.ts +1 -2
- package/dist/fn/html/adjustWidth.js +5 -5
- package/dist/fn/html/getAllTags.d.ts +1 -2
- package/dist/fn/html/getAllTags.js +4 -4
- package/dist/fn/html/getAncestors.d.ts +1 -2
- package/dist/fn/html/getAncestors.js +3 -3
- package/dist/fn/html/getAttributes.d.ts +1 -2
- package/dist/fn/html/getAttributes.js +4 -4
- package/dist/fn/html/getHTMLOfSelection.d.ts +1 -2
- package/dist/fn/html/getHTMLOfSelection.js +4 -4
- package/dist/fn/html/getHtml.d.ts +1 -2
- package/dist/fn/html/getHtml.js +4 -4
- package/dist/fn/html/getPath.d.ts +1 -2
- package/dist/fn/html/getPath.js +4 -4
- package/dist/fn/html/getText.d.ts +1 -2
- package/dist/fn/html/getText.js +3 -3
- package/dist/fn/html/html2text.d.ts +1 -2
- package/dist/fn/html/html2text.js +3 -3
- package/dist/fn/html/isInViewport.d.ts +1 -2
- package/dist/fn/html/isInViewport.js +3 -3
- package/dist/fn/html/isInside.d.ts +1 -2
- package/dist/fn/html/isInside.js +6 -6
- package/dist/fn/html/makeReactive.d.ts +1 -2
- package/dist/fn/html/makeReactive.js +11 -11
- package/dist/fn/html/selector.d.ts +1 -2
- package/dist/fn/html/selector.js +3 -3
- package/dist/fn/init.d.ts +1 -2
- package/dist/fn/init.js +14 -14
- package/dist/fn/loop/each.d.ts +1 -2
- package/dist/fn/loop/each.js +6 -6
- package/dist/fn/loop/fori.d.ts +1 -2
- package/dist/fn/loop/fori.js +5 -5
- package/dist/fn/loop/forir.d.ts +1 -2
- package/dist/fn/loop/forir.js +5 -5
- package/dist/fn/loop/iterate.d.ts +1 -2
- package/dist/fn/loop/iterate.js +4 -4
- package/dist/fn/loop/riterate.d.ts +1 -2
- package/dist/fn/loop/riterate.js +4 -4
- package/dist/fn/misc/analyzeFunction.d.ts +1 -2
- package/dist/fn/misc/analyzeFunction.js +4 -4
- package/dist/fn/misc/getTimeoff.d.ts +1 -2
- package/dist/fn/misc/getTimeoff.js +3 -3
- package/dist/fn/misc/money.d.ts +1 -2
- package/dist/fn/misc/money.js +4 -4
- package/dist/fn/misc/percent.d.ts +1 -2
- package/dist/fn/misc/percent.js +3 -3
- package/dist/fn/misc/randomInt.d.ts +1 -2
- package/dist/fn/misc/randomInt.js +3 -3
- package/dist/fn/misc/roundDecimal.d.ts +1 -2
- package/dist/fn/misc/roundDecimal.js +3 -3
- package/dist/fn/misc/translate.d.ts +1 -2
- package/dist/fn/misc/translate.js +4 -4
- package/dist/fn/object/_compareValues.d.ts +1 -2
- package/dist/fn/object/_compareValues.js +7 -7
- package/dist/fn/object/arrayFromProp.d.ts +1 -2
- package/dist/fn/object/arrayFromProp.js +5 -5
- package/dist/fn/object/autoExtend.d.ts +1 -2
- package/dist/fn/object/autoExtend.js +4 -4
- package/dist/fn/object/checkProps.d.ts +1 -2
- package/dist/fn/object/checkProps.js +4 -4
- package/dist/fn/object/checkPropsDetails.d.ts +1 -2
- package/dist/fn/object/checkPropsDetails.js +7 -7
- package/dist/fn/object/checkPropsOrDie.d.ts +1 -2
- package/dist/fn/object/checkPropsOrDie.js +4 -4
- package/dist/fn/object/circularReplacer.d.ts +1 -2
- package/dist/fn/object/circularReplacer.js +5 -5
- package/dist/fn/object/clone.d.ts +1 -2
- package/dist/fn/object/clone.js +6 -6
- package/dist/fn/object/compare.d.ts +1 -2
- package/dist/fn/object/compare.js +8 -8
- package/dist/fn/object/compareConditions.d.ts +1 -2
- package/dist/fn/object/compareConditions.js +7 -7
- package/dist/fn/object/count.d.ts +1 -2
- package/dist/fn/object/count.js +4 -4
- package/dist/fn/object/createObject.d.ts +1 -2
- package/dist/fn/object/createObject.js +4 -4
- package/dist/fn/object/deepPath.d.ts +1 -2
- package/dist/fn/object/deepPath.js +6 -6
- package/dist/fn/object/deleteProp.d.ts +1 -2
- package/dist/fn/object/deleteProp.js +4 -4
- package/dist/fn/object/diffObj.d.ts +1 -2
- package/dist/fn/object/diffObj.js +9 -9
- package/dist/fn/object/extend.d.ts +1 -2
- package/dist/fn/object/extend.js +7 -7
- package/dist/fn/object/extendOut.d.ts +1 -2
- package/dist/fn/object/extendOut.js +4 -4
- package/dist/fn/object/filter.d.ts +1 -2
- package/dist/fn/object/filter.js +6 -6
- package/dist/fn/object/filterToConditions.d.ts +1 -1
- package/dist/fn/object/filterToConditions.js +6 -5
- package/dist/fn/object/findAll.d.ts +1 -2
- package/dist/fn/object/findAll.js +6 -6
- package/dist/fn/object/getField.d.ts +1 -2
- package/dist/fn/object/getField.js +4 -4
- package/dist/fn/object/getFieldValues.d.ts +1 -2
- package/dist/fn/object/getFieldValues.js +6 -6
- package/dist/fn/object/getProp.d.ts +1 -2
- package/dist/fn/object/getProp.js +4 -4
- package/dist/fn/object/getProperty.d.ts +1 -2
- package/dist/fn/object/getProperty.js +3 -3
- package/dist/fn/object/getRow.d.ts +1 -2
- package/dist/fn/object/getRow.js +4 -4
- package/dist/fn/object/map.d.ts +1 -2
- package/dist/fn/object/map.js +4 -4
- package/dist/fn/object/move.d.ts +1 -2
- package/dist/fn/object/move.js +3 -3
- package/dist/fn/object/multiorder.d.ts +1 -2
- package/dist/fn/object/multiorder.js +4 -4
- package/dist/fn/object/mutateArray.d.ts +1 -2
- package/dist/fn/object/mutateArray.js +6 -7
- package/dist/fn/object/numProperties.d.ts +1 -2
- package/dist/fn/object/numProperties.js +3 -3
- package/dist/fn/object/order.d.ts +1 -2
- package/dist/fn/object/order.js +4 -4
- package/dist/fn/object/pickValue.d.ts +1 -2
- package/dist/fn/object/pickValue.js +3 -3
- package/dist/fn/object/removeEmpty.d.ts +1 -2
- package/dist/fn/object/removeEmpty.js +6 -6
- package/dist/fn/object/removePrivateProp.d.ts +1 -2
- package/dist/fn/object/removePrivateProp.js +4 -4
- package/dist/fn/object/search.d.ts +1 -2
- package/dist/fn/object/search.js +8 -8
- package/dist/fn/object/setProp.d.ts +1 -2
- package/dist/fn/object/setProp.js +3 -3
- package/dist/fn/object/setProperty.d.ts +1 -2
- package/dist/fn/object/setProperty.js +4 -4
- package/dist/fn/object/shortenObj.d.ts +1 -2
- package/dist/fn/object/shortenObj.js +7 -7
- package/dist/fn/object/shuffle.d.ts +1 -2
- package/dist/fn/object/shuffle.js +3 -3
- package/dist/fn/object/sum.d.ts +1 -2
- package/dist/fn/object/sum.js +5 -5
- package/dist/fn/object/unique.d.ts +1 -2
- package/dist/fn/object/unique.js +3 -3
- package/dist/fn/string/baseName.d.ts +1 -2
- package/dist/fn/string/baseName.js +5 -5
- package/dist/fn/string/br2nl.d.ts +1 -2
- package/dist/fn/string/br2nl.js +4 -4
- package/dist/fn/string/camelToCss.d.ts +1 -2
- package/dist/fn/string/camelToCss.js +3 -3
- package/dist/fn/string/camelize.d.ts +1 -2
- package/dist/fn/string/camelize.js +3 -3
- package/dist/fn/string/correctCase.d.ts +1 -2
- package/dist/fn/string/correctCase.js +3 -3
- package/dist/fn/string/crc32.d.ts +1 -2
- package/dist/fn/string/crc32.js +3 -3
- package/dist/fn/string/dirName.d.ts +1 -2
- package/dist/fn/string/dirName.js +5 -5
- package/dist/fn/string/escapeDquotes.d.ts +1 -2
- package/dist/fn/string/escapeDquotes.js +4 -4
- package/dist/fn/string/escapeRegExp.d.ts +1 -2
- package/dist/fn/string/escapeRegExp.js +3 -3
- package/dist/fn/string/escapeSquotes.d.ts +1 -2
- package/dist/fn/string/escapeSquotes.js +4 -4
- package/dist/fn/string/escapeTicks.d.ts +1 -2
- package/dist/fn/string/escapeTicks.js +4 -4
- package/dist/fn/string/escapeUrl.d.ts +1 -2
- package/dist/fn/string/escapeUrl.js +7 -7
- package/dist/fn/string/fileExt.d.ts +1 -2
- package/dist/fn/string/fileExt.js +4 -4
- package/dist/fn/string/format.d.ts +1 -2
- package/dist/fn/string/format.js +4 -4
- package/dist/fn/string/formatBytes.d.ts +1 -2
- package/dist/fn/string/formatBytes.js +3 -3
- package/dist/fn/string/formatSize.d.ts +1 -2
- package/dist/fn/string/formatSize.js +5 -5
- package/dist/fn/string/hash.d.ts +1 -2
- package/dist/fn/string/hash.js +7 -7
- package/dist/fn/string/md5.d.ts +1 -2
- package/dist/fn/string/md5.js +3 -3
- package/dist/fn/string/nl2br.d.ts +1 -2
- package/dist/fn/string/nl2br.js +4 -4
- package/dist/fn/string/printf.d.ts +1 -2
- package/dist/fn/string/printf.js +3 -3
- package/dist/fn/string/quotes2html.d.ts +1 -2
- package/dist/fn/string/quotes2html.js +4 -4
- package/dist/fn/string/randomString.d.ts +1 -2
- package/dist/fn/string/randomString.js +4 -4
- package/dist/fn/string/removeAccents.d.ts +1 -2
- package/dist/fn/string/removeAccents.js +5 -5
- package/dist/fn/string/removeExtraSpaces.d.ts +1 -2
- package/dist/fn/string/removeExtraSpaces.js +3 -3
- package/dist/fn/string/removeHtmlComments.d.ts +1 -2
- package/dist/fn/string/removeHtmlComments.js +4 -4
- package/dist/fn/string/removeTrailingChars.d.ts +1 -2
- package/dist/fn/string/removeTrailingChars.js +4 -4
- package/dist/fn/string/repeat.d.ts +1 -2
- package/dist/fn/string/repeat.js +3 -3
- package/dist/fn/string/replaceAll.d.ts +1 -2
- package/dist/fn/string/replaceAll.js +5 -5
- package/dist/fn/string/sanitize.d.ts +1 -2
- package/dist/fn/string/sanitize.js +5 -5
- package/dist/fn/string/shorten.d.ts +1 -2
- package/dist/fn/string/shorten.js +5 -5
- package/dist/fn/string/simpleHash.d.ts +1 -2
- package/dist/fn/string/simpleHash.js +5 -5
- package/dist/fn/string/simpleHash1.d.ts +1 -2
- package/dist/fn/string/simpleHash1.js +3 -3
- package/dist/fn/string/simpleHash2.d.ts +1 -2
- package/dist/fn/string/simpleHash2.js +3 -3
- package/dist/fn/string/substr.d.ts +1 -2
- package/dist/fn/string/substr.js +6 -6
- package/dist/fn/string/trim.d.ts +1 -2
- package/dist/fn/string/trim.js +4 -4
- package/dist/fn/string/uniqString.d.ts +1 -2
- package/dist/fn/string/uniqString.js +6 -6
- package/dist/fn/style/addColors.d.ts +1 -2
- package/dist/fn/style/addColors.js +5 -5
- package/dist/fn/style/addStyle.d.ts +1 -2
- package/dist/fn/style/addStyle.js +5 -5
- package/dist/fn/style/animateCss.d.ts +1 -2
- package/dist/fn/style/animateCss.js +3 -3
- package/dist/fn/style/center.d.ts +1 -2
- package/dist/fn/style/center.js +3 -3
- package/dist/fn/style/cssExists.d.ts +1 -2
- package/dist/fn/style/cssExists.js +5 -5
- package/dist/fn/style/getCssVar.d.ts +1 -2
- package/dist/fn/style/getCssVar.js +3 -3
- package/dist/fn/style/getScrollBarSize.d.ts +1 -2
- package/dist/fn/style/getScrollBarSize.js +3 -3
- package/dist/fn/style/lightenDarkenHex.d.ts +1 -2
- package/dist/fn/style/lightenDarkenHex.js +3 -3
- package/dist/fn/style/outerHeight.d.ts +1 -2
- package/dist/fn/style/outerHeight.js +4 -4
- package/dist/fn/style/outerWidth.d.ts +1 -2
- package/dist/fn/style/outerWidth.js +4 -4
- package/dist/fn/style/resize.d.ts +1 -2
- package/dist/fn/style/resize.js +5 -5
- package/dist/fn/style/setCssVar.d.ts +1 -2
- package/dist/fn/style/setCssVar.js +3 -3
- package/dist/fn/type/checkType.d.ts +1 -2
- package/dist/fn/type/checkType.js +10 -10
- package/dist/fn/type/isArray.d.ts +1 -2
- package/dist/fn/type/isArray.js +3 -3
- package/dist/fn/type/isBlob.d.ts +1 -2
- package/dist/fn/type/isBlob.js +3 -3
- package/dist/fn/type/isBoolean.d.ts +1 -2
- package/dist/fn/type/isBoolean.js +3 -3
- package/dist/fn/type/isCanvas.d.ts +1 -2
- package/dist/fn/type/isCanvas.js +3 -3
- package/dist/fn/type/isColor.d.ts +1 -2
- package/dist/fn/type/isColor.js +4 -4
- package/dist/fn/type/isComment.d.ts +1 -2
- package/dist/fn/type/isComment.js +3 -3
- package/dist/fn/type/isCp.d.ts +1 -2
- package/dist/fn/type/isCp.js +4 -4
- package/dist/fn/type/isDate.d.ts +1 -2
- package/dist/fn/type/isDate.js +3 -3
- package/dist/fn/type/isDimension.d.ts +1 -2
- package/dist/fn/type/isDimension.js +4 -4
- package/dist/fn/type/isDom.d.ts +1 -2
- package/dist/fn/type/isDom.js +3 -3
- package/dist/fn/type/isEmail.d.ts +1 -2
- package/dist/fn/type/isEmail.js +4 -4
- package/dist/fn/type/isEmpty.d.ts +1 -2
- package/dist/fn/type/isEmpty.js +5 -5
- package/dist/fn/type/isEvent.d.ts +1 -2
- package/dist/fn/type/isEvent.js +3 -3
- package/dist/fn/type/isFunction.d.ts +1 -2
- package/dist/fn/type/isFunction.js +3 -3
- package/dist/fn/type/isHostname.d.ts +1 -2
- package/dist/fn/type/isHostname.js +5 -5
- package/dist/fn/type/isIP.d.ts +1 -2
- package/dist/fn/type/isIP.js +4 -4
- package/dist/fn/type/isInt.d.ts +1 -2
- package/dist/fn/type/isInt.js +3 -3
- package/dist/fn/type/isIterable.d.ts +1 -2
- package/dist/fn/type/isIterable.js +3 -3
- package/dist/fn/type/isNull.d.ts +1 -2
- package/dist/fn/type/isNull.js +3 -3
- package/dist/fn/type/isNumber.d.ts +1 -2
- package/dist/fn/type/isNumber.js +3 -3
- package/dist/fn/type/isObject.d.ts +1 -2
- package/dist/fn/type/isObject.js +3 -3
- package/dist/fn/type/isPercent.d.ts +1 -2
- package/dist/fn/type/isPercent.js +3 -3
- package/dist/fn/type/isPrimitive.d.ts +1 -2
- package/dist/fn/type/isPrimitive.js +3 -3
- package/dist/fn/type/isPromise.d.ts +1 -2
- package/dist/fn/type/isPromise.js +3 -3
- package/dist/fn/type/isPropSize.d.ts +1 -2
- package/dist/fn/type/isPropSize.js +4 -4
- package/dist/fn/type/isSQLDate.d.ts +1 -2
- package/dist/fn/type/isSQLDate.js +3 -3
- package/dist/fn/type/isSame.d.ts +1 -2
- package/dist/fn/type/isSame.js +6 -6
- package/dist/fn/type/isString.d.ts +1 -2
- package/dist/fn/type/isString.js +3 -3
- package/dist/fn/type/isSymbol.d.ts +1 -2
- package/dist/fn/type/isSymbol.js +3 -3
- package/dist/fn/type/isURL.d.ts +1 -2
- package/dist/fn/type/isURL.js +3 -3
- package/dist/fn/type/isValidDimension.d.ts +1 -2
- package/dist/fn/type/isValidDimension.js +5 -5
- package/dist/fn/type/isValidName.d.ts +1 -2
- package/dist/fn/type/isValidName.js +4 -4
- package/dist/fn/type/isValue.d.ts +1 -2
- package/dist/fn/type/isValue.js +4 -4
- package/dist/fn/type/isVue.d.ts +1 -2
- package/dist/fn/type/isVue.js +3 -3
- package/dist/fn.d.ts +462 -246
- package/dist/fn.js +231 -231
- package/dist/index.js +7 -7
- package/dist/lng.d.ts +2 -2
- package/dist/lng.js +1 -2
- package/dist/vars.d.ts +2 -2
- package/dist/vars.js +1 -2
- package/package.json +1 -1
- package/dist/fn/datetime/chrono.d.ts +0 -25
- package/dist/fn/datetime/chrono.js +0 -45
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import isDom from '../type/isDom.js';
|
|
2
|
+
import isCp from '../type/isCp.js';
|
|
3
3
|
/**
|
|
4
4
|
* Returns a function to give to JSON.stringify in order to avoid circular values.
|
|
5
5
|
*
|
|
6
6
|
* @returns Function
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
export default function circularReplacer() {
|
|
9
9
|
var visited = new WeakSet();
|
|
10
10
|
return function (key, value) {
|
|
11
11
|
if (typeof value === "object" && value !== null) {
|
|
@@ -33,5 +33,5 @@ var circularReplacer = function () {
|
|
|
33
33
|
}
|
|
34
34
|
return value;
|
|
35
35
|
};
|
|
36
|
-
}
|
|
37
|
-
|
|
36
|
+
}
|
|
37
|
+
;
|
package/dist/fn/object/clone.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import isArray from '../type/isArray.js';
|
|
2
|
+
import isObject from '../type/isObject.js';
|
|
3
|
+
import extend from './extend.js';
|
|
4
4
|
/**
|
|
5
5
|
* Creates and returns a perfect clone - but different - from the given object.
|
|
6
6
|
*
|
|
@@ -18,7 +18,7 @@ import { extend } from './extend.js';
|
|
|
18
18
|
* @param {Object} obj The source object
|
|
19
19
|
* @returns {Object} A new object
|
|
20
20
|
*/
|
|
21
|
-
|
|
21
|
+
export default function clone(obj) {
|
|
22
22
|
if (isArray(obj)) {
|
|
23
23
|
return obj.slice().map(function (a) {
|
|
24
24
|
return typeof a === "object" ? clone(a) : a;
|
|
@@ -29,5 +29,5 @@ var clone = function (obj) {
|
|
|
29
29
|
return extend(true, o, obj);
|
|
30
30
|
}
|
|
31
31
|
return obj;
|
|
32
|
-
}
|
|
33
|
-
|
|
32
|
+
}
|
|
33
|
+
;
|
|
@@ -49,5 +49,4 @@
|
|
|
49
49
|
* @param {String} operator
|
|
50
50
|
* @returns {Boolean} True if the values' comparison complies with the operator, false otherwise
|
|
51
51
|
*/
|
|
52
|
-
|
|
53
|
-
export { compare };
|
|
52
|
+
export default function compare(v1: any, v2: any, operator: any): boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import isEmpty from '../type/isEmpty.js';
|
|
2
|
+
import removeAccents from '../string/removeAccents.js';
|
|
3
|
+
import isNull from '../type/isNull.js';
|
|
4
|
+
import isObject from '../type/isObject.js';
|
|
5
|
+
import isSame from '../type/isSame.js';
|
|
6
6
|
/**
|
|
7
7
|
* Performs a comparison between two values based on the given operator and returns a boolean.
|
|
8
8
|
*
|
|
@@ -54,7 +54,7 @@ import { isSame } from '../type/isSame.js';
|
|
|
54
54
|
* @param {String} operator
|
|
55
55
|
* @returns {Boolean} True if the values' comparison complies with the operator, false otherwise
|
|
56
56
|
*/
|
|
57
|
-
|
|
57
|
+
export default function compare(v1, v2, operator) {
|
|
58
58
|
switch (operator) {
|
|
59
59
|
case '===':
|
|
60
60
|
case '=':
|
|
@@ -146,5 +146,5 @@ var compare = function (v1, v2, operator) {
|
|
|
146
146
|
default:
|
|
147
147
|
return v1 == v2;
|
|
148
148
|
}
|
|
149
|
-
}
|
|
150
|
-
|
|
149
|
+
}
|
|
150
|
+
;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import isArray from '../type/isArray.js';
|
|
2
|
+
import each from '../loop/each.js';
|
|
3
|
+
import compare from './compare.js';
|
|
4
|
+
import getProperty from './getProperty.js';
|
|
5
5
|
/**
|
|
6
6
|
* Checks whether the given data object complies or not with the given filter.
|
|
7
7
|
*
|
|
@@ -46,7 +46,7 @@ import { getProperty } from './getProperty.js';
|
|
|
46
46
|
* @param {Object} filter
|
|
47
47
|
* @returns {Boolean}
|
|
48
48
|
*/
|
|
49
|
-
|
|
49
|
+
export default function compareConditions(data, filter) {
|
|
50
50
|
if (!filter.conditions || !filter.logic || !isArray(filter.conditions)) {
|
|
51
51
|
throw new Error("Error in compareConditions: the filter should an abject with conditions and logic properties and conditions should be an array of objects");
|
|
52
52
|
}
|
|
@@ -82,5 +82,5 @@ var compareConditions = function (data, filter) {
|
|
|
82
82
|
}
|
|
83
83
|
});
|
|
84
84
|
return ok;
|
|
85
|
-
}
|
|
86
|
-
|
|
85
|
+
}
|
|
86
|
+
;
|
|
@@ -52,5 +52,4 @@
|
|
|
52
52
|
* @param {String} operator The operator to use for comparison with the value as used in bbn.fn.compare
|
|
53
53
|
* @returns {Number} The number of items
|
|
54
54
|
*/
|
|
55
|
-
|
|
56
|
-
export { count };
|
|
55
|
+
export default function count(arr: any[], prop: object | string, val?: any, operator?: string): number;
|
package/dist/fn/object/count.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import filter from './filter.js';
|
|
2
2
|
/**
|
|
3
3
|
* Counts the number of objects matching the given filter in the given array.
|
|
4
4
|
*
|
|
@@ -53,9 +53,9 @@ import { filter } from './filter.js';
|
|
|
53
53
|
* @param {String} operator The operator to use for comparison with the value as used in bbn.fn.compare
|
|
54
54
|
* @returns {Number} The number of items
|
|
55
55
|
*/
|
|
56
|
-
|
|
56
|
+
export default function count(arr, prop, val, operator) {
|
|
57
57
|
if (val === void 0) { val = null; }
|
|
58
58
|
if (operator === void 0) { operator = '='; }
|
|
59
59
|
return filter(arr, prop, val, operator).length || 0;
|
|
60
|
-
}
|
|
61
|
-
|
|
60
|
+
}
|
|
61
|
+
;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { createObject };
|
|
1
|
+
export default function createObject(...args: any[]): any;
|
|
@@ -7,8 +7,8 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
7
7
|
}
|
|
8
8
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
9
9
|
};
|
|
10
|
-
import
|
|
11
|
-
|
|
10
|
+
import extend from './extend.js';
|
|
11
|
+
export default function createObject() {
|
|
12
12
|
var args = [];
|
|
13
13
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
14
14
|
args[_i] = arguments[_i];
|
|
@@ -18,5 +18,5 @@ var createObject = function () {
|
|
|
18
18
|
extend.apply(void 0, __spreadArray([obj], args, false));
|
|
19
19
|
}
|
|
20
20
|
return obj;
|
|
21
|
-
}
|
|
22
|
-
|
|
21
|
+
}
|
|
22
|
+
;
|
|
@@ -53,5 +53,4 @@
|
|
|
53
53
|
* @param {String} operator The operator to use for comparison with the value as used in bbn.fn.compare
|
|
54
54
|
* @returns {Number} The number of items
|
|
55
55
|
*/
|
|
56
|
-
|
|
57
|
-
export { deepPath };
|
|
56
|
+
export default function deepPath(arr: any[], filter: object, deepProperty: string, res?: any[]): false | any[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import search from './search.js';
|
|
2
|
+
import each from '../loop/each.js';
|
|
3
|
+
import isArray from '../type/isArray.js';
|
|
4
4
|
/**
|
|
5
5
|
* Retrieves all elements of a hierarchical array corresponding to the filter.
|
|
6
6
|
*
|
|
@@ -56,7 +56,7 @@ import { isArray } from '../type/isArray.js';
|
|
|
56
56
|
* @param {String} operator The operator to use for comparison with the value as used in bbn.fn.compare
|
|
57
57
|
* @returns {Number} The number of items
|
|
58
58
|
*/
|
|
59
|
-
|
|
59
|
+
export default function deepPath(arr, filter, deepProperty, res) {
|
|
60
60
|
if (res === void 0) { res = []; }
|
|
61
61
|
var idx;
|
|
62
62
|
var start = 0;
|
|
@@ -75,5 +75,5 @@ var deepPath = function (arr, filter, deepProperty, res) {
|
|
|
75
75
|
}
|
|
76
76
|
});
|
|
77
77
|
return false;
|
|
78
|
-
}
|
|
79
|
-
|
|
78
|
+
}
|
|
79
|
+
;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import checkType from '../type/checkType.js';
|
|
2
2
|
/**
|
|
3
3
|
* Gets the given property from the given object
|
|
4
4
|
* @param {Object} obj
|
|
5
5
|
* @param {String} prop
|
|
6
6
|
* @returns
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
export default function deleteProp(obj, prop) {
|
|
9
9
|
checkType(obj, "object", bbn._("The obj must be an object in setProp"));
|
|
10
10
|
checkType(prop, "string", bbn._("The prop must be a string in setProp"));
|
|
11
11
|
delete obj[prop];
|
|
12
|
-
}
|
|
13
|
-
|
|
12
|
+
}
|
|
13
|
+
;
|
|
@@ -75,5 +75,4 @@
|
|
|
75
75
|
* @param {Boolean} notRoot
|
|
76
76
|
* @returns {Object}
|
|
77
77
|
*/
|
|
78
|
-
|
|
79
|
-
export { diffObj };
|
|
78
|
+
export default function diffObj(obj1: object, obj2: object, unchanged?: boolean, notRoot?: boolean): any;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import isDate from '../type/isDate.js';
|
|
2
|
+
import createObject from './createObject.js';
|
|
3
|
+
import isFunction from '../type/isFunction.js';
|
|
4
|
+
import isValue from '../type/isValue.js';
|
|
5
|
+
import isDom from '../type/isDom.js';
|
|
6
|
+
import numProperties from './numProperties.js';
|
|
7
7
|
var diffObjProcessed = [];
|
|
8
8
|
/**
|
|
9
9
|
* Returns an object describing the differences for transforming the first given object into the second.
|
|
@@ -82,7 +82,7 @@ var diffObjProcessed = [];
|
|
|
82
82
|
* @param {Boolean} notRoot
|
|
83
83
|
* @returns {Object}
|
|
84
84
|
*/
|
|
85
|
-
|
|
85
|
+
export default function diffObj(obj1, obj2, unchanged, notRoot) {
|
|
86
86
|
if (unchanged === void 0) { unchanged = false; }
|
|
87
87
|
if (notRoot === void 0) { notRoot = false; }
|
|
88
88
|
if (!notRoot) {
|
|
@@ -166,5 +166,5 @@ var diffObj = function (obj1, obj2, unchanged, notRoot) {
|
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
return !notRoot || unchanged || numProperties(diff) ? diff : false;
|
|
169
|
-
}
|
|
170
|
-
|
|
169
|
+
}
|
|
170
|
+
;
|
|
@@ -83,5 +83,4 @@
|
|
|
83
83
|
* @memberof bbn.fn
|
|
84
84
|
* @returns {Object} The first object argument, merged with the other objects given
|
|
85
85
|
*/
|
|
86
|
-
|
|
87
|
-
export { extend };
|
|
86
|
+
export default function extend(...originalArgs: (boolean | object)[]): any;
|
package/dist/fn/object/extend.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import iterate from '../loop/iterate.js';
|
|
2
|
+
import isArray from '../type/isArray.js';
|
|
3
|
+
import each from '../loop/each.js';
|
|
4
|
+
import isObject from '../type/isObject.js';
|
|
5
5
|
/**
|
|
6
6
|
* Merges the contents of two or more objects together into the first object.
|
|
7
7
|
*
|
|
@@ -87,7 +87,7 @@ import { isObject } from '../type/isObject.js';
|
|
|
87
87
|
* @memberof bbn.fn
|
|
88
88
|
* @returns {Object} The first object argument, merged with the other objects given
|
|
89
89
|
*/
|
|
90
|
-
|
|
90
|
+
export default function extend() {
|
|
91
91
|
var originalArgs = [];
|
|
92
92
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
93
93
|
originalArgs[_i] = arguments[_i];
|
|
@@ -158,5 +158,5 @@ var extend = function () {
|
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
return out;
|
|
161
|
-
}
|
|
162
|
-
|
|
161
|
+
}
|
|
162
|
+
;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import isObject from '../type/isObject.js';
|
|
2
2
|
/**
|
|
3
3
|
* Returns a new object made of the properties from all the given objects.
|
|
4
4
|
*
|
|
@@ -15,7 +15,7 @@ import { isObject } from '../type/isObject.js';
|
|
|
15
15
|
* @memberof bbn.fn
|
|
16
16
|
* @returns {Object}
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
export default function extendOut() {
|
|
19
19
|
var args = [];
|
|
20
20
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
21
21
|
args[_i] = arguments[_i];
|
|
@@ -41,5 +41,5 @@ var extendOut = function () {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
return r;
|
|
44
|
-
}
|
|
45
|
-
|
|
44
|
+
}
|
|
45
|
+
;
|
|
@@ -46,5 +46,4 @@ import { Filter } from './filterToConditions.js';
|
|
|
46
46
|
* @param {String} operator The operator to use for comparison with the value as used in bbn.fn.compare
|
|
47
47
|
* @returns {Array} A new filtered array
|
|
48
48
|
*/
|
|
49
|
-
|
|
50
|
-
export { filter };
|
|
49
|
+
export default function filter(arr: any[], prop: Filter | object | string | ((a: any, i: string | number | symbol) => boolean), val?: any, operator?: string): any[];
|
package/dist/fn/object/filter.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import isArray from '../type/isArray.js';
|
|
2
|
+
import each from '../loop/each.js';
|
|
3
3
|
import { filterToConditions } from './filterToConditions.js';
|
|
4
|
-
import
|
|
4
|
+
import compareConditions from './compareConditions.js';
|
|
5
5
|
/**
|
|
6
6
|
* Returns a new array with only the data matching the given filter.
|
|
7
7
|
*
|
|
@@ -49,7 +49,7 @@ import { compareConditions } from './compareConditions.js';
|
|
|
49
49
|
* @param {String} operator The operator to use for comparison with the value as used in bbn.fn.compare
|
|
50
50
|
* @returns {Array} A new filtered array
|
|
51
51
|
*/
|
|
52
|
-
|
|
52
|
+
export default function filter(arr, prop, val, operator) {
|
|
53
53
|
if (val === void 0) { val = null; }
|
|
54
54
|
if (operator === void 0) { operator = '='; }
|
|
55
55
|
if (!isArray(arr)) {
|
|
@@ -92,5 +92,5 @@ var filter = function (arr, prop, val, operator) {
|
|
|
92
92
|
}
|
|
93
93
|
return res;
|
|
94
94
|
}
|
|
95
|
-
}
|
|
96
|
-
|
|
95
|
+
}
|
|
96
|
+
;
|
|
@@ -44,5 +44,5 @@ interface Filter {
|
|
|
44
44
|
* @param {String} operator
|
|
45
45
|
* @returns {Object}
|
|
46
46
|
*/
|
|
47
|
-
|
|
47
|
+
export default function filterToConditions(filter: any, operator?: string): Filter;
|
|
48
48
|
export { Filter, filterToConditions };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import isObject from '../type/isObject.js';
|
|
2
|
+
import isArray from '../type/isArray.js';
|
|
3
|
+
import iterate from '../loop/iterate.js';
|
|
4
4
|
/**
|
|
5
5
|
* Converts the given object 'filter' to a valid format of condition.
|
|
6
6
|
*
|
|
@@ -38,7 +38,7 @@ import { iterate } from '../loop/iterate.js';
|
|
|
38
38
|
* @param {String} operator
|
|
39
39
|
* @returns {Object}
|
|
40
40
|
*/
|
|
41
|
-
|
|
41
|
+
export default function filterToConditions(filter, operator) {
|
|
42
42
|
if (operator === void 0) { operator = "="; }
|
|
43
43
|
if (!isObject(filter)) {
|
|
44
44
|
throw new Error("Error in filterToCondition: filter must be an object");
|
|
@@ -65,5 +65,6 @@ var filterToConditions = function (filter, operator) {
|
|
|
65
65
|
filter.logic = "AND";
|
|
66
66
|
}
|
|
67
67
|
return filter;
|
|
68
|
-
}
|
|
68
|
+
}
|
|
69
|
+
;
|
|
69
70
|
export { filterToConditions };
|
|
@@ -53,5 +53,4 @@
|
|
|
53
53
|
* @param {String} operator The operator to use for comparison with the value as used in bbn.fn.compare
|
|
54
54
|
* @returns {Number} The number of items
|
|
55
55
|
*/
|
|
56
|
-
|
|
57
|
-
export { findAll };
|
|
56
|
+
export default function findAll(arr: any, filter: any, deepProperty: any, res?: any[]): any[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import search from './search.js';
|
|
2
|
+
import each from '../loop/each.js';
|
|
3
|
+
import isArray from '../type/isArray.js';
|
|
4
4
|
/**
|
|
5
5
|
* Retrieves all elements of a hierarchical array corresponding to the filter.
|
|
6
6
|
*
|
|
@@ -56,7 +56,7 @@ import { isArray } from '../type/isArray.js';
|
|
|
56
56
|
* @param {String} operator The operator to use for comparison with the value as used in bbn.fn.compare
|
|
57
57
|
* @returns {Number} The number of items
|
|
58
58
|
*/
|
|
59
|
-
|
|
59
|
+
export default function findAll(arr, filter, deepProperty, res) {
|
|
60
60
|
if (res === void 0) { res = []; }
|
|
61
61
|
var idx;
|
|
62
62
|
var start = 0;
|
|
@@ -70,5 +70,5 @@ var findAll = function (arr, filter, deepProperty, res) {
|
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
72
|
return res;
|
|
73
|
-
}
|
|
74
|
-
|
|
73
|
+
}
|
|
74
|
+
;
|
|
@@ -26,5 +26,4 @@
|
|
|
26
26
|
* @param {String} operator The operator to use for comparison with the value as used in bbn.fn.compare
|
|
27
27
|
* @returns {*}
|
|
28
28
|
*/
|
|
29
|
-
|
|
30
|
-
export { getField };
|
|
29
|
+
export default function getField(arr: any[], field: string, prop?: object | string, val?: any, operator?: string): any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import getRow from './getRow.js';
|
|
2
2
|
/**
|
|
3
3
|
* Returns the value of the given field (property) from the first object matching the given filter in an array of objects.
|
|
4
4
|
*
|
|
@@ -27,7 +27,7 @@ import { getRow } from './getRow.js';
|
|
|
27
27
|
* @param {String} operator The operator to use for comparison with the value as used in bbn.fn.compare
|
|
28
28
|
* @returns {*}
|
|
29
29
|
*/
|
|
30
|
-
|
|
30
|
+
export default function getField(arr, field, prop, val, operator) {
|
|
31
31
|
if (prop === void 0) { prop = ''; }
|
|
32
32
|
if (val === void 0) { val = null; }
|
|
33
33
|
if (operator === void 0) { operator = '='; }
|
|
@@ -36,5 +36,5 @@ var getField = function (arr, field, prop, val, operator) {
|
|
|
36
36
|
return r[field];
|
|
37
37
|
}
|
|
38
38
|
return undefined;
|
|
39
|
-
}
|
|
40
|
-
|
|
39
|
+
}
|
|
40
|
+
;
|
|
@@ -26,5 +26,4 @@
|
|
|
26
26
|
* @param {String} operator The operator to use for comparison with the value as used in bbn.fn.compare
|
|
27
27
|
* @returns {*}
|
|
28
28
|
*/
|
|
29
|
-
|
|
30
|
-
export { getFieldValues };
|
|
29
|
+
export default function getFieldValues(arr: object[], field: string, prop: any, val: any, operator: any): any[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import checkType from '../type/checkType.js';
|
|
2
|
+
import filter from './filter.js';
|
|
3
|
+
import each from '../loop/each.js';
|
|
4
4
|
/**
|
|
5
5
|
* Returns all the unique values of the given field (property) from the first object matching the given filter in an array.
|
|
6
6
|
*
|
|
@@ -29,7 +29,7 @@ import { each } from '../loop/each.js';
|
|
|
29
29
|
* @param {String} operator The operator to use for comparison with the value as used in bbn.fn.compare
|
|
30
30
|
* @returns {*}
|
|
31
31
|
*/
|
|
32
|
-
|
|
32
|
+
export default function getFieldValues(arr, field, prop, val, operator) {
|
|
33
33
|
checkType(field, 'string');
|
|
34
34
|
if (prop) {
|
|
35
35
|
arr = filter(arr, prop, val, operator);
|
|
@@ -37,5 +37,5 @@ var getFieldValues = function (arr, field, prop, val, operator) {
|
|
|
37
37
|
var res = [];
|
|
38
38
|
each(arr, function (a) { return (res.indexOf(a[field]) === -1 ? res.push(a[field]) : null); });
|
|
39
39
|
return res;
|
|
40
|
-
}
|
|
41
|
-
|
|
40
|
+
}
|
|
41
|
+
;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import checkType from '../type/checkType.js';
|
|
2
2
|
/**
|
|
3
3
|
* Gets the given property from the given object
|
|
4
4
|
* @param {Object} obj
|
|
5
5
|
* @param {String} prop
|
|
6
6
|
* @returns
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
export default function getProp(obj, prop) {
|
|
9
9
|
checkType(obj, "object", bbn._("The obj must be an object in setProp"));
|
|
10
10
|
checkType(prop, "string", bbn._("The prop must be a string in setProp"));
|
|
11
11
|
return obj[prop];
|
|
12
|
-
}
|
|
13
|
-
|
|
12
|
+
}
|
|
13
|
+
;
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
* @param {String} props
|
|
27
27
|
* @returns {*} The property's value or undefined
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
export default function getProperty(obj) {
|
|
30
30
|
var props = [];
|
|
31
31
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
32
32
|
props[_i - 1] = arguments[_i];
|
|
@@ -43,5 +43,5 @@ var getProperty = function (obj) {
|
|
|
43
43
|
return undefined;
|
|
44
44
|
}, obj);
|
|
45
45
|
}
|
|
46
|
-
}
|
|
47
|
-
|
|
46
|
+
}
|
|
47
|
+
;
|
|
@@ -38,5 +38,4 @@
|
|
|
38
38
|
* @param {String} operator The operator to use for comparison with the value as used in bbn.fn.compare
|
|
39
39
|
* @returns {Object|Boolean} The item if found, false otherwise
|
|
40
40
|
*/
|
|
41
|
-
|
|
42
|
-
export { getRow };
|
|
41
|
+
export default function getRow(arr: any[], prop: object | string, val?: any, operator?: string): any | false;
|
package/dist/fn/object/getRow.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import search from './search.js';
|
|
2
2
|
/**
|
|
3
3
|
* Returns the first object matching the given filter in an array of objects.
|
|
4
4
|
*
|
|
@@ -39,7 +39,7 @@ import { search } from './search.js';
|
|
|
39
39
|
* @param {String} operator The operator to use for comparison with the value as used in bbn.fn.compare
|
|
40
40
|
* @returns {Object|Boolean} The item if found, false otherwise
|
|
41
41
|
*/
|
|
42
|
-
|
|
42
|
+
export default function getRow(arr, prop, val, operator) {
|
|
43
43
|
if (val === void 0) { val = null; }
|
|
44
44
|
if (operator === void 0) { operator = '='; }
|
|
45
45
|
var idx = search(arr, prop, val, operator);
|
|
@@ -47,5 +47,5 @@ var getRow = function (arr, prop, val, operator) {
|
|
|
47
47
|
return arr[idx];
|
|
48
48
|
}
|
|
49
49
|
return false;
|
|
50
|
-
}
|
|
51
|
-
|
|
50
|
+
}
|
|
51
|
+
;
|
package/dist/fn/object/map.d.ts
CHANGED