@bbn/bbn 1.0.124 → 1.0.126
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 +0 -0
- package/dist/$.js +0 -0
- package/dist/_.d.ts +0 -0
- package/dist/_.js +0 -0
- package/dist/db.d.ts +0 -0
- package/dist/db.js +0 -0
- package/dist/env.d.ts +0 -0
- package/dist/env.js +0 -0
- package/dist/fn/ajax/_addLoader.d.ts +0 -0
- package/dist/fn/ajax/_addLoader.js +0 -0
- package/dist/fn/ajax/_deleteLoader.d.ts +0 -0
- package/dist/fn/ajax/_deleteLoader.js +0 -0
- package/dist/fn/ajax/abort.d.ts +0 -0
- package/dist/fn/ajax/abort.js +0 -0
- package/dist/fn/ajax/abortURL.d.ts +0 -0
- package/dist/fn/ajax/abortURL.js +0 -0
- package/dist/fn/ajax/ajax.d.ts +0 -0
- package/dist/fn/ajax/ajax.js +0 -0
- package/dist/fn/ajax/callback.d.ts +0 -0
- package/dist/fn/ajax/callback.js +0 -0
- package/dist/fn/ajax/download.d.ts +0 -0
- package/dist/fn/ajax/download.js +0 -0
- package/dist/fn/ajax/downloadContent.d.ts +0 -0
- package/dist/fn/ajax/downloadContent.js +0 -0
- package/dist/fn/ajax/getLoader.d.ts +0 -0
- package/dist/fn/ajax/getLoader.js +0 -0
- package/dist/fn/ajax/getRequestId.d.ts +0 -0
- package/dist/fn/ajax/getRequestId.js +0 -0
- package/dist/fn/ajax/link.d.ts +0 -0
- package/dist/fn/ajax/link.js +0 -0
- package/dist/fn/ajax/post.d.ts +0 -0
- package/dist/fn/ajax/post.js +0 -0
- package/dist/fn/ajax/postOut.d.ts +0 -0
- package/dist/fn/ajax/postOut.js +0 -0
- package/dist/fn/ajax/setNavigationVars.d.ts +0 -0
- package/dist/fn/ajax/setNavigationVars.js +0 -0
- package/dist/fn/ajax/treatAjaxArguments.d.ts +0 -0
- package/dist/fn/ajax/treatAjaxArguments.js +0 -0
- package/dist/fn/ajax/upload.d.ts +0 -0
- package/dist/fn/ajax/upload.js +0 -0
- package/dist/fn/browser/copy.d.ts +0 -0
- package/dist/fn/browser/copy.js +0 -0
- package/dist/fn/browser/eraseCookie.d.ts +0 -0
- package/dist/fn/browser/eraseCookie.js +0 -0
- package/dist/fn/browser/error.d.ts +0 -0
- package/dist/fn/browser/error.js +0 -0
- package/dist/fn/browser/getBrowserName.d.ts +0 -0
- package/dist/fn/browser/getBrowserName.js +0 -0
- package/dist/fn/browser/getBrowserVersion.d.ts +0 -0
- package/dist/fn/browser/getBrowserVersion.js +0 -0
- package/dist/fn/browser/getCookie.d.ts +0 -0
- package/dist/fn/browser/getCookie.js +0 -0
- package/dist/fn/browser/getDeviceType.d.ts +0 -0
- package/dist/fn/browser/getDeviceType.js +0 -0
- package/dist/fn/browser/getEventData.d.ts +0 -0
- package/dist/fn/browser/getEventData.js +0 -0
- package/dist/fn/browser/happy.d.ts +0 -0
- package/dist/fn/browser/happy.js +0 -0
- package/dist/fn/browser/history.d.ts +0 -0
- package/dist/fn/browser/history.js +0 -0
- package/dist/fn/browser/info.d.ts +0 -0
- package/dist/fn/browser/info.js +0 -0
- package/dist/fn/browser/isActiveInterface.d.ts +0 -0
- package/dist/fn/browser/isActiveInterface.js +0 -0
- package/dist/fn/browser/isDesktopDevice.d.ts +0 -0
- package/dist/fn/browser/isDesktopDevice.js +0 -0
- package/dist/fn/browser/isFocused.d.ts +0 -0
- package/dist/fn/browser/isFocused.js +0 -0
- package/dist/fn/browser/isMobile.d.ts +0 -0
- package/dist/fn/browser/isMobile.js +0 -0
- package/dist/fn/browser/isMobileDevice.d.ts +0 -0
- package/dist/fn/browser/isMobileDevice.js +0 -0
- package/dist/fn/browser/isTabletDevice.d.ts +0 -0
- package/dist/fn/browser/isTabletDevice.js +0 -0
- package/dist/fn/browser/log.d.ts +0 -0
- package/dist/fn/browser/log.js +0 -0
- package/dist/fn/browser/replaceSelection.d.ts +0 -0
- package/dist/fn/browser/replaceSelection.js +0 -0
- package/dist/fn/browser/selectElementText.d.ts +0 -0
- package/dist/fn/browser/selectElementText.js +0 -0
- package/dist/fn/browser/setCookie.d.ts +0 -0
- package/dist/fn/browser/setCookie.js +0 -0
- package/dist/fn/browser/toggleFullScreen.d.ts +0 -0
- package/dist/fn/browser/toggleFullScreen.js +0 -0
- package/dist/fn/browser/warning.d.ts +0 -0
- package/dist/fn/browser/warning.js +0 -0
- package/dist/fn/convert/arrayBuffer2String.d.ts +0 -0
- package/dist/fn/convert/arrayBuffer2String.js +0 -0
- package/dist/fn/convert/canvasToImage.d.ts +0 -0
- package/dist/fn/convert/canvasToImage.js +0 -0
- package/dist/fn/convert/colorToHex.d.ts +0 -0
- package/dist/fn/convert/colorToHex.js +0 -0
- package/dist/fn/convert/fromXml.d.ts +0 -0
- package/dist/fn/convert/fromXml.js +0 -0
- package/dist/fn/convert/hex2rgb.d.ts +0 -0
- package/dist/fn/convert/hex2rgb.js +0 -0
- package/dist/fn/convert/imageToCanvas.d.ts +0 -0
- package/dist/fn/convert/imageToCanvas.js +0 -0
- package/dist/fn/convert/imgToBase64.d.ts +0 -0
- package/dist/fn/convert/imgToBase64.js +0 -0
- package/dist/fn/convert/rgb2hex.d.ts +0 -0
- package/dist/fn/convert/rgb2hex.js +0 -0
- package/dist/fn/convert/string2ArrayBuffer.d.ts +0 -0
- package/dist/fn/convert/string2ArrayBuffer.js +0 -0
- package/dist/fn/convert/toCSV.d.ts +0 -0
- package/dist/fn/convert/toCSV.js +0 -0
- package/dist/fn/datetime/calendar.d.ts +0 -0
- package/dist/fn/datetime/calendar.js +0 -0
- package/dist/fn/datetime/chrono.d.ts +0 -0
- package/dist/fn/datetime/chrono.js +0 -0
- package/dist/fn/datetime/date.d.ts +0 -0
- package/dist/fn/datetime/date.js +0 -0
- package/dist/fn/datetime/dateSQL.d.ts +0 -0
- package/dist/fn/datetime/dateSQL.js +0 -0
- package/dist/fn/datetime/daysInMonth.d.ts +0 -0
- package/dist/fn/datetime/daysInMonth.js +0 -0
- package/dist/fn/datetime/fdate.d.ts +0 -0
- package/dist/fn/datetime/fdate.js +0 -0
- package/dist/fn/datetime/fdatetime.d.ts +0 -0
- package/dist/fn/datetime/fdatetime.js +0 -0
- package/dist/fn/datetime/formatDate.d.ts +0 -0
- package/dist/fn/datetime/formatDate.js +0 -0
- package/dist/fn/datetime/ftime.d.ts +0 -0
- package/dist/fn/datetime/ftime.js +0 -0
- package/dist/fn/datetime/getDay.d.ts +0 -0
- package/dist/fn/datetime/getDay.js +0 -0
- package/dist/fn/datetime/timestamp.d.ts +0 -0
- package/dist/fn/datetime/timestamp.js +0 -0
- package/dist/fn/default/defaultAjaxAbortFunction.d.ts +0 -0
- package/dist/fn/default/defaultAjaxAbortFunction.js +0 -0
- package/dist/fn/default/defaultAjaxErrorFunction.d.ts +0 -0
- package/dist/fn/default/defaultAjaxErrorFunction.js +0 -0
- package/dist/fn/default/defaultAlertFunction.d.ts +0 -0
- package/dist/fn/default/defaultAlertFunction.js +0 -0
- package/dist/fn/default/defaultConfirmFunction.d.ts +0 -0
- package/dist/fn/default/defaultConfirmFunction.js +0 -0
- package/dist/fn/default/defaultEndLoadingFunction.d.ts +0 -0
- package/dist/fn/default/defaultEndLoadingFunction.js +0 -0
- package/dist/fn/default/defaultErrorFunction.d.ts +0 -0
- package/dist/fn/default/defaultErrorFunction.js +0 -0
- package/dist/fn/default/defaultHistoryFunction.d.ts +0 -0
- package/dist/fn/default/defaultHistoryFunction.js +0 -0
- package/dist/fn/default/defaultLinkFunction.d.ts +0 -0
- package/dist/fn/default/defaultLinkFunction.js +0 -0
- package/dist/fn/default/defaultPostLinkFunction.d.ts +0 -0
- package/dist/fn/default/defaultPostLinkFunction.js +0 -0
- package/dist/fn/default/defaultPreLinkFunction.d.ts +0 -0
- package/dist/fn/default/defaultPreLinkFunction.js +0 -0
- package/dist/fn/default/defaultResizeFunction.d.ts +0 -0
- package/dist/fn/default/defaultResizeFunction.js +0 -0
- package/dist/fn/default/defaultStartLoadingFunction.d.ts +0 -0
- package/dist/fn/default/defaultStartLoadingFunction.js +0 -0
- package/dist/fn/form/addInputs.d.ts +0 -0
- package/dist/fn/form/addInputs.js +0 -0
- package/dist/fn/form/fieldValue.d.ts +0 -0
- package/dist/fn/form/fieldValue.js +0 -0
- package/dist/fn/form/formdata.d.ts +0 -0
- package/dist/fn/form/formdata.js +0 -0
- package/dist/fn/form/objectToFormData.d.ts +0 -0
- package/dist/fn/form/objectToFormData.js +0 -0
- package/dist/fn/form/submit.d.ts +0 -0
- package/dist/fn/form/submit.js +0 -0
- package/dist/fn/html/adjustHeight.d.ts +0 -0
- package/dist/fn/html/adjustHeight.js +0 -0
- package/dist/fn/html/adjustSize.d.ts +0 -0
- package/dist/fn/html/adjustSize.js +0 -0
- package/dist/fn/html/adjustWidth.d.ts +0 -0
- package/dist/fn/html/adjustWidth.js +0 -0
- package/dist/fn/html/getAllTags.d.ts +0 -0
- package/dist/fn/html/getAllTags.js +0 -0
- package/dist/fn/html/getAncestors.d.ts +0 -0
- package/dist/fn/html/getAncestors.js +0 -0
- package/dist/fn/html/getAttributes.d.ts +0 -0
- package/dist/fn/html/getAttributes.js +0 -0
- package/dist/fn/html/getHTMLOfSelection.d.ts +0 -0
- package/dist/fn/html/getHTMLOfSelection.js +0 -0
- package/dist/fn/html/getHtml.d.ts +0 -0
- package/dist/fn/html/getHtml.js +0 -0
- package/dist/fn/html/getPath.d.ts +0 -0
- package/dist/fn/html/getPath.js +0 -0
- package/dist/fn/html/getText.d.ts +0 -0
- package/dist/fn/html/getText.js +0 -0
- package/dist/fn/html/html2text.d.ts +0 -0
- package/dist/fn/html/html2text.js +0 -0
- package/dist/fn/html/isInside.d.ts +0 -0
- package/dist/fn/html/isInside.js +0 -0
- package/dist/fn/html/makeReactive.d.ts +0 -0
- package/dist/fn/html/makeReactive.js +0 -0
- package/dist/fn/html/selector.d.ts +0 -0
- package/dist/fn/html/selector.js +0 -0
- package/dist/fn/init.d.ts +0 -0
- package/dist/fn/init.js +0 -0
- package/dist/fn/loop/each.d.ts +0 -0
- package/dist/fn/loop/each.js +0 -0
- package/dist/fn/loop/fori.d.ts +0 -0
- package/dist/fn/loop/fori.js +0 -0
- package/dist/fn/loop/forir.d.ts +0 -0
- package/dist/fn/loop/forir.js +0 -0
- package/dist/fn/loop/iterate.d.ts +0 -0
- package/dist/fn/loop/iterate.js +0 -0
- package/dist/fn/loop/riterate.d.ts +0 -0
- package/dist/fn/loop/riterate.js +0 -0
- package/dist/fn/misc/analyzeFunction.d.ts +0 -0
- package/dist/fn/misc/analyzeFunction.js +0 -0
- package/dist/fn/misc/getTimeoff.d.ts +0 -0
- package/dist/fn/misc/getTimeoff.js +0 -0
- package/dist/fn/misc/money.d.ts +0 -0
- package/dist/fn/misc/money.js +0 -0
- package/dist/fn/misc/percent.d.ts +0 -0
- package/dist/fn/misc/percent.js +0 -0
- package/dist/fn/misc/randomInt.d.ts +0 -0
- package/dist/fn/misc/randomInt.js +0 -0
- package/dist/fn/misc/roundDecimal.d.ts +0 -0
- package/dist/fn/misc/roundDecimal.js +0 -0
- package/dist/fn/misc/translate.d.ts +0 -0
- package/dist/fn/misc/translate.js +0 -0
- package/dist/fn/object/_compareValues.d.ts +0 -0
- package/dist/fn/object/_compareValues.js +0 -0
- package/dist/fn/object/arrayFromProp.d.ts +0 -0
- package/dist/fn/object/arrayFromProp.js +0 -0
- package/dist/fn/object/autoExtend.d.ts +0 -0
- package/dist/fn/object/autoExtend.js +0 -0
- package/dist/fn/object/checkProps.d.ts +0 -0
- package/dist/fn/object/checkProps.js +0 -0
- package/dist/fn/object/checkPropsDetails.d.ts +0 -0
- package/dist/fn/object/checkPropsDetails.js +0 -0
- package/dist/fn/object/checkPropsOrDie.d.ts +0 -0
- package/dist/fn/object/checkPropsOrDie.js +0 -0
- package/dist/fn/object/circularReplacer.d.ts +0 -0
- package/dist/fn/object/circularReplacer.js +0 -0
- package/dist/fn/object/clone.d.ts +0 -0
- package/dist/fn/object/clone.js +0 -0
- package/dist/fn/object/compare.d.ts +0 -0
- package/dist/fn/object/compare.js +0 -0
- package/dist/fn/object/compareConditions.d.ts +0 -0
- package/dist/fn/object/compareConditions.js +0 -0
- package/dist/fn/object/count.d.ts +0 -0
- package/dist/fn/object/count.js +0 -0
- package/dist/fn/object/createObject.d.ts +0 -0
- package/dist/fn/object/createObject.js +0 -0
- package/dist/fn/object/deepPath.d.ts +0 -0
- package/dist/fn/object/deepPath.js +0 -0
- package/dist/fn/object/deleteProp.d.ts +0 -0
- package/dist/fn/object/deleteProp.js +0 -0
- package/dist/fn/object/diffObj.d.ts +0 -0
- package/dist/fn/object/diffObj.js +0 -0
- package/dist/fn/object/extend.d.ts +0 -0
- package/dist/fn/object/extend.js +0 -0
- package/dist/fn/object/extendOut.d.ts +0 -0
- package/dist/fn/object/extendOut.js +0 -0
- package/dist/fn/object/filter.d.ts +0 -0
- package/dist/fn/object/filter.js +0 -0
- package/dist/fn/object/filterToConditions.d.ts +0 -0
- package/dist/fn/object/filterToConditions.js +0 -0
- package/dist/fn/object/findAll.d.ts +0 -0
- package/dist/fn/object/findAll.js +0 -0
- package/dist/fn/object/getField.d.ts +0 -0
- package/dist/fn/object/getField.js +0 -0
- package/dist/fn/object/getFieldValues.d.ts +0 -0
- package/dist/fn/object/getFieldValues.js +0 -0
- package/dist/fn/object/getProp.d.ts +0 -0
- package/dist/fn/object/getProp.js +0 -0
- package/dist/fn/object/getProperty.d.ts +0 -0
- package/dist/fn/object/getProperty.js +0 -0
- package/dist/fn/object/getRow.d.ts +0 -0
- package/dist/fn/object/getRow.js +0 -0
- package/dist/fn/object/map.d.ts +0 -0
- package/dist/fn/object/map.js +0 -0
- package/dist/fn/object/move.d.ts +0 -0
- package/dist/fn/object/move.js +0 -0
- package/dist/fn/object/multiorder.d.ts +0 -0
- package/dist/fn/object/multiorder.js +0 -0
- package/dist/fn/object/numProperties.d.ts +0 -0
- package/dist/fn/object/numProperties.js +0 -0
- package/dist/fn/object/order.d.ts +0 -0
- package/dist/fn/object/order.js +0 -0
- package/dist/fn/object/pickValue.d.ts +0 -0
- package/dist/fn/object/pickValue.js +0 -0
- package/dist/fn/object/removeEmpty.d.ts +0 -0
- package/dist/fn/object/removeEmpty.js +0 -0
- package/dist/fn/object/removePrivateProp.d.ts +0 -0
- package/dist/fn/object/removePrivateProp.js +0 -0
- package/dist/fn/object/search.d.ts +0 -0
- package/dist/fn/object/search.js +0 -0
- package/dist/fn/object/setProp.d.ts +0 -0
- package/dist/fn/object/setProp.js +0 -0
- package/dist/fn/object/setProperty.d.ts +0 -0
- package/dist/fn/object/setProperty.js +0 -0
- package/dist/fn/object/shortenObj.d.ts +0 -0
- package/dist/fn/object/shortenObj.js +0 -0
- package/dist/fn/object/shuffle.d.ts +0 -0
- package/dist/fn/object/shuffle.js +0 -0
- package/dist/fn/object/sum.d.ts +0 -0
- package/dist/fn/object/sum.js +0 -0
- package/dist/fn/object/unique.d.ts +0 -0
- package/dist/fn/object/unique.js +0 -0
- package/dist/fn/string/baseName.d.ts +0 -0
- package/dist/fn/string/baseName.js +0 -0
- package/dist/fn/string/br2nl.d.ts +0 -0
- package/dist/fn/string/br2nl.js +0 -0
- package/dist/fn/string/camelToCss.d.ts +0 -0
- package/dist/fn/string/camelToCss.js +0 -0
- package/dist/fn/string/camelize.d.ts +0 -0
- package/dist/fn/string/camelize.js +0 -0
- package/dist/fn/string/correctCase.d.ts +0 -0
- package/dist/fn/string/correctCase.js +0 -0
- package/dist/fn/string/crc32.d.ts +0 -0
- package/dist/fn/string/crc32.js +0 -0
- package/dist/fn/string/dirName.d.ts +0 -0
- package/dist/fn/string/dirName.js +0 -0
- package/dist/fn/string/escapeDquotes.d.ts +0 -0
- package/dist/fn/string/escapeDquotes.js +0 -0
- package/dist/fn/string/escapeRegExp.d.ts +0 -0
- package/dist/fn/string/escapeRegExp.js +0 -0
- package/dist/fn/string/escapeSquotes.d.ts +0 -0
- package/dist/fn/string/escapeSquotes.js +0 -0
- package/dist/fn/string/escapeTicks.d.ts +0 -0
- package/dist/fn/string/escapeTicks.js +0 -0
- package/dist/fn/string/escapeUrl.d.ts +0 -0
- package/dist/fn/string/escapeUrl.js +0 -0
- package/dist/fn/string/fileExt.d.ts +0 -0
- package/dist/fn/string/fileExt.js +0 -0
- package/dist/fn/string/format.d.ts +0 -0
- package/dist/fn/string/format.js +0 -0
- package/dist/fn/string/formatBytes.d.ts +0 -0
- package/dist/fn/string/formatBytes.js +0 -0
- package/dist/fn/string/formatSize.d.ts +0 -0
- package/dist/fn/string/formatSize.js +0 -0
- package/dist/fn/string/hash.d.ts +0 -0
- package/dist/fn/string/hash.js +0 -0
- package/dist/fn/string/md5.d.ts +0 -0
- package/dist/fn/string/md5.js +0 -0
- package/dist/fn/string/nl2br.d.ts +0 -0
- package/dist/fn/string/nl2br.js +0 -0
- package/dist/fn/string/printf.d.ts +0 -0
- package/dist/fn/string/printf.js +0 -0
- package/dist/fn/string/quotes2html.d.ts +0 -0
- package/dist/fn/string/quotes2html.js +0 -0
- package/dist/fn/string/randomString.d.ts +0 -0
- package/dist/fn/string/randomString.js +0 -0
- package/dist/fn/string/removeAccents.d.ts +0 -0
- package/dist/fn/string/removeAccents.js +0 -0
- package/dist/fn/string/removeExtraSpaces.d.ts +0 -0
- package/dist/fn/string/removeExtraSpaces.js +0 -0
- package/dist/fn/string/removeHtmlComments.d.ts +0 -0
- package/dist/fn/string/removeHtmlComments.js +0 -0
- package/dist/fn/string/removeTrailingChars.d.ts +0 -0
- package/dist/fn/string/removeTrailingChars.js +0 -0
- package/dist/fn/string/repeat.d.ts +0 -0
- package/dist/fn/string/repeat.js +0 -0
- package/dist/fn/string/replaceAll.d.ts +0 -0
- package/dist/fn/string/replaceAll.js +0 -0
- package/dist/fn/string/sanitize.d.ts +0 -0
- package/dist/fn/string/sanitize.js +0 -0
- package/dist/fn/string/shorten.d.ts +0 -0
- package/dist/fn/string/shorten.js +0 -0
- package/dist/fn/string/simpleHash.d.ts +0 -0
- package/dist/fn/string/simpleHash.js +0 -0
- package/dist/fn/string/simpleHash1.d.ts +0 -0
- package/dist/fn/string/simpleHash1.js +0 -0
- package/dist/fn/string/simpleHash2.d.ts +0 -0
- package/dist/fn/string/simpleHash2.js +0 -0
- package/dist/fn/string/substr.d.ts +0 -0
- package/dist/fn/string/substr.js +0 -0
- package/dist/fn/string/trim.d.ts +0 -0
- package/dist/fn/string/trim.js +0 -0
- package/dist/fn/string/uniqString.d.ts +0 -0
- package/dist/fn/string/uniqString.js +0 -0
- package/dist/fn/style/addColors.d.ts +0 -0
- package/dist/fn/style/addColors.js +0 -0
- package/dist/fn/style/addStyle.d.ts +0 -0
- package/dist/fn/style/addStyle.js +0 -0
- package/dist/fn/style/animateCss.d.ts +0 -0
- package/dist/fn/style/animateCss.js +0 -0
- package/dist/fn/style/center.d.ts +0 -0
- package/dist/fn/style/center.js +0 -0
- package/dist/fn/style/cssExists.d.ts +0 -0
- package/dist/fn/style/cssExists.js +0 -0
- package/dist/fn/style/getCssVar.d.ts +0 -0
- package/dist/fn/style/getCssVar.js +0 -0
- package/dist/fn/style/getScrollBarSize.d.ts +0 -0
- package/dist/fn/style/getScrollBarSize.js +0 -0
- package/dist/fn/style/lightenDarkenHex.d.ts +0 -0
- package/dist/fn/style/lightenDarkenHex.js +0 -0
- package/dist/fn/style/outerHeight.d.ts +0 -0
- package/dist/fn/style/outerHeight.js +0 -0
- package/dist/fn/style/outerWidth.d.ts +0 -0
- package/dist/fn/style/outerWidth.js +0 -0
- package/dist/fn/style/resize.d.ts +0 -0
- package/dist/fn/style/resize.js +0 -0
- package/dist/fn/style/setCssVar.d.ts +0 -0
- package/dist/fn/style/setCssVar.js +0 -0
- package/dist/fn/type/checkType.d.ts +0 -0
- package/dist/fn/type/checkType.js +0 -0
- package/dist/fn/type/isArray.d.ts +0 -0
- package/dist/fn/type/isArray.js +0 -0
- package/dist/fn/type/isBlob.d.ts +0 -0
- package/dist/fn/type/isBlob.js +0 -0
- package/dist/fn/type/isBoolean.d.ts +0 -0
- package/dist/fn/type/isBoolean.js +0 -0
- package/dist/fn/type/isCanvas.d.ts +0 -0
- package/dist/fn/type/isCanvas.js +0 -0
- package/dist/fn/type/isColor.d.ts +0 -0
- package/dist/fn/type/isColor.js +0 -0
- package/dist/fn/type/isComment.d.ts +0 -0
- package/dist/fn/type/isComment.js +0 -0
- package/dist/fn/type/isCp.d.ts +0 -0
- package/dist/fn/type/isCp.js +0 -0
- package/dist/fn/type/isDate.d.ts +0 -0
- package/dist/fn/type/isDate.js +0 -0
- package/dist/fn/type/isDimension.d.ts +0 -0
- package/dist/fn/type/isDimension.js +0 -0
- package/dist/fn/type/isDom.d.ts +0 -0
- package/dist/fn/type/isDom.js +0 -0
- package/dist/fn/type/isEmail.d.ts +0 -0
- package/dist/fn/type/isEmail.js +0 -0
- package/dist/fn/type/isEmpty.d.ts +0 -0
- package/dist/fn/type/isEmpty.js +0 -0
- package/dist/fn/type/isEvent.d.ts +0 -0
- package/dist/fn/type/isEvent.js +0 -0
- package/dist/fn/type/isFunction.d.ts +0 -0
- package/dist/fn/type/isFunction.js +0 -0
- package/dist/fn/type/isHostname.d.ts +0 -0
- package/dist/fn/type/isHostname.js +0 -0
- package/dist/fn/type/isIP.d.ts +0 -0
- package/dist/fn/type/isIP.js +0 -0
- package/dist/fn/type/isInt.d.ts +0 -0
- package/dist/fn/type/isInt.js +0 -0
- package/dist/fn/type/isIterable.d.ts +0 -0
- package/dist/fn/type/isIterable.js +0 -0
- package/dist/fn/type/isNull.d.ts +0 -0
- package/dist/fn/type/isNull.js +0 -0
- package/dist/fn/type/isNumber.d.ts +0 -0
- package/dist/fn/type/isNumber.js +0 -0
- package/dist/fn/type/isObject.d.ts +0 -0
- package/dist/fn/type/isObject.js +0 -0
- package/dist/fn/type/isPercent.d.ts +0 -0
- package/dist/fn/type/isPercent.js +0 -0
- package/dist/fn/type/isPrimitive.d.ts +0 -0
- package/dist/fn/type/isPrimitive.js +0 -0
- package/dist/fn/type/isPromise.d.ts +0 -0
- package/dist/fn/type/isPromise.js +0 -0
- package/dist/fn/type/isPropSize.d.ts +0 -0
- package/dist/fn/type/isPropSize.js +0 -0
- package/dist/fn/type/isSQLDate.d.ts +0 -0
- package/dist/fn/type/isSQLDate.js +0 -0
- package/dist/fn/type/isSame.d.ts +0 -0
- package/dist/fn/type/isSame.js +0 -0
- package/dist/fn/type/isString.d.ts +0 -0
- package/dist/fn/type/isString.js +0 -0
- package/dist/fn/type/isSymbol.d.ts +0 -0
- package/dist/fn/type/isSymbol.js +0 -0
- package/dist/fn/type/isURL.d.ts +0 -0
- package/dist/fn/type/isURL.js +0 -0
- package/dist/fn/type/isValidDimension.d.ts +0 -0
- package/dist/fn/type/isValidDimension.js +0 -0
- package/dist/fn/type/isValidName.d.ts +0 -0
- package/dist/fn/type/isValidName.js +0 -0
- package/dist/fn/type/isValue.d.ts +0 -0
- package/dist/fn/type/isValue.js +0 -0
- package/dist/fn/type/isVue.d.ts +0 -0
- package/dist/fn/type/isVue.js +0 -0
- package/dist/fn.d.ts +0 -0
- package/dist/fn.js +0 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.js +0 -0
- package/dist/lng.d.ts +0 -0
- package/dist/lng.js +0 -0
- package/dist/vars.d.ts +0 -0
- package/dist/vars.js +0 -0
- package/package.json +2 -1
- package/dist/bundle-webpack.js +0 -77
- package/dist/bundle-webpack.js.map +0 -1
- package/dist/bundle.d.ts +0 -4922
- package/dist/bundle.js +0 -13626
- package/dist/bundle.js.map +0 -1
- package/dist/fn/object/stat.d.ts +0 -2
- package/dist/fn/object/stat.js +0 -49
package/dist/bundle.d.ts
DELETED
|
@@ -1,4922 +0,0 @@
|
|
|
1
|
-
declare module "fn/type/isArray" {
|
|
2
|
-
/**
|
|
3
|
-
* Returns true if the given argument is array.
|
|
4
|
-
* @method isArray
|
|
5
|
-
* @global
|
|
6
|
-
* @example
|
|
7
|
-
* ```javascript
|
|
8
|
-
* bbn.fn.isArray([5,2,6]);
|
|
9
|
-
* //true
|
|
10
|
-
* ```
|
|
11
|
-
* @memberof bbn.fn
|
|
12
|
-
* @returns {Boolean}
|
|
13
|
-
*/
|
|
14
|
-
const isArray: (...args: any[]) => boolean;
|
|
15
|
-
export { isArray };
|
|
16
|
-
}
|
|
17
|
-
declare module "fn/type/isNumber" {
|
|
18
|
-
/**
|
|
19
|
-
* Returns true if the given argument is a number
|
|
20
|
-
* @method isNumber
|
|
21
|
-
* @global
|
|
22
|
-
* @example
|
|
23
|
-
* ```javascript
|
|
24
|
-
* bbn.fn.isNumber(5);
|
|
25
|
-
* //true
|
|
26
|
-
* ```
|
|
27
|
-
* @example
|
|
28
|
-
* ```javascript
|
|
29
|
-
* bbn.fn.isNumber(0.5);
|
|
30
|
-
* //true
|
|
31
|
-
* ```
|
|
32
|
-
* @memberof bbn.fn
|
|
33
|
-
* @returns {Boolean}
|
|
34
|
-
*/
|
|
35
|
-
const isNumber: (...args: any[]) => boolean;
|
|
36
|
-
export { isNumber };
|
|
37
|
-
}
|
|
38
|
-
declare module "fn/type/isIterable" {
|
|
39
|
-
/**
|
|
40
|
-
* Returns true if the given object can be iterated as an array (numerically).
|
|
41
|
-
*
|
|
42
|
-
* It is possible to pass as argument a string with hexadecimal value in rgb or the name of the color.
|
|
43
|
-
*
|
|
44
|
-
* @method isIterable
|
|
45
|
-
* @global
|
|
46
|
-
* @memberof bbn.fn
|
|
47
|
-
*
|
|
48
|
-
* @example
|
|
49
|
-
* ```javascript
|
|
50
|
-
* bbn.fn.isIterable([1, 2])
|
|
51
|
-
* // true
|
|
52
|
-
* bbn.fn.isIterable({a: 1, b: 2})
|
|
53
|
-
* // false
|
|
54
|
-
* bbn.fn.isIterable(25)
|
|
55
|
-
* // false
|
|
56
|
-
* bbn.fn.isIterable(document.body.querySelectorAll('.container > div'))
|
|
57
|
-
* // true
|
|
58
|
-
* ```
|
|
59
|
-
*
|
|
60
|
-
* @param {String} st
|
|
61
|
-
*
|
|
62
|
-
* @returns {Boolean}
|
|
63
|
-
*/
|
|
64
|
-
const isIterable: (...args: any[]) => boolean;
|
|
65
|
-
export { isIterable };
|
|
66
|
-
}
|
|
67
|
-
declare module "fn/type/isString" {
|
|
68
|
-
/**
|
|
69
|
-
* Returns true if the given argument is a string;
|
|
70
|
-
* @method isString
|
|
71
|
-
* @global
|
|
72
|
-
* @example
|
|
73
|
-
* ```javascript
|
|
74
|
-
* bbn.fn.isString('bbn');
|
|
75
|
-
* //true
|
|
76
|
-
* ```
|
|
77
|
-
* @memberof bbn.fn
|
|
78
|
-
* @returns {Boolean}
|
|
79
|
-
*/
|
|
80
|
-
const isString: (...args: any[]) => boolean;
|
|
81
|
-
export { isString };
|
|
82
|
-
}
|
|
83
|
-
declare module "fn/type/isInt" {
|
|
84
|
-
/**
|
|
85
|
-
* Returns true if the given argument is an integer
|
|
86
|
-
* @method isInt
|
|
87
|
-
* @global
|
|
88
|
-
* @example
|
|
89
|
-
* ```javascript
|
|
90
|
-
* bbn.fn.isInt(5);
|
|
91
|
-
* // true
|
|
92
|
-
* bbn.fn.isInt(0.5);
|
|
93
|
-
* // false
|
|
94
|
-
* bbn.fn.isInt("hello");
|
|
95
|
-
* // false
|
|
96
|
-
* ```
|
|
97
|
-
* @memberof bbn.fn
|
|
98
|
-
* @returns {Boolean}
|
|
99
|
-
*/
|
|
100
|
-
const isInt: (...args: any[]) => boolean;
|
|
101
|
-
export { isInt };
|
|
102
|
-
}
|
|
103
|
-
declare module "fn/type/isFunction" {
|
|
104
|
-
/**
|
|
105
|
-
* Returns true if the given argument is a function.
|
|
106
|
-
* @global
|
|
107
|
-
* @example
|
|
108
|
-
* ```javascript
|
|
109
|
-
* bbn.fn.isFunction(() => {
|
|
110
|
-
* alert('Hello world');
|
|
111
|
-
* });
|
|
112
|
-
* //true
|
|
113
|
-
* ```
|
|
114
|
-
* @method isFunction
|
|
115
|
-
* @memberof bbn.fn
|
|
116
|
-
* @returns {Boolean}
|
|
117
|
-
*/
|
|
118
|
-
const isFunction: (...args: any[]) => boolean;
|
|
119
|
-
export { isFunction };
|
|
120
|
-
}
|
|
121
|
-
declare module "fn/browser/log" {
|
|
122
|
-
/**
|
|
123
|
-
* Logs the given arguments in the browser's console.
|
|
124
|
-
* @method log
|
|
125
|
-
* @global
|
|
126
|
-
* @example
|
|
127
|
-
* ```javascript
|
|
128
|
-
* //'hello'
|
|
129
|
-
* bbn.fn.log('hello');
|
|
130
|
-
* ```
|
|
131
|
-
* @memberof bbn.fn
|
|
132
|
-
* @param {...any} args
|
|
133
|
-
* @returns
|
|
134
|
-
*/
|
|
135
|
-
const log: (...args: any[]) => any;
|
|
136
|
-
export { log };
|
|
137
|
-
}
|
|
138
|
-
declare module "fn/string/substr" {
|
|
139
|
-
/**
|
|
140
|
-
* Basic substring function accepting both positive and negative values.
|
|
141
|
-
*
|
|
142
|
-
* @method substr
|
|
143
|
-
* @global
|
|
144
|
-
*
|
|
145
|
-
* @example
|
|
146
|
-
* ```javascript
|
|
147
|
-
* bbn.fn.substr(bbn.fn, 'Hello', -3, -1);
|
|
148
|
-
* // "ll"
|
|
149
|
-
* bbn.fn.substr(bbn.fn, 'Hello', -3);
|
|
150
|
-
* // "llo"
|
|
151
|
-
* bbn.fn.substr(bbn.fn, 'Hello', 0, 1);
|
|
152
|
-
* // "H"
|
|
153
|
-
* ```
|
|
154
|
-
* @memberof bbn.fn
|
|
155
|
-
* @param {String} str
|
|
156
|
-
* @param {Number} from
|
|
157
|
-
* @param {Number} length
|
|
158
|
-
* @returns {String} Result substring
|
|
159
|
-
*/
|
|
160
|
-
const substr: (str: string, from: number, length?: number) => string;
|
|
161
|
-
export { substr };
|
|
162
|
-
}
|
|
163
|
-
declare module "fn/object/removePrivateProp" {
|
|
164
|
-
/**
|
|
165
|
-
* Returns an object with the original objects' properties starting with an alphanumeric character.
|
|
166
|
-
*
|
|
167
|
-
* It is presumed that external libraries, bbn variables use prefixes such as _ or $ for
|
|
168
|
-
* naming private properties; this returns a new object purged from these properties.
|
|
169
|
-
*
|
|
170
|
-
* @method removePrivateProp
|
|
171
|
-
* @global
|
|
172
|
-
* @example
|
|
173
|
-
* ```javascript
|
|
174
|
-
* bbn.fn.removePrivateProp({
|
|
175
|
-
* _bbn_timestamp: 1587269593987,
|
|
176
|
-
* name: "Wonka",
|
|
177
|
-
* fname: "Willy"
|
|
178
|
-
* });
|
|
179
|
-
* // {name: "Wonka", fname: "Willy"}
|
|
180
|
-
* ```
|
|
181
|
-
* @memberof bbn.fn
|
|
182
|
-
* @param {Object} obj The original object
|
|
183
|
-
* @param {Boolean} deep If true the function will be reapplied on object properties
|
|
184
|
-
* @returns {Object} A new object without only the _public_ properties.
|
|
185
|
-
*/
|
|
186
|
-
const removePrivateProp: (obj: object, deep?: boolean) => any;
|
|
187
|
-
export { removePrivateProp };
|
|
188
|
-
}
|
|
189
|
-
declare module "fn/loop/iterate" {
|
|
190
|
-
/**
|
|
191
|
-
* Executes the provided function on each property of the given object.
|
|
192
|
-
*
|
|
193
|
-
* @method iterate
|
|
194
|
-
* @global
|
|
195
|
-
* @example
|
|
196
|
-
* ```javascript
|
|
197
|
-
* //["value1", 2]
|
|
198
|
-
* let arr = [];
|
|
199
|
-
* bbn.fn.iterate({field1: "value1", field2: 2}, (val, idx) => {
|
|
200
|
-
* arr.push(value);
|
|
201
|
-
* });
|
|
202
|
-
* ```
|
|
203
|
-
* @memberof bbn.fn
|
|
204
|
-
* @param {(Object|Number)} obj The object to loop on
|
|
205
|
-
* @param {Function} fn The function, gets the array's element and the index as arguments
|
|
206
|
-
* @param {Boolean} noPrivate If set to true the _private_ properties won't be included
|
|
207
|
-
* @param {Boolean} reverse If set to true the order of the keys will be reversed
|
|
208
|
-
* @returns {Object}
|
|
209
|
-
*/
|
|
210
|
-
const iterate: (obj: any, fn: any, noPrivate?: boolean, reverse?: boolean) => any;
|
|
211
|
-
export { iterate };
|
|
212
|
-
}
|
|
213
|
-
declare module "fn/loop/each" {
|
|
214
|
-
/**
|
|
215
|
-
* Executes the provided function on each element of the given array.
|
|
216
|
-
*
|
|
217
|
-
* Returning false will stop the loop.
|
|
218
|
-
*
|
|
219
|
-
* @method each
|
|
220
|
-
* @global
|
|
221
|
-
* @example
|
|
222
|
-
* ```javascript
|
|
223
|
-
* let res = 0;
|
|
224
|
-
* bbn.fn.each([4, 5, 5, 10, 1, 2], d => {
|
|
225
|
-
* res += d;
|
|
226
|
-
* });
|
|
227
|
-
* // res = 27
|
|
228
|
-
* ```
|
|
229
|
-
* @example
|
|
230
|
-
* ```javascript
|
|
231
|
-
* let res = 0;
|
|
232
|
-
* bbn.fn.each([4, 5, 5, 10, 1, 2], d => {
|
|
233
|
-
* if (res >= 20) {
|
|
234
|
-
* return false;
|
|
235
|
-
* }
|
|
236
|
-
* res += d;
|
|
237
|
-
* });
|
|
238
|
-
* // res = 24
|
|
239
|
-
* ```
|
|
240
|
-
* @memberof bbn.fn
|
|
241
|
-
* @param {*} arr The array to loop on
|
|
242
|
-
* @param {Function} fn The function, gets the array's element and the index as arguments
|
|
243
|
-
* @returns {[Array, Object, void]}
|
|
244
|
-
*/
|
|
245
|
-
const each: (arr: any, fn: any) => any;
|
|
246
|
-
export { each };
|
|
247
|
-
}
|
|
248
|
-
declare module "fn/string/correctCase" {
|
|
249
|
-
/**
|
|
250
|
-
* Converts the first character of the string to uppercase.
|
|
251
|
-
*
|
|
252
|
-
* @method correctCase
|
|
253
|
-
* @global
|
|
254
|
-
*
|
|
255
|
-
* @example
|
|
256
|
-
* ```javascript
|
|
257
|
-
* //"This is a test"
|
|
258
|
-
* bbn.fn.correctCase("this is a test");
|
|
259
|
-
* ```
|
|
260
|
-
*
|
|
261
|
-
* @memberof bbn.fn
|
|
262
|
-
* @param {STring} str
|
|
263
|
-
* @returns {String}
|
|
264
|
-
*/
|
|
265
|
-
const correctCase: (str: any) => any;
|
|
266
|
-
export { correctCase };
|
|
267
|
-
}
|
|
268
|
-
declare module "fn/browser/error" {
|
|
269
|
-
/**
|
|
270
|
-
* Throws an error.
|
|
271
|
-
* @method error
|
|
272
|
-
* @global
|
|
273
|
-
* @ignore
|
|
274
|
-
* ``` javascript
|
|
275
|
-
* bbn.fn.error('I log this error in console with a red background')
|
|
276
|
-
* ```
|
|
277
|
-
* @memberof bbn.fn
|
|
278
|
-
* @param {String} errorMsg
|
|
279
|
-
* @returns
|
|
280
|
-
*/
|
|
281
|
-
const error: (errorMsg: any) => never;
|
|
282
|
-
export { error };
|
|
283
|
-
}
|
|
284
|
-
declare module "fn/type/checkType" {
|
|
285
|
-
const checkType: (value: any, type: object | string, msg?: string, ...logs: any[]) => void;
|
|
286
|
-
export { checkType };
|
|
287
|
-
}
|
|
288
|
-
declare module "_" {
|
|
289
|
-
/**
|
|
290
|
-
* Translate an expression using the object bbn.lng
|
|
291
|
-
*
|
|
292
|
-
* @param {String} st
|
|
293
|
-
* @returns {String}
|
|
294
|
-
*/
|
|
295
|
-
const _: (...args: any[]) => string;
|
|
296
|
-
export { _ };
|
|
297
|
-
}
|
|
298
|
-
declare module "$" {
|
|
299
|
-
const $: (selector: any, context: any) => any;
|
|
300
|
-
export { $ };
|
|
301
|
-
}
|
|
302
|
-
declare module "lng" {
|
|
303
|
-
const lng: {
|
|
304
|
-
select_unselect_all: string;
|
|
305
|
-
select_all: string;
|
|
306
|
-
search: string;
|
|
307
|
-
loading: string;
|
|
308
|
-
choose: string;
|
|
309
|
-
error: string;
|
|
310
|
-
server_response: string;
|
|
311
|
-
reload: string;
|
|
312
|
-
errorText: string;
|
|
313
|
-
closeAll: string;
|
|
314
|
-
closeOthers: string;
|
|
315
|
-
pin: string;
|
|
316
|
-
arrange: string;
|
|
317
|
-
cancel: string;
|
|
318
|
-
unpin: string;
|
|
319
|
-
yes: string;
|
|
320
|
-
no: string;
|
|
321
|
-
unknown: string;
|
|
322
|
-
untitled: string;
|
|
323
|
-
confirmation: string;
|
|
324
|
-
Today: string;
|
|
325
|
-
Tomorrow: string;
|
|
326
|
-
Yesterday: string;
|
|
327
|
-
};
|
|
328
|
-
export { lng };
|
|
329
|
-
}
|
|
330
|
-
declare module "vars" {
|
|
331
|
-
const vars: {
|
|
332
|
-
loggers: {
|
|
333
|
-
_num: number;
|
|
334
|
-
};
|
|
335
|
-
datatypes: string[];
|
|
336
|
-
shortenLen: number;
|
|
337
|
-
keys: {
|
|
338
|
-
upDown: number[];
|
|
339
|
-
leftRight: number[];
|
|
340
|
-
dels: number[];
|
|
341
|
-
confirm: number[];
|
|
342
|
-
alt: number[];
|
|
343
|
-
numbers: number[];
|
|
344
|
-
numsigns: number[];
|
|
345
|
-
};
|
|
346
|
-
comparators: string[];
|
|
347
|
-
operators: string[];
|
|
348
|
-
tags: string[];
|
|
349
|
-
colors: {
|
|
350
|
-
darkgrey: string;
|
|
351
|
-
black: string;
|
|
352
|
-
anthracite: string;
|
|
353
|
-
grey: string;
|
|
354
|
-
white: string;
|
|
355
|
-
beige: string;
|
|
356
|
-
lightgrey: string;
|
|
357
|
-
pastelblue: string;
|
|
358
|
-
cyan: string;
|
|
359
|
-
blue: string;
|
|
360
|
-
indigo: string;
|
|
361
|
-
navy: string;
|
|
362
|
-
webblue: string;
|
|
363
|
-
teal: string;
|
|
364
|
-
turquoise: string;
|
|
365
|
-
pastelgreen: string;
|
|
366
|
-
palegreen: string;
|
|
367
|
-
green: string;
|
|
368
|
-
olive: string;
|
|
369
|
-
pastelorange: string;
|
|
370
|
-
yellow: string;
|
|
371
|
-
orange: string;
|
|
372
|
-
pink: string;
|
|
373
|
-
purple: string;
|
|
374
|
-
red: string;
|
|
375
|
-
brown: string;
|
|
376
|
-
};
|
|
377
|
-
reserved: string[];
|
|
378
|
-
mockText: string;
|
|
379
|
-
regexp: {
|
|
380
|
-
url: RegExp;
|
|
381
|
-
ip: RegExp;
|
|
382
|
-
hostname: RegExp;
|
|
383
|
-
};
|
|
384
|
-
};
|
|
385
|
-
export { vars };
|
|
386
|
-
}
|
|
387
|
-
declare module "env" {
|
|
388
|
-
const env: {
|
|
389
|
-
siteTitle: string;
|
|
390
|
-
logging: boolean;
|
|
391
|
-
cdn: string;
|
|
392
|
-
lang: string;
|
|
393
|
-
host: string;
|
|
394
|
-
url: string;
|
|
395
|
-
old_path: any;
|
|
396
|
-
loading: boolean;
|
|
397
|
-
width: number;
|
|
398
|
-
height: number;
|
|
399
|
-
focused: boolean;
|
|
400
|
-
last_focus: number;
|
|
401
|
-
sleep: boolean;
|
|
402
|
-
/**
|
|
403
|
-
* @var bbn.env.loaders Object where the props are MD5 of data and url while the values are the requests,
|
|
404
|
-
* for preventing the same call to be made at the same time
|
|
405
|
-
**/
|
|
406
|
-
loaders: any[];
|
|
407
|
-
loadersHistory: any[];
|
|
408
|
-
maxLoadersHistory: number;
|
|
409
|
-
resizeTimer: boolean;
|
|
410
|
-
hashChanged: number;
|
|
411
|
-
params: any[];
|
|
412
|
-
isInit: boolean;
|
|
413
|
-
isFocused: boolean;
|
|
414
|
-
timeoff: number;
|
|
415
|
-
loggingLevel: number;
|
|
416
|
-
ignoreUnload: boolean;
|
|
417
|
-
historyDisabled: boolean;
|
|
418
|
-
nav: string;
|
|
419
|
-
};
|
|
420
|
-
export { env };
|
|
421
|
-
}
|
|
422
|
-
declare module "db" {
|
|
423
|
-
interface Db {
|
|
424
|
-
_structures: object;
|
|
425
|
-
_connections: object;
|
|
426
|
-
_stores: object;
|
|
427
|
-
ok: boolean;
|
|
428
|
-
open(name: string): Promise<object>;
|
|
429
|
-
add(db: string, name: string, structure: object): void;
|
|
430
|
-
}
|
|
431
|
-
const db: Db;
|
|
432
|
-
export { db };
|
|
433
|
-
}
|
|
434
|
-
declare module "fn/ajax/_addLoader" {
|
|
435
|
-
/**
|
|
436
|
-
* Creates and adds a "loader" object to the property bbn.env.loaders.
|
|
437
|
-
*
|
|
438
|
-
* @method _addLoader
|
|
439
|
-
* @global
|
|
440
|
-
* @ignore
|
|
441
|
-
* @memberof bbn.fn
|
|
442
|
-
*
|
|
443
|
-
* @param {String} requestId
|
|
444
|
-
* @param {Promise} prom
|
|
445
|
-
* @param {Object} source
|
|
446
|
-
*
|
|
447
|
-
* @returns {Number} The timestamp (in ms)
|
|
448
|
-
*/
|
|
449
|
-
const _addLoader: (requestId: any, prom: any, source: any) => number;
|
|
450
|
-
export { _addLoader };
|
|
451
|
-
}
|
|
452
|
-
declare module "fn/object/getProperty" {
|
|
453
|
-
/**
|
|
454
|
-
* Returns the value of the given property from the given object.
|
|
455
|
-
*
|
|
456
|
-
* Looks for the given property in the given object, accepting dot (.) separator
|
|
457
|
-
* for deep property access, and returns its value if found and undefined otherwise.
|
|
458
|
-
*
|
|
459
|
-
* @method getProperty
|
|
460
|
-
* @global
|
|
461
|
-
* @example
|
|
462
|
-
* ```javascript
|
|
463
|
-
* bbn.fn.getProperty({a: 1, b: 2}, 'b');
|
|
464
|
-
* // 2
|
|
465
|
-
* ```
|
|
466
|
-
* @example
|
|
467
|
-
* ```javascript
|
|
468
|
-
* bbn.fn.getProperty({a: 1, b: {o: {a: 33, h: 5}}}, 'b.o.a');
|
|
469
|
-
* // 33
|
|
470
|
-
* ```
|
|
471
|
-
* @example
|
|
472
|
-
* ```javascript
|
|
473
|
-
* bbn.fn.getProperty({a: 1, b: {o: {a: 33, h: 5}}}, 'b.h.a');
|
|
474
|
-
* // undefined
|
|
475
|
-
* ```
|
|
476
|
-
* @memberof bbn.fn
|
|
477
|
-
* @param {Object} obj
|
|
478
|
-
* @param {String} prop
|
|
479
|
-
* @returns {*} The property's value or undefined
|
|
480
|
-
*/
|
|
481
|
-
const getProperty: (obj: any, prop: any) => any;
|
|
482
|
-
export { getProperty };
|
|
483
|
-
}
|
|
484
|
-
declare module "fn/string/removeAccents" {
|
|
485
|
-
/**
|
|
486
|
-
* Returns the string passed as an argument without accents.
|
|
487
|
-
*
|
|
488
|
-
* @method removeAccents
|
|
489
|
-
* @global
|
|
490
|
-
*
|
|
491
|
-
* @example
|
|
492
|
-
* ```javascript
|
|
493
|
-
* //"eeou"
|
|
494
|
-
* bbn.fn.removeAccents("èéòù");
|
|
495
|
-
* ```
|
|
496
|
-
* @memberof bbn.fn
|
|
497
|
-
* @param {String} st
|
|
498
|
-
* @returns {String}
|
|
499
|
-
*/
|
|
500
|
-
const removeAccents: (st: string) => string;
|
|
501
|
-
export { removeAccents };
|
|
502
|
-
}
|
|
503
|
-
declare module "fn/type/isDate" {
|
|
504
|
-
/**
|
|
505
|
-
* Returns true if the given argument is a date object.
|
|
506
|
-
* @method isDate
|
|
507
|
-
* @global
|
|
508
|
-
* @example
|
|
509
|
-
* ```javascript
|
|
510
|
-
* let date = new Date();
|
|
511
|
-
* bbn.fn.isDate(date);
|
|
512
|
-
* //true
|
|
513
|
-
* ```
|
|
514
|
-
* @example
|
|
515
|
-
* ```javascript
|
|
516
|
-
* bbn.fn.isDate('16/04/2020');
|
|
517
|
-
* //false
|
|
518
|
-
* ```
|
|
519
|
-
* @memberof bbn.fn
|
|
520
|
-
* @returns {Boolean}
|
|
521
|
-
*/
|
|
522
|
-
const isDate: (...args: any[]) => boolean;
|
|
523
|
-
export { isDate };
|
|
524
|
-
}
|
|
525
|
-
declare module "fn/object/_compareValues" {
|
|
526
|
-
/**
|
|
527
|
-
* Compares the given property in the given objects and returns -1, 1, or 0 depending on their difference.
|
|
528
|
-
*
|
|
529
|
-
* This is only used as a sorting function by bbn.fn.order and bbn.fn.multiorder.
|
|
530
|
-
*
|
|
531
|
-
* @method _compareValues
|
|
532
|
-
* @global
|
|
533
|
-
* @example
|
|
534
|
-
* ```javascript
|
|
535
|
-
* // Same value
|
|
536
|
-
* bbn.fn._compareValues({year: 2015, value: 2}, {year: 2016, value: 2}, 'value');
|
|
537
|
-
* // 0
|
|
538
|
-
* ```
|
|
539
|
-
* @example
|
|
540
|
-
* ```javascript
|
|
541
|
-
* // First value smaller than second
|
|
542
|
-
* bbn.fn._compareValues({year: 2015, value: 2}, {year: 2016, value: 2}, 'year');
|
|
543
|
-
* // -1
|
|
544
|
-
* ```
|
|
545
|
-
* @example
|
|
546
|
-
* ```javascript
|
|
547
|
-
* // First value greater than second
|
|
548
|
-
* bbn.fn._compareValues({year: 2017, value: 2}, {year: 2016, value: 2}, 'year');
|
|
549
|
-
* // 1
|
|
550
|
-
* ```
|
|
551
|
-
* @example
|
|
552
|
-
* ```javascript
|
|
553
|
-
* // First value is undefined
|
|
554
|
-
* bbn.fn._compareValues({year: 2017}, {year: 2016, value: 2}, 'value');
|
|
555
|
-
* // 1
|
|
556
|
-
* ```
|
|
557
|
-
* @memberof bbn.fn
|
|
558
|
-
* @param {Object} a First object for comparison
|
|
559
|
-
* @param {Object} b Second object for comparison
|
|
560
|
-
* @param {String} prop Property to compare
|
|
561
|
-
* @param {String} [dir=asc] Direction of comparison (desc or asc by default)
|
|
562
|
-
* @returns {Number} Always either -1, 1, or 0
|
|
563
|
-
*/
|
|
564
|
-
const _compareValues: (a: any, b: any, prop: any, dir?: string) => 0 | 1 | -1;
|
|
565
|
-
export { _compareValues };
|
|
566
|
-
}
|
|
567
|
-
declare module "fn/object/numProperties" {
|
|
568
|
-
/**
|
|
569
|
-
* Returns the number of properties contained in the object.
|
|
570
|
-
*
|
|
571
|
-
* Only takes into account the own properties - not the inherited ones - and the non _private_ ones.
|
|
572
|
-
*
|
|
573
|
-
* @method numProperties
|
|
574
|
-
* @global
|
|
575
|
-
* @example
|
|
576
|
-
* ```javascript
|
|
577
|
-
* bbn.fn.numProperties({author: "Chuck Palahniuk", "title": "Fight club"});
|
|
578
|
-
* // 2
|
|
579
|
-
* ```
|
|
580
|
-
* @example
|
|
581
|
-
* ```javascript
|
|
582
|
-
* bbn.fn.numProperties({username: "chuck", "password": "soap", _bbn_timestamp: 1587323193751});
|
|
583
|
-
* // 2
|
|
584
|
-
* @example
|
|
585
|
-
* ```javascript
|
|
586
|
-
* let d = new Date();
|
|
587
|
-
* bbn.fn.numProperties(d);
|
|
588
|
-
* // 0
|
|
589
|
-
* d.myProp = 1;
|
|
590
|
-
* bbn.fn.numProperties(d);
|
|
591
|
-
* // 1
|
|
592
|
-
* ```
|
|
593
|
-
* @memberof bbn.fn
|
|
594
|
-
* @param {Object} obj The object to analyze
|
|
595
|
-
* @returns {Number} The number of properties
|
|
596
|
-
*/
|
|
597
|
-
const numProperties: (obj: object) => number;
|
|
598
|
-
export { numProperties };
|
|
599
|
-
}
|
|
600
|
-
declare module "fn/type/isEmpty" {
|
|
601
|
-
/**
|
|
602
|
-
* Checks if the argument is empty or not.
|
|
603
|
-
* @method isEmpty
|
|
604
|
-
* @global
|
|
605
|
-
*
|
|
606
|
-
* @example
|
|
607
|
-
* ```javascript
|
|
608
|
-
* bbn.fn.isEmpty({});
|
|
609
|
-
* //true
|
|
610
|
-
* ```
|
|
611
|
-
* @example
|
|
612
|
-
* ```javascript
|
|
613
|
-
* bbn.fn.isEmpty({test : 1});
|
|
614
|
-
* //false
|
|
615
|
-
* ```
|
|
616
|
-
* @example
|
|
617
|
-
* ```javascript
|
|
618
|
-
* bbn.fn.isEmpty([]);
|
|
619
|
-
* //true
|
|
620
|
-
* ```
|
|
621
|
-
* @example
|
|
622
|
-
* ```javascript
|
|
623
|
-
* bbn.fn.isEmpty(['test']);
|
|
624
|
-
* //false
|
|
625
|
-
* ```
|
|
626
|
-
* @example
|
|
627
|
-
* ```javascript
|
|
628
|
-
* bbn.fn.isEmpty('');
|
|
629
|
-
* //true
|
|
630
|
-
* ```
|
|
631
|
-
* @example
|
|
632
|
-
* ```javascript
|
|
633
|
-
* bbn.fn.isEmpty('test');
|
|
634
|
-
* //false
|
|
635
|
-
* ```
|
|
636
|
-
* @memberof bbn.fn
|
|
637
|
-
* @param {*} obj
|
|
638
|
-
* @returns {Boolean}
|
|
639
|
-
*/
|
|
640
|
-
const isEmpty: (obj: any) => boolean;
|
|
641
|
-
export { isEmpty };
|
|
642
|
-
}
|
|
643
|
-
declare module "fn/type/isNull" {
|
|
644
|
-
/**
|
|
645
|
-
* Returns true if the given argument is null;
|
|
646
|
-
* @method isNull
|
|
647
|
-
* @global
|
|
648
|
-
* @example
|
|
649
|
-
* ```javascript
|
|
650
|
-
* bbn.fn.isNull(myData);
|
|
651
|
-
* //true
|
|
652
|
-
* ```
|
|
653
|
-
* @memberof bbn.fn
|
|
654
|
-
* @returns {Boolean}
|
|
655
|
-
*/
|
|
656
|
-
const isNull: (...args: any[]) => boolean;
|
|
657
|
-
export { isNull };
|
|
658
|
-
}
|
|
659
|
-
declare module "fn/type/isObject" {
|
|
660
|
-
/**
|
|
661
|
-
* Returns true if the given argument is an object.
|
|
662
|
-
* @method isObject
|
|
663
|
-
* @global
|
|
664
|
-
* @example
|
|
665
|
-
* ```javascript
|
|
666
|
-
* bbn.fn.isObject({name: 'cami', age: 7});
|
|
667
|
-
* //true
|
|
668
|
-
* ```
|
|
669
|
-
* @example
|
|
670
|
-
* ```javascript
|
|
671
|
-
* bbn.fn.isObject([{name: 'cami', age: 7}]);
|
|
672
|
-
* //false
|
|
673
|
-
* ```
|
|
674
|
-
* @memberof bbn.fn
|
|
675
|
-
* @returns {Boolean}
|
|
676
|
-
*/
|
|
677
|
-
const isObject: (...args: any[]) => boolean;
|
|
678
|
-
export { isObject };
|
|
679
|
-
}
|
|
680
|
-
declare module "fn/type/isDom" {
|
|
681
|
-
/**
|
|
682
|
-
* Returns true if the given argument is a dom element;
|
|
683
|
-
* @method isDom
|
|
684
|
-
* @example
|
|
685
|
-
* ```javascript
|
|
686
|
-
* bbn.fn.isDom(document.body.childNodes[0]);
|
|
687
|
-
* //true
|
|
688
|
-
* ```
|
|
689
|
-
* @global
|
|
690
|
-
* @memberof bbn.fn
|
|
691
|
-
* @returns {Boolean}
|
|
692
|
-
*/
|
|
693
|
-
const isDom: (...args: any[]) => boolean;
|
|
694
|
-
export { isDom };
|
|
695
|
-
}
|
|
696
|
-
declare module "fn/type/isCp" {
|
|
697
|
-
const isCp: (...args: any[]) => boolean;
|
|
698
|
-
export { isCp };
|
|
699
|
-
}
|
|
700
|
-
declare module "fn/object/circularReplacer" {
|
|
701
|
-
/**
|
|
702
|
-
* Returns a function to give to JSON.stringify in order to avoid circular values.
|
|
703
|
-
*
|
|
704
|
-
* @returns Function
|
|
705
|
-
*/
|
|
706
|
-
const circularReplacer: () => (key: any, value: any) => any;
|
|
707
|
-
export { circularReplacer };
|
|
708
|
-
}
|
|
709
|
-
declare module "fn/string/simpleHash1" {
|
|
710
|
-
const simpleHash1: (str: string) => number;
|
|
711
|
-
export { simpleHash1 };
|
|
712
|
-
}
|
|
713
|
-
declare module "fn/string/simpleHash2" {
|
|
714
|
-
const simpleHash2: (str: string) => number;
|
|
715
|
-
export { simpleHash2 };
|
|
716
|
-
}
|
|
717
|
-
declare module "fn/string/simpleHash" {
|
|
718
|
-
const simpleHash: (str: any) => string;
|
|
719
|
-
export { simpleHash };
|
|
720
|
-
}
|
|
721
|
-
declare module "fn/string/hash" {
|
|
722
|
-
/**
|
|
723
|
-
* Makes a hash out of anything
|
|
724
|
-
* @param {Object|Array} obj
|
|
725
|
-
* @returns {String}
|
|
726
|
-
*/
|
|
727
|
-
const hash: (obj: any) => string;
|
|
728
|
-
export { hash };
|
|
729
|
-
}
|
|
730
|
-
declare module "fn/type/isSame" {
|
|
731
|
-
/**
|
|
732
|
-
* Checks whether the data contained in the given objects is identical.
|
|
733
|
-
*
|
|
734
|
-
* The properties starting with a non alphanumerical character and the
|
|
735
|
-
* inherited ones are removed for the comparison, then the properties are
|
|
736
|
-
* compared individually without the order being taken into account.
|
|
737
|
-
*
|
|
738
|
-
* @method isSame
|
|
739
|
-
* @global
|
|
740
|
-
* @example
|
|
741
|
-
* ```javascript
|
|
742
|
-
* bbn.fn.isSame(
|
|
743
|
-
* {name: "Wonka", fname: "Willy"},
|
|
744
|
-
* {fname: "Willy", name: "Wonka"}
|
|
745
|
-
* );
|
|
746
|
-
* // true
|
|
747
|
-
* ```
|
|
748
|
-
* @example
|
|
749
|
-
* ```javascript
|
|
750
|
-
* // Doesn't take into account properties starting with non-alphanumeric characters
|
|
751
|
-
* bbn.fn.isSame(
|
|
752
|
-
* {name: "Wonka", fname: "Willy", _bbn_timestamp: 1587269593987},
|
|
753
|
-
* {fname: "Willy", name: "Wonka"}
|
|
754
|
-
* );
|
|
755
|
-
* // true
|
|
756
|
-
* ```
|
|
757
|
-
* @example
|
|
758
|
-
* ```javascript
|
|
759
|
-
* bbn.fn.isSame(
|
|
760
|
-
* {name: "Wonka", fname: "Willy", real: false},
|
|
761
|
-
* {fname: "Willy", name: "Wonka"}
|
|
762
|
-
* );
|
|
763
|
-
* // false
|
|
764
|
-
* ```
|
|
765
|
-
* @memberof bbn.fn
|
|
766
|
-
* @param {Object} obj1
|
|
767
|
-
* @param {Object} obj2
|
|
768
|
-
* @returns {Boolean}
|
|
769
|
-
*/
|
|
770
|
-
const isSame: (obj1: any, obj2: any, done?: any[]) => boolean;
|
|
771
|
-
export { isSame };
|
|
772
|
-
}
|
|
773
|
-
declare module "fn/object/compare" {
|
|
774
|
-
/**
|
|
775
|
-
* Performs a comparison between two values based on the given operator and returns a boolean.
|
|
776
|
-
*
|
|
777
|
-
* It is internally used by all the filtering functions; the available operators are:
|
|
778
|
-
* - _===_, _=_, _equal_, _eq_, _is_, which stand for __===__
|
|
779
|
-
* - _!==_, _notequal_, _neq_, _isnot_, which stand for __!==__
|
|
780
|
-
* - _!=_, _different_, which stand for __!=__
|
|
781
|
-
* - _contains_, _contain_, _icontains_, _icontain_
|
|
782
|
-
* - _starts_, _start_
|
|
783
|
-
* - _startswith_, _startsi_, _starti_, _istarts_, _istart_
|
|
784
|
-
* - _endswith_, _endsi_, _endi_, _iends_, _iend_
|
|
785
|
-
* - _like_
|
|
786
|
-
* - _gt_, _>_, which stand for __>__
|
|
787
|
-
* - _lt_, _<_, which stand for __<__
|
|
788
|
-
* - _gte_, _>=_, which stand for __>=__
|
|
789
|
-
* - _lte_, _<=_, which stand for __<=__
|
|
790
|
-
* - _isnull_, which stands for __=== null__
|
|
791
|
-
* - _isnotnull_, which stands for __!== null__
|
|
792
|
-
* - _isempty_, which stands for __=== ''__
|
|
793
|
-
* - _isnotempty_, which stands for __!== ''__
|
|
794
|
-
*
|
|
795
|
-
* The defaut operator (if none is given) is __==__ .
|
|
796
|
-
*
|
|
797
|
-
* @method compare
|
|
798
|
-
* @global
|
|
799
|
-
* @example
|
|
800
|
-
* ```javascript
|
|
801
|
-
* bbn.fn.compare('foo', 'bar', 'eq');
|
|
802
|
-
* // false
|
|
803
|
-
* ```
|
|
804
|
-
* @example
|
|
805
|
-
* ```javascript
|
|
806
|
-
* bbn.fn.compare('foo', 'bar', 'neq');
|
|
807
|
-
* // true
|
|
808
|
-
* ```
|
|
809
|
-
* @example
|
|
810
|
-
* ```javascript
|
|
811
|
-
* bbn.fn.compare(3, 1, '>');
|
|
812
|
-
* // true
|
|
813
|
-
* ```
|
|
814
|
-
* @example
|
|
815
|
-
* ```javascript
|
|
816
|
-
* bbn.fn.compare("JavaScript", "script", 'contain');
|
|
817
|
-
* // true
|
|
818
|
-
* ```
|
|
819
|
-
* @memberof bbn.fn
|
|
820
|
-
* @param {String|Number} v1
|
|
821
|
-
* @param {String|Number} v2
|
|
822
|
-
* @param {String} operator
|
|
823
|
-
* @returns {Boolean} True if the values' comparison complies with the operator, false otherwise
|
|
824
|
-
*/
|
|
825
|
-
const compare: (v1: any, v2: any, operator: any) => boolean;
|
|
826
|
-
export { compare };
|
|
827
|
-
}
|
|
828
|
-
declare module "fn/object/compareConditions" {
|
|
829
|
-
/**
|
|
830
|
-
* Checks whether the given data object complies or not with the given filter.
|
|
831
|
-
*
|
|
832
|
-
* The filter format must be full (i.e. with the properties logic and conditions) such as
|
|
833
|
-
* seen in the function bbn.fn.search and can be generated by the function bbn.fn.filterToConditions.
|
|
834
|
-
*
|
|
835
|
-
* @method compareConditions
|
|
836
|
-
* @global
|
|
837
|
-
* @example
|
|
838
|
-
* ```javascript
|
|
839
|
-
* let item = {name: "Raiders of the lost ark", director: "Steven Spielberg", year: 1981, id: 589};
|
|
840
|
-
* bbn.fn.compareConditions(item, {
|
|
841
|
-
* logic: "AND",
|
|
842
|
-
* conditions: [
|
|
843
|
-
* {
|
|
844
|
-
* field: "director",
|
|
845
|
-
* value: "Steven Spielberg"
|
|
846
|
-
* }
|
|
847
|
-
* ]
|
|
848
|
-
* });
|
|
849
|
-
* // true
|
|
850
|
-
* bbn.fn.compareConditions(item, bbn.fn.filterToConditions({director: "Steven Soderberg"}));
|
|
851
|
-
* // false
|
|
852
|
-
* bbn.fn.compareConditions(item, bbn.fn.filterToConditions({director: "Steven Spielberg"}));
|
|
853
|
-
* // true
|
|
854
|
-
* bbn.fn.compareConditions(item, bbn.fn.filterToConditions({year: 1980}, ">"));
|
|
855
|
-
* // true
|
|
856
|
-
* bbn.fn.compareConditions(item, {
|
|
857
|
-
* logic: "AND",
|
|
858
|
-
* conditions: [
|
|
859
|
-
* {
|
|
860
|
-
* field: "year",
|
|
861
|
-
* operator: "<",
|
|
862
|
-
* value: 1980
|
|
863
|
-
* }
|
|
864
|
-
* ]
|
|
865
|
-
* });
|
|
866
|
-
* // false
|
|
867
|
-
* ```
|
|
868
|
-
* @memberof bbn.fn
|
|
869
|
-
* @param {Object} data
|
|
870
|
-
* @param {Object} filter
|
|
871
|
-
* @returns {Boolean}
|
|
872
|
-
*/
|
|
873
|
-
const compareConditions: (data: any, filter: any) => boolean;
|
|
874
|
-
export { compareConditions };
|
|
875
|
-
}
|
|
876
|
-
declare module "fn/object/filterToConditions" {
|
|
877
|
-
interface Condition {
|
|
878
|
-
field: string;
|
|
879
|
-
operator?: string;
|
|
880
|
-
value?: any;
|
|
881
|
-
}
|
|
882
|
-
interface Filter {
|
|
883
|
-
conditions?: Condition[];
|
|
884
|
-
logic?: string;
|
|
885
|
-
}
|
|
886
|
-
/**
|
|
887
|
-
* Converts the given object 'filter' to a valid format of condition.
|
|
888
|
-
*
|
|
889
|
-
* The resulting format will comply with bbn.fn.compareConditions and also with
|
|
890
|
-
* bbn databases functions and complex filters applied to bbn-vue list components.
|
|
891
|
-
*
|
|
892
|
-
* @method filterToConditions
|
|
893
|
-
* @global
|
|
894
|
-
* @example
|
|
895
|
-
* ```javascript
|
|
896
|
-
* bbn.fn.filterToConditions({num: 3});
|
|
897
|
-
* // {
|
|
898
|
-
* // logic: "AND",
|
|
899
|
-
* // conditions: [{
|
|
900
|
-
* // field: "num",
|
|
901
|
-
* // operator: "=",
|
|
902
|
-
* // value: 3
|
|
903
|
-
* // }]
|
|
904
|
-
* // }
|
|
905
|
-
* ```
|
|
906
|
-
* @example
|
|
907
|
-
* ```javascript
|
|
908
|
-
* bbn.fn.filterToConditions({num: 3}, '>');
|
|
909
|
-
* // {
|
|
910
|
-
* // logic: "AND",
|
|
911
|
-
* // conditions: [{
|
|
912
|
-
* // field: "num",
|
|
913
|
-
* // operator: ">",
|
|
914
|
-
* // value: 3
|
|
915
|
-
* // }]
|
|
916
|
-
* // }
|
|
917
|
-
* ```
|
|
918
|
-
* @memberof bbn.fn
|
|
919
|
-
* @param {Object} filter
|
|
920
|
-
* @param {String} operator
|
|
921
|
-
* @returns {Object}
|
|
922
|
-
*/
|
|
923
|
-
const filterToConditions: (filter: any, operator?: string) => Filter;
|
|
924
|
-
export { Filter, filterToConditions };
|
|
925
|
-
}
|
|
926
|
-
declare module "fn/object/search" {
|
|
927
|
-
import { Filter } from "fn/object/filterToConditions";
|
|
928
|
-
/**
|
|
929
|
-
* Retrieves the index of the array's first element corresponding to the given filter.
|
|
930
|
-
*
|
|
931
|
-
* Returns -1 if the element is not found. If the second parameter is an object or function
|
|
932
|
-
* for filtering as defined in bbn.fn.filter, the remaining parameters will be shifted to the
|
|
933
|
-
* left, i.e. val becomes operator, and operator startFrom. And if operator is a number, its value will
|
|
934
|
-
* be given to startFrom and operator will be undefined. The filter object can be complex with different
|
|
935
|
-
* operators (as seen in bbn.fn.compare) and logics (AND/OR), and infinitely nested, of this form:
|
|
936
|
-
* ```javascript
|
|
937
|
-
* {
|
|
938
|
-
* logic: "AND",
|
|
939
|
-
* conditions: [
|
|
940
|
-
* {
|
|
941
|
-
* field: "prop1",
|
|
942
|
-
* operator: "eq",
|
|
943
|
-
* value: "value1"
|
|
944
|
-
* }, {
|
|
945
|
-
* logic: "OR",
|
|
946
|
-
* conditions: [
|
|
947
|
-
* {
|
|
948
|
-
* field: "prop2",
|
|
949
|
-
* operator: "eq",
|
|
950
|
-
* value: 1
|
|
951
|
-
* }. {
|
|
952
|
-
* field: "prop2",
|
|
953
|
-
* operator: "eq",
|
|
954
|
-
* value: 2
|
|
955
|
-
* }
|
|
956
|
-
* ]
|
|
957
|
-
* }
|
|
958
|
-
* ]
|
|
959
|
-
* }
|
|
960
|
-
* ```
|
|
961
|
-
* This way of managing the arguments is used in all the filtering functions.
|
|
962
|
-
*
|
|
963
|
-
* @method search
|
|
964
|
-
* @global
|
|
965
|
-
* @example
|
|
966
|
-
* ```javascript
|
|
967
|
-
* let ar = [
|
|
968
|
-
* {name: "Raiders of the lost ark", director: "Steven Spielberg", year: 1981, id: 589},
|
|
969
|
-
* {name: "Goonies", director: "Richard Donner", year: 1985, id: 689},
|
|
970
|
-
* {name: "Star wars", director: "George Lucas", year: 1977, id: 256},
|
|
971
|
-
* {name: "Jaws", director: "Steven Spielberg", year: 1975, id: 423}
|
|
972
|
-
* ];
|
|
973
|
-
*
|
|
974
|
-
* bbn.fn.search(ar, "id", 256);
|
|
975
|
-
* // 2
|
|
976
|
-
*
|
|
977
|
-
* bbn.fn.search(ar, {director: "Steven Spielberg"});
|
|
978
|
-
* // 0
|
|
979
|
-
*
|
|
980
|
-
* bbn.fn.search(ar, {year: 1975, director: "Steven Spielberg"});
|
|
981
|
-
* // 3
|
|
982
|
-
*
|
|
983
|
-
* bbn.fn.search(ar, {director: "Steven Spielberg"}, 1);
|
|
984
|
-
* // 3
|
|
985
|
-
*
|
|
986
|
-
* // Complex filters
|
|
987
|
-
* bbn.fn.search(ar, {
|
|
988
|
-
* logic: "AND",
|
|
989
|
-
* conditions: [
|
|
990
|
-
* {
|
|
991
|
-
* field: "director",
|
|
992
|
-
* operator: "eq",
|
|
993
|
-
* value: "Steven Spielberg"
|
|
994
|
-
* }, {
|
|
995
|
-
* logic: "OR",
|
|
996
|
-
* conditions: [
|
|
997
|
-
* {
|
|
998
|
-
* field: "year",
|
|
999
|
-
* operator: "eq",
|
|
1000
|
-
* value: 1974
|
|
1001
|
-
* }, {
|
|
1002
|
-
* field: "year",
|
|
1003
|
-
* operator: "eq",
|
|
1004
|
-
* value: 1975
|
|
1005
|
-
* }
|
|
1006
|
-
* ]
|
|
1007
|
-
* }
|
|
1008
|
-
* ]
|
|
1009
|
-
* });
|
|
1010
|
-
* // 3
|
|
1011
|
-
*
|
|
1012
|
-
* Simple array
|
|
1013
|
-
* bbn.fn.search(['a', 'b', 'c'], null, 'b');
|
|
1014
|
-
* // 1
|
|
1015
|
-
*
|
|
1016
|
-
* ```
|
|
1017
|
-
*
|
|
1018
|
-
* @memberof bbn.fn
|
|
1019
|
-
* @param {Array} arr The subject array
|
|
1020
|
-
* @param {(String|Object|Function)} prop A property's name or a filter object or function
|
|
1021
|
-
* @param {*} val The value with which comparing the given property
|
|
1022
|
-
* @param {String} operator The operator to use for comparison with the value as used in bbn.fn.compare
|
|
1023
|
-
* @param {Number} startFrom The index from which the search should start
|
|
1024
|
-
* @returns {Number} The index if found, otherwise -1
|
|
1025
|
-
*/
|
|
1026
|
-
const search: (arr: any[], prop: string | object | Filter | ((a: any, i: string | number | symbol) => boolean), val?: any, operator?: number | string, startFrom?: number) => number;
|
|
1027
|
-
export { search };
|
|
1028
|
-
}
|
|
1029
|
-
declare module "fn/object/getRow" {
|
|
1030
|
-
/**
|
|
1031
|
-
* Returns the first object matching the given filter in an array of objects.
|
|
1032
|
-
*
|
|
1033
|
-
* The filtering arguments follow the same scheme as bbn.fn.search.
|
|
1034
|
-
*
|
|
1035
|
-
* @method getRow
|
|
1036
|
-
* @global
|
|
1037
|
-
* @example
|
|
1038
|
-
* ```javascript
|
|
1039
|
-
* let ar = [
|
|
1040
|
-
* {name: "Raiders of the lost ark", director: "Steven Spielberg", year: 1981, id: 589},
|
|
1041
|
-
* {name: "Goonies", director: "Richard Donner", year: 1985, id: 689},
|
|
1042
|
-
* {name: "Star wars", director: "George Lucas", year: 1977, id: 256},
|
|
1043
|
-
* {name: "Jaws", director: "Steven Spielberg", year: 1975, id: 423}
|
|
1044
|
-
* ];
|
|
1045
|
-
* bbn.fn.getRow(ar, {director: "Steven Spielberg"});
|
|
1046
|
-
* // {name: "Raiders of the lost ark", director: "Steven Spielberg", year: 1981, id: 589},
|
|
1047
|
-
* bbn.fn.getRow(ar, "director", "Steven Spielberg");
|
|
1048
|
-
* // Same result as the previous example
|
|
1049
|
-
* bbn.fn.getRow(ar, {
|
|
1050
|
-
* logic: "OR",
|
|
1051
|
-
* conditions: [
|
|
1052
|
-
* {
|
|
1053
|
-
* field: "director",
|
|
1054
|
-
* value: "Richard Donner"
|
|
1055
|
-
* }, {
|
|
1056
|
-
* field: "director",
|
|
1057
|
-
* value: "George Lucas"
|
|
1058
|
-
* }
|
|
1059
|
-
* ]
|
|
1060
|
-
* );
|
|
1061
|
-
* // {name: "Goonies", director: "Richard Donner", year: 1985, id: 689},
|
|
1062
|
-
* ```
|
|
1063
|
-
* @memberof bbn.fn
|
|
1064
|
-
* @param {Array} arr The subject array
|
|
1065
|
-
* @param {(String|Object|Function)} prop A property's name or a filter object or function
|
|
1066
|
-
* @param {*} val The value with which comparing the given property
|
|
1067
|
-
* @param {String} operator The operator to use for comparison with the value as used in bbn.fn.compare
|
|
1068
|
-
* @returns {Object|Boolean} The item if found, false otherwise
|
|
1069
|
-
*/
|
|
1070
|
-
const getRow: (arr: any[], prop: object | string, val?: any, operator?: string) => any | false;
|
|
1071
|
-
export { getRow };
|
|
1072
|
-
}
|
|
1073
|
-
declare module "fn/ajax/_deleteLoader" {
|
|
1074
|
-
/**
|
|
1075
|
-
* Deletes a loader and changes its history state after the promise is fullfilled.
|
|
1076
|
-
*
|
|
1077
|
-
* @method _deleteLoader
|
|
1078
|
-
* @global
|
|
1079
|
-
* @ignore
|
|
1080
|
-
* @memberof bbn.fn
|
|
1081
|
-
*
|
|
1082
|
-
* @param {String} requestId The unique ID of the request sent
|
|
1083
|
-
* @param {String|Object} res The result of the request
|
|
1084
|
-
* @param {Boolean} isAbort True if the deletion comes from abortion
|
|
1085
|
-
*
|
|
1086
|
-
* @returns {Boolean} True if the loader was found
|
|
1087
|
-
*/
|
|
1088
|
-
const _deleteLoader: (requestId: any, res?: any, isAbort?: boolean) => boolean;
|
|
1089
|
-
export { _deleteLoader };
|
|
1090
|
-
}
|
|
1091
|
-
declare module "fn/ajax/getLoader" {
|
|
1092
|
-
/**
|
|
1093
|
-
* Finds the loader object corresponding to the given unique ID and returns it if found.
|
|
1094
|
-
*
|
|
1095
|
-
* The loader is an object representing an Ajax request, with the following properties:
|
|
1096
|
-
* * _key_ is the unique ID (_requestId_) of the loader
|
|
1097
|
-
* * _url_ is the URL called by the request
|
|
1098
|
-
* * _loader_ is the Promise from the Axios XHR
|
|
1099
|
-
* * _source_ is the source object for aborting the request
|
|
1100
|
-
* * _start_ is the timestamp of the moment the request was sent
|
|
1101
|
-
*
|
|
1102
|
-
* @method getLoader
|
|
1103
|
-
* @global
|
|
1104
|
-
* @memberof bbn.fn
|
|
1105
|
-
*
|
|
1106
|
-
* @example
|
|
1107
|
-
* ```javascript
|
|
1108
|
-
* bbn.fn.post('my/script', {a: 1, b: 2});
|
|
1109
|
-
* let requestId = bbn.fn.getRequestId('my/script', {a: 1, b: 2});
|
|
1110
|
-
* if (requestId) {
|
|
1111
|
-
* let loader = bbn.fn.getLoader(requestId);
|
|
1112
|
-
* console.log(loader);
|
|
1113
|
-
* // {
|
|
1114
|
-
* // key: "my/script:af27f0e81533ae2bae3c25dea67359f6",
|
|
1115
|
-
* // url: "my/script",
|
|
1116
|
-
* // loader: {Promise},
|
|
1117
|
-
* // source: {token: {CancelToken}, cancel: {Function}},
|
|
1118
|
-
* // start: 1591804716757
|
|
1119
|
-
* // }
|
|
1120
|
-
* }
|
|
1121
|
-
* ```
|
|
1122
|
-
*
|
|
1123
|
-
* @param {String} requestId The unique ID of the request as used in bbn.env.loaders
|
|
1124
|
-
*
|
|
1125
|
-
* @returns {null|Object} The corresponding loader Object if it exists, false otherwise
|
|
1126
|
-
*/
|
|
1127
|
-
const getLoader: (requestId: any) => BbnLoader;
|
|
1128
|
-
export { getLoader };
|
|
1129
|
-
}
|
|
1130
|
-
declare module "fn/ajax/abort" {
|
|
1131
|
-
/**
|
|
1132
|
-
* Aborts (client side) the XHR corresponding to the given ID if it still exists.
|
|
1133
|
-
*
|
|
1134
|
-
* This will throw an error if the loader can't be found.
|
|
1135
|
-
*
|
|
1136
|
-
* @method abort
|
|
1137
|
-
* @global
|
|
1138
|
-
* @memberof bbn.fn
|
|
1139
|
-
*
|
|
1140
|
-
* @example
|
|
1141
|
-
* ```javascript
|
|
1142
|
-
* bbn.fn.post('my/script', {a: 1, b: 2});
|
|
1143
|
-
* let requestId = bbn.fn.getRequestId('my/script', {a: 1, b: 2});
|
|
1144
|
-
* if (requestId) {
|
|
1145
|
-
* bbn.fn.abort(requestId);
|
|
1146
|
-
* }
|
|
1147
|
-
* ```
|
|
1148
|
-
*
|
|
1149
|
-
* @param {String} requestId An ID generated by getRequestId
|
|
1150
|
-
*
|
|
1151
|
-
* @returns {undefined}
|
|
1152
|
-
*/
|
|
1153
|
-
const abort: (requestId: any) => void;
|
|
1154
|
-
export { abort };
|
|
1155
|
-
}
|
|
1156
|
-
declare module "fn/object/filter" {
|
|
1157
|
-
import { Filter } from "fn/object/filterToConditions";
|
|
1158
|
-
/**
|
|
1159
|
-
* Returns a new array with only the data matching the given filter.
|
|
1160
|
-
*
|
|
1161
|
-
* The filtering arguments follow the same scheme as bbn.fn.search.
|
|
1162
|
-
*
|
|
1163
|
-
* @method filter
|
|
1164
|
-
* @global
|
|
1165
|
-
* @example
|
|
1166
|
-
* ```javascript
|
|
1167
|
-
* let ar = [
|
|
1168
|
-
* {name: "Raiders of the lost ark", director: "Steven Spielberg", year: 1981, id: 589},
|
|
1169
|
-
* {name: "Goonies", director: "Richard Donner", year: 1985, id: 689},
|
|
1170
|
-
* {name: "Star wars", director: "George Lucas", year: 1977, id: 256},
|
|
1171
|
-
* {name: "Jaws", director: "Steven Spielberg", year: 1975, id: 423}
|
|
1172
|
-
* ];
|
|
1173
|
-
* bbn.fn.filter(ar, {director: "Steven Spielberg"});
|
|
1174
|
-
* // [
|
|
1175
|
-
* // {name: "Raiders of the lost ark", director: "Steven Spielberg", year: 1981, id: 589},
|
|
1176
|
-
* // {name: "Jaws", director: "Steven Spielberg", year: 1975, id: 423}
|
|
1177
|
-
* // ]
|
|
1178
|
-
* bbn.fn.filter(ar, "director", "Steven Spielberg");
|
|
1179
|
-
* // Same result as the previous example
|
|
1180
|
-
* bbn.fn.filter(ar, {
|
|
1181
|
-
* logic: "OR",
|
|
1182
|
-
* conditions: [
|
|
1183
|
-
* {
|
|
1184
|
-
* field: "director",
|
|
1185
|
-
* value: "Richard Donner"
|
|
1186
|
-
* }, {
|
|
1187
|
-
* field: "director",
|
|
1188
|
-
* value: "George Lucas"
|
|
1189
|
-
* }
|
|
1190
|
-
* ]
|
|
1191
|
-
* );
|
|
1192
|
-
* // [
|
|
1193
|
-
* // {name: "Goonies", director: "Richard Donner", year: 1985, id: 689},
|
|
1194
|
-
* // {name: "Star wars", director: "George Lucas", year: 1977, id: 256},
|
|
1195
|
-
* // ]
|
|
1196
|
-
* ```
|
|
1197
|
-
*
|
|
1198
|
-
* @memberof bbn.fn
|
|
1199
|
-
* @param {Array} arr The subject array
|
|
1200
|
-
* @param {(String|Object|Function)} prop A property's name or a filter object or function
|
|
1201
|
-
* @param {*} val The value with which comparing the given property
|
|
1202
|
-
* @param {String} operator The operator to use for comparison with the value as used in bbn.fn.compare
|
|
1203
|
-
* @returns {Array} A new filtered array
|
|
1204
|
-
*/
|
|
1205
|
-
const filter: (arr: any[], prop: string | object | Filter | ((a: any, i: string | number | symbol) => boolean), val?: any, operator?: string) => any[];
|
|
1206
|
-
export { filter };
|
|
1207
|
-
}
|
|
1208
|
-
declare module "fn/ajax/abortURL" {
|
|
1209
|
-
/**
|
|
1210
|
-
* Aborts (client side) all the XHR using the given URL if it still exists.
|
|
1211
|
-
*
|
|
1212
|
-
* This will throw an error if the loader can't be found.
|
|
1213
|
-
*
|
|
1214
|
-
* @method abortURL
|
|
1215
|
-
* @global
|
|
1216
|
-
* @memberof bbn.fn
|
|
1217
|
-
*
|
|
1218
|
-
* @example
|
|
1219
|
-
* ```javascript
|
|
1220
|
-
* bbn.fn.post('my/script', {a: 1, b: 2});
|
|
1221
|
-
* bbn.fn.post('my/script', {c: 1, d: 2});
|
|
1222
|
-
* bbn.fn.abortURL('my/script');
|
|
1223
|
-
* ```
|
|
1224
|
-
*
|
|
1225
|
-
* @param {String} requestId An ID generated by getRequestId
|
|
1226
|
-
*
|
|
1227
|
-
* @returns {undefined}
|
|
1228
|
-
*/
|
|
1229
|
-
const abortURL: (url: any) => void;
|
|
1230
|
-
export { abortURL };
|
|
1231
|
-
}
|
|
1232
|
-
declare module "fn/style/addColors" {
|
|
1233
|
-
/**
|
|
1234
|
-
* Adds the given color to the object bbn.var.colors in order to be able to use
|
|
1235
|
-
* the css classes bbn-bg-myColor for the background and bbn-myColor for the text color.
|
|
1236
|
-
*
|
|
1237
|
-
* @method addColors
|
|
1238
|
-
* @global
|
|
1239
|
-
* @example
|
|
1240
|
-
* ```javascript
|
|
1241
|
-
* //<div class="bbn-bg-maroon">background</div> <span class="bbn-maroon">text color</span>
|
|
1242
|
-
* bbn.fn.addColors({maroon: '#800000'});
|
|
1243
|
-
* ```
|
|
1244
|
-
* @memberof bbn.fn
|
|
1245
|
-
* @param {Object} colors
|
|
1246
|
-
* @returns
|
|
1247
|
-
*/
|
|
1248
|
-
const addColors: (colors: object) => void;
|
|
1249
|
-
export { addColors };
|
|
1250
|
-
}
|
|
1251
|
-
declare module "fn/form/addInputs" {
|
|
1252
|
-
/**
|
|
1253
|
-
* Adds the given data to the given form by inserting hidden inputs.
|
|
1254
|
-
*
|
|
1255
|
-
* @method addInputs
|
|
1256
|
-
* @global
|
|
1257
|
-
* @memberof bbn.fn
|
|
1258
|
-
*
|
|
1259
|
-
* @example
|
|
1260
|
-
* ```javascript
|
|
1261
|
-
* let o = {name: "Smith", fname: "John"};
|
|
1262
|
-
* bbn.fn.addInputs(document.getElementById('myform'), o, 'bbn');
|
|
1263
|
-
* // Will write at the end of the given form:
|
|
1264
|
-
* // <input type="hidden" name="bbn[name]" value="Smith">
|
|
1265
|
-
* // <input type="hidden" name="bbn[fname]" value="John">
|
|
1266
|
-
*
|
|
1267
|
-
* ```
|
|
1268
|
-
*
|
|
1269
|
-
* @example
|
|
1270
|
-
* ```javascript
|
|
1271
|
-
* let o = {
|
|
1272
|
-
* People: [
|
|
1273
|
-
* {name: "Smith", fname: "John"},
|
|
1274
|
-
* {name: "Smith", fname: "Eileen"}
|
|
1275
|
-
* ],
|
|
1276
|
-
* Dates: ['2021-08-25', '2021-09-06']
|
|
1277
|
-
* };
|
|
1278
|
-
* bbn.fn.addInputs(document.getElementById('myform'), o);
|
|
1279
|
-
* // Will write at the end of the given form:
|
|
1280
|
-
* // <input type="hidden" name="People[0][name]" value="Smith">
|
|
1281
|
-
* // <input type="hidden" name="People[0][fname]" value="John">
|
|
1282
|
-
* // <input type="hidden" name="People[1][name]" value="Smith">
|
|
1283
|
-
* // <input type="hidden" name="People[1][fname]" value="Eileen">
|
|
1284
|
-
* // <input type="hidden" name="Dates[0]" value="2021-08-25">
|
|
1285
|
-
* // <input type="hidden" name="Dates[1]" value="2021-09-06">
|
|
1286
|
-
* ```
|
|
1287
|
-
*
|
|
1288
|
-
* @param {HTMLElement} form The form to which the inputs should be added
|
|
1289
|
-
* @param {Object} params The data which will be added
|
|
1290
|
-
* @param {String} prefix The optional object's name of the fields in the form
|
|
1291
|
-
* @returns {undefined}
|
|
1292
|
-
*/
|
|
1293
|
-
const addInputs: (form: any, params?: any, prefix?: string) => void;
|
|
1294
|
-
export { addInputs };
|
|
1295
|
-
}
|
|
1296
|
-
declare module "fn/style/addStyle" {
|
|
1297
|
-
/**
|
|
1298
|
-
* @ignore
|
|
1299
|
-
* @method addStyle
|
|
1300
|
-
* @todo Add method description for addStyle
|
|
1301
|
-
* @global
|
|
1302
|
-
* @memberof bbn.fn
|
|
1303
|
-
* @param {HTMLElement} ele
|
|
1304
|
-
* @param {Object} o
|
|
1305
|
-
* @returns {*}
|
|
1306
|
-
*/
|
|
1307
|
-
const addStyle: (ele: any, o: any) => void;
|
|
1308
|
-
export { addStyle };
|
|
1309
|
-
}
|
|
1310
|
-
declare module "fn/html/adjustSize" {
|
|
1311
|
-
const adjustSize: (type: any, eles: any) => void;
|
|
1312
|
-
export { adjustSize };
|
|
1313
|
-
}
|
|
1314
|
-
declare module "fn/html/adjustHeight" {
|
|
1315
|
-
const adjustHeight: () => void;
|
|
1316
|
-
export { adjustHeight };
|
|
1317
|
-
}
|
|
1318
|
-
declare module "fn/html/adjustWidth" {
|
|
1319
|
-
const adjustWidth: () => void;
|
|
1320
|
-
export { adjustWidth };
|
|
1321
|
-
}
|
|
1322
|
-
declare module "fn/string/escapeRegExp" {
|
|
1323
|
-
/**
|
|
1324
|
-
* Returns a string escaped.
|
|
1325
|
-
*
|
|
1326
|
-
* To escape the string by reducing the ambiguity between quotation marks and other characters used.
|
|
1327
|
-
*
|
|
1328
|
-
* @method escapeRegExp
|
|
1329
|
-
* @global
|
|
1330
|
-
*
|
|
1331
|
-
* @example
|
|
1332
|
-
* ```javascript
|
|
1333
|
-
* //"this\/is\/a\/test\/string"
|
|
1334
|
-
* bbn.fn.escapeRegExp("this/is/a/test/string");
|
|
1335
|
-
* ```
|
|
1336
|
-
* @memberof bbn.fn
|
|
1337
|
-
* @param {String} str
|
|
1338
|
-
* @returns {String} string with escape
|
|
1339
|
-
*/
|
|
1340
|
-
const escapeRegExp: (str: any) => any;
|
|
1341
|
-
export { escapeRegExp };
|
|
1342
|
-
}
|
|
1343
|
-
declare module "fn/string/replaceAll" {
|
|
1344
|
-
/**
|
|
1345
|
-
* Looks for and replaces parts of string with what we want.
|
|
1346
|
-
*
|
|
1347
|
-
* With the first argument you define what to replace,
|
|
1348
|
-
* the second argument with what you have to replace instead and the third argument is the string to be replaced.
|
|
1349
|
-
*
|
|
1350
|
-
* @method replaceAll
|
|
1351
|
-
* @global
|
|
1352
|
-
*
|
|
1353
|
-
* @example
|
|
1354
|
-
* ```javascript
|
|
1355
|
-
* bbn.fn.replaceAll('day', 'night', 'Today is a beautiful day');
|
|
1356
|
-
* //"Tonight is a beautiful night"
|
|
1357
|
-
* ```
|
|
1358
|
-
* @memberof bbn.fn
|
|
1359
|
-
* @param {String} find
|
|
1360
|
-
* @param {String} replace
|
|
1361
|
-
* @param {String|RegExp} str
|
|
1362
|
-
* @param {String} flags
|
|
1363
|
-
* @returns {String}
|
|
1364
|
-
*/
|
|
1365
|
-
const replaceAll: (find: string, replace: string, str: string, flags?: string) => string;
|
|
1366
|
-
export { replaceAll };
|
|
1367
|
-
}
|
|
1368
|
-
declare module "fn/string/md5" {
|
|
1369
|
-
/**
|
|
1370
|
-
* Converts and returns the argument passed in a string in md5 format.
|
|
1371
|
-
*
|
|
1372
|
-
* This is a formatted version of popular md5 implementation
|
|
1373
|
-
* Original copyright (c) Paul Johnston & Greg Holt.
|
|
1374
|
-
*
|
|
1375
|
-
*
|
|
1376
|
-
* @method md5
|
|
1377
|
-
* @global
|
|
1378
|
-
*
|
|
1379
|
-
* @example
|
|
1380
|
-
* ```javascript
|
|
1381
|
-
* //"486eb65274adb86441072afa1e2289f3"
|
|
1382
|
-
* bbn.fn.md5("this is a test string");
|
|
1383
|
-
* ```
|
|
1384
|
-
*
|
|
1385
|
-
* @memberof bbn.fn
|
|
1386
|
-
* @param {Mixed} st
|
|
1387
|
-
* @returns {String} in md5 format
|
|
1388
|
-
*/
|
|
1389
|
-
const md5: (st: any) => string;
|
|
1390
|
-
export { md5 };
|
|
1391
|
-
}
|
|
1392
|
-
declare module "fn/ajax/getRequestId" {
|
|
1393
|
-
/**
|
|
1394
|
-
* Returns a unique ID for a "loader" based on the URL, the data keys and the datatype.
|
|
1395
|
-
*
|
|
1396
|
-
* The routing functions don't allow to send the same request at the same moment,
|
|
1397
|
-
* therefore a unique ID is generated to identify them, based on the URL,
|
|
1398
|
-
* the keys of the data sent, and the expected returned data type.
|
|
1399
|
-
*
|
|
1400
|
-
* @method getRequestId
|
|
1401
|
-
* @global
|
|
1402
|
-
*
|
|
1403
|
-
* @example
|
|
1404
|
-
* ```javascript
|
|
1405
|
-
* // The URL is the first part of the key
|
|
1406
|
-
* bbn.fn.getRequestId('my/location', {a: 1, b: 2});
|
|
1407
|
-
* // my/location:af27f0e81533ae2bae3c25dea67359f6
|
|
1408
|
-
* bbn.fn.getRequestId('my/other/location', {a: 1, b: 2});
|
|
1409
|
-
* // my/other/location:af27f0e81533ae2bae3c25dea67359f6
|
|
1410
|
-
* ```
|
|
1411
|
-
*
|
|
1412
|
-
* @example
|
|
1413
|
-
* ```javascript
|
|
1414
|
-
* // A change of value will not change the requestId
|
|
1415
|
-
* bbn.fn.getRequestId('my/location', {a: 1, b: 3});
|
|
1416
|
-
* // my/location:af27f0e81533ae2bae3c25dea67359f6
|
|
1417
|
-
* // A change of key will
|
|
1418
|
-
* bbn.fn.getRequestId('my/location', {a: 1, c: 3});
|
|
1419
|
-
* // my/location:fde97ca7c6c998c911f4ab481a136d5f
|
|
1420
|
-
* ```
|
|
1421
|
-
*
|
|
1422
|
-
* @example
|
|
1423
|
-
* ```javascript
|
|
1424
|
-
* // Same with nested object
|
|
1425
|
-
* bbn.fn.getRequestId('my/location', {data: {a: 1, b: 3}});
|
|
1426
|
-
* // my/location:a7a58435275054106c4e4c9fb0cea5e5
|
|
1427
|
-
* bbn.fn.getRequestId('my/location', {data: {a: 1, b: 2}});
|
|
1428
|
-
* // my/location:a7a58435275054106c4e4c9fb0cea5e5
|
|
1429
|
-
* bbn.fn.getRequestId('my/location', {data: {a: 1, c: 3}});
|
|
1430
|
-
* // my/location:730da481e30d421afbadf1f1282dabb7
|
|
1431
|
-
* ```
|
|
1432
|
-
*
|
|
1433
|
-
* @memberof bbn.fn
|
|
1434
|
-
*
|
|
1435
|
-
* @param {String} url The URL used by the request
|
|
1436
|
-
* @param {Object} data The data sent to the URL
|
|
1437
|
-
* @param {String} datatype The type of data requested (JSON by default)
|
|
1438
|
-
*
|
|
1439
|
-
* @returns {String} The unique ID
|
|
1440
|
-
*/
|
|
1441
|
-
const getRequestId: (url: any, data: any, datatype: any) => string;
|
|
1442
|
-
export { getRequestId };
|
|
1443
|
-
}
|
|
1444
|
-
declare module "fn/object/extend" {
|
|
1445
|
-
/**
|
|
1446
|
-
* Merges the contents of two or more objects together into the first object.
|
|
1447
|
-
*
|
|
1448
|
-
* A boolean true argument can be done to operate a deep extend. In this case,
|
|
1449
|
-
* the content of properties or subproperties arrays and objects will also be merged.
|
|
1450
|
-
*
|
|
1451
|
-
* @method extend
|
|
1452
|
-
* @global
|
|
1453
|
-
* @example
|
|
1454
|
-
* ```javascript
|
|
1455
|
-
* bbn.fn.extend(
|
|
1456
|
-
* {prop1: 10, prop2: 20},
|
|
1457
|
-
* {prop1: 11, prop3: 21},
|
|
1458
|
-
* {prop2: 22, prop4: false},
|
|
1459
|
-
* {prop5: false, prop3: 45}
|
|
1460
|
-
* );
|
|
1461
|
-
* // {prop1: 11, prop2: 22, prop3: 45, prop4: false, prop5: false}
|
|
1462
|
-
* ```
|
|
1463
|
-
* @example
|
|
1464
|
-
* ```javascript
|
|
1465
|
-
* bbn.fn.extend(
|
|
1466
|
-
* {
|
|
1467
|
-
* prop1: [3, 5, 6],
|
|
1468
|
-
* prop2: {
|
|
1469
|
-
* subprop1: 87,
|
|
1470
|
-
* subprop2: 100
|
|
1471
|
-
* }
|
|
1472
|
-
* }, {
|
|
1473
|
-
* prop1: 11,
|
|
1474
|
-
* prop3: [8, 12, {aProperty: 1, anotherProperty: true}, 26]
|
|
1475
|
-
* }, {
|
|
1476
|
-
* prop2: {
|
|
1477
|
-
* subprop1: 90,
|
|
1478
|
-
* subprop3: 25
|
|
1479
|
-
* },
|
|
1480
|
-
* prop4: false
|
|
1481
|
-
* }, {
|
|
1482
|
-
* prop5: false,
|
|
1483
|
-
* prop3: [8, 45, {anotherProperty: false, andAnother: true}]
|
|
1484
|
-
* }
|
|
1485
|
-
* );
|
|
1486
|
-
* // {
|
|
1487
|
-
* // prop1: 11,
|
|
1488
|
-
* // prop2: {subprop1: 90, subprop3: 25},
|
|
1489
|
-
* // prop3: [8, 45, {anotherProperty: false, andAnother: true}],
|
|
1490
|
-
* // prop4: false,
|
|
1491
|
-
* // prop5: false
|
|
1492
|
-
* // }
|
|
1493
|
-
* ```
|
|
1494
|
-
* @example
|
|
1495
|
-
* ```javascript
|
|
1496
|
-
* // Deep
|
|
1497
|
-
* bbn.fn.extend(
|
|
1498
|
-
* true,
|
|
1499
|
-
* {
|
|
1500
|
-
* prop1: [3, 5, 6],
|
|
1501
|
-
* prop2: {
|
|
1502
|
-
* subprop1: 87,
|
|
1503
|
-
* subprop2: 100
|
|
1504
|
-
* }
|
|
1505
|
-
* }, {
|
|
1506
|
-
* prop1: 11,
|
|
1507
|
-
* prop3: [8, 12, {aProperty: 1, anotherProperty: true}, 26]
|
|
1508
|
-
* }, {
|
|
1509
|
-
* prop2: {
|
|
1510
|
-
* subprop1: 90,
|
|
1511
|
-
* subprop3: 25
|
|
1512
|
-
* },
|
|
1513
|
-
* prop4: false
|
|
1514
|
-
* }, {
|
|
1515
|
-
* prop5: false,
|
|
1516
|
-
* prop3: [8, 45, {anotherProperty: false, andAnother: true}]
|
|
1517
|
-
* }
|
|
1518
|
-
* );
|
|
1519
|
-
* // {
|
|
1520
|
-
* // prop1: 11,
|
|
1521
|
-
* // prop2: {subprop1: 90, subprop3: 25},
|
|
1522
|
-
* // prop3: [8, 45, {aProperty: 1, anotherProperty: false, andAnother: true}, 26],
|
|
1523
|
-
* // prop4: false,
|
|
1524
|
-
* // prop5: false
|
|
1525
|
-
* // }
|
|
1526
|
-
* ```
|
|
1527
|
-
* @memberof bbn.fn
|
|
1528
|
-
* @returns {Object} The first object argument, merged with the other objects given
|
|
1529
|
-
*/
|
|
1530
|
-
const extend: (...originalArgs: (boolean | object)[]) => any;
|
|
1531
|
-
export { extend };
|
|
1532
|
-
}
|
|
1533
|
-
declare module "fn/ajax/ajax" {
|
|
1534
|
-
/**
|
|
1535
|
-
* Creates an XHR object and returns the Promise.
|
|
1536
|
-
*
|
|
1537
|
-
* Checks the URL, makes an ID, creates a loader, sets the general callbacks,
|
|
1538
|
-
* makes a POST if data is given a GET otherwise (GET data should be added
|
|
1539
|
-
* directly in the URL), and returns the Promise.
|
|
1540
|
-
*
|
|
1541
|
-
* @method ajax
|
|
1542
|
-
* @global
|
|
1543
|
-
* @memberof bbn.fn
|
|
1544
|
-
* @example
|
|
1545
|
-
* ```javascript
|
|
1546
|
-
* // Promise
|
|
1547
|
-
* bbn.fn.ajax(
|
|
1548
|
-
* 'my/location',
|
|
1549
|
-
* 'json',
|
|
1550
|
-
* {id: 7},
|
|
1551
|
-
* d => {
|
|
1552
|
-
* console.log(d);
|
|
1553
|
-
* alert("Success!");
|
|
1554
|
-
* },
|
|
1555
|
-
* err => {
|
|
1556
|
-
* console.log(err);
|
|
1557
|
-
* alert("Failure!");
|
|
1558
|
-
* },
|
|
1559
|
-
* () => {
|
|
1560
|
-
* alert("Request aborted!");
|
|
1561
|
-
* }
|
|
1562
|
-
* )
|
|
1563
|
-
* ```
|
|
1564
|
-
*
|
|
1565
|
-
* @example
|
|
1566
|
-
* ```javascript
|
|
1567
|
-
* // Promise
|
|
1568
|
-
* bbn.fn.ajax('my/location')
|
|
1569
|
-
* .then(
|
|
1570
|
-
* d => {
|
|
1571
|
-
* console.log(d);
|
|
1572
|
-
* alert("Success!");
|
|
1573
|
-
* }
|
|
1574
|
-
* )
|
|
1575
|
-
* .catch(
|
|
1576
|
-
* err => {
|
|
1577
|
-
* }
|
|
1578
|
-
* )
|
|
1579
|
-
* ```
|
|
1580
|
-
*
|
|
1581
|
-
* @param {String} url The URL to be requested by XHR
|
|
1582
|
-
* @param {String} datatype The type of data expected
|
|
1583
|
-
* @param {Object} data The data to send through POST
|
|
1584
|
-
* @param {Function} success The function to execute if the request goes well (200)
|
|
1585
|
-
* @param {Function} failure The function to execute if the request goes bad
|
|
1586
|
-
* @param {Function} abort The function to execute if the request is aborted
|
|
1587
|
-
*
|
|
1588
|
-
* @returns {Promise} The Promise created by the generated XHR.
|
|
1589
|
-
*/
|
|
1590
|
-
const ajax: (url: any, datatype?: any, data?: any, success?: any, failure?: any, abort?: any) => any;
|
|
1591
|
-
export { ajax };
|
|
1592
|
-
}
|
|
1593
|
-
declare module "fn/misc/analyzeFunction" {
|
|
1594
|
-
/**
|
|
1595
|
-
* Analyzes the given function and extracts details about its structure.
|
|
1596
|
-
*
|
|
1597
|
-
* @function analyzeFunction
|
|
1598
|
-
* @param {Function} fn - The function to analyze.
|
|
1599
|
-
* @returns {Object} An object containing details about the function.
|
|
1600
|
-
* @throws {Error} When unexpected syntax is encountered while parsing.
|
|
1601
|
-
*/
|
|
1602
|
-
const analyzeFunction: (fn: any) => {
|
|
1603
|
-
body: any;
|
|
1604
|
-
args: any[];
|
|
1605
|
-
argString: string;
|
|
1606
|
-
isArrow: boolean;
|
|
1607
|
-
hasFunction: boolean;
|
|
1608
|
-
name: any;
|
|
1609
|
-
isAsync: boolean;
|
|
1610
|
-
hash: string;
|
|
1611
|
-
};
|
|
1612
|
-
export { analyzeFunction };
|
|
1613
|
-
}
|
|
1614
|
-
declare module "fn/style/animateCss" {
|
|
1615
|
-
/**
|
|
1616
|
-
* @ignore
|
|
1617
|
-
* @method animateCss
|
|
1618
|
-
* @todo Add method description for animateCss
|
|
1619
|
-
* @global
|
|
1620
|
-
* @memberof bbn.fn
|
|
1621
|
-
* @param {HTMLElement} ele
|
|
1622
|
-
* @param {String} animationName
|
|
1623
|
-
* @param {Function} callback
|
|
1624
|
-
* @returns {*}
|
|
1625
|
-
*/
|
|
1626
|
-
const animateCss: (ele: any, animationName: any, callback: any) => void;
|
|
1627
|
-
export { animateCss };
|
|
1628
|
-
}
|
|
1629
|
-
declare module "fn/convert/arrayBuffer2String" {
|
|
1630
|
-
const arrayBuffer2String: (buf: any) => any;
|
|
1631
|
-
export { arrayBuffer2String };
|
|
1632
|
-
}
|
|
1633
|
-
declare module "fn/object/arrayFromProp" {
|
|
1634
|
-
/**
|
|
1635
|
-
* Creates and returns a new array made of the given property's values from the given array of objects.
|
|
1636
|
-
*
|
|
1637
|
-
* The returned array will always have the same length of the given array, even if the property is not found.
|
|
1638
|
-
*
|
|
1639
|
-
* @method arrayFromProp
|
|
1640
|
-
* @global
|
|
1641
|
-
* @example
|
|
1642
|
-
* ```javascript
|
|
1643
|
-
* bbn.fn.arrayFromProp([
|
|
1644
|
-
* {movie: "Brazil", year: 1985},
|
|
1645
|
-
* {movie: "Donnie Darko", year: 2001},
|
|
1646
|
-
* {movie: "Barry Lindon", year: 1976}
|
|
1647
|
-
* ], "year");
|
|
1648
|
-
* // [1985, 2001, 1976]
|
|
1649
|
-
* ```
|
|
1650
|
-
* @example
|
|
1651
|
-
* ```javascript
|
|
1652
|
-
* bbn.fn.arrayFromProp([
|
|
1653
|
-
* {pupil: "Agnes Varda", grade: {year: "B", month: "A"}},
|
|
1654
|
-
* {pupil: "Jacques Rivette"},
|
|
1655
|
-
* {pupil: "Luc Besson", grade: {year: "C", month: "D"}},
|
|
1656
|
-
* {pupil: "Nicole Garcia", grade: {year: "B", month: "B"}}
|
|
1657
|
-
* ], "grade.month");
|
|
1658
|
-
* // ["A", undefined, "D", "B"]
|
|
1659
|
-
* ```
|
|
1660
|
-
* @memberof bbn.fn
|
|
1661
|
-
* @param {Array} arr
|
|
1662
|
-
* @param {String} prop
|
|
1663
|
-
* @returns {Array} The new array
|
|
1664
|
-
*/
|
|
1665
|
-
const arrayFromProp: (arr: any, prop: any) => any[];
|
|
1666
|
-
export { arrayFromProp };
|
|
1667
|
-
}
|
|
1668
|
-
declare module "fn/object/autoExtend" {
|
|
1669
|
-
/**
|
|
1670
|
-
* Extends the bbn object by passing the namespace and the object it will merge with.
|
|
1671
|
-
*
|
|
1672
|
-
* This function is a self-centric shortcut for adding functions or proerties
|
|
1673
|
-
* to the bbn object itself.
|
|
1674
|
-
*
|
|
1675
|
-
* @method autoExtend
|
|
1676
|
-
* @global
|
|
1677
|
-
* @example
|
|
1678
|
-
* ```javascript
|
|
1679
|
-
* bbn.fn.autoExtend("fn", {myOwnFunction: () => "Result of my own function"});
|
|
1680
|
-
* bbn.fn.myOwnFunction();
|
|
1681
|
-
* // Result of my own function
|
|
1682
|
-
* ```
|
|
1683
|
-
* @example
|
|
1684
|
-
* ```javascript
|
|
1685
|
-
* bbn.fn.autoExtend("env", {serverLanguage: "php"});
|
|
1686
|
-
* bbn.env.sercerLanguage
|
|
1687
|
-
* // php
|
|
1688
|
-
* ```
|
|
1689
|
-
* @example
|
|
1690
|
-
* ```javascript
|
|
1691
|
-
* bbn.fn.autoExtend("myProject", {name: "My Project"});
|
|
1692
|
-
* bbn.myProject.name
|
|
1693
|
-
* // Project
|
|
1694
|
-
* ```
|
|
1695
|
-
* @memberof bbn.fn
|
|
1696
|
-
* @param {String} namespace The bbn property, existing or not, in which the object will be merged
|
|
1697
|
-
* @param {Object} obj The object to merge
|
|
1698
|
-
* @returns {undefined} No return value
|
|
1699
|
-
*/
|
|
1700
|
-
const autoExtend: (namespace: any, obj: any) => void;
|
|
1701
|
-
export { autoExtend };
|
|
1702
|
-
}
|
|
1703
|
-
declare module "fn/string/baseName" {
|
|
1704
|
-
/**
|
|
1705
|
-
* Returns the name of the element indicated by path given to it as an argument.
|
|
1706
|
-
*
|
|
1707
|
-
* @method baseName
|
|
1708
|
-
* @global
|
|
1709
|
-
*
|
|
1710
|
-
* @example
|
|
1711
|
-
* ```javascript
|
|
1712
|
-
* // "file.png"
|
|
1713
|
-
* bbn.fn.baseName('folder/other_folder/file.png');
|
|
1714
|
-
* ```
|
|
1715
|
-
* @example
|
|
1716
|
-
* ```javascript
|
|
1717
|
-
* // "file"
|
|
1718
|
-
* bbn.fn.baseName('folder/other_folder/file.png', '.png');
|
|
1719
|
-
* ```
|
|
1720
|
-
*
|
|
1721
|
-
* @memberof bbn.fn
|
|
1722
|
-
* @param {String} path The path from which the basename must be extracted
|
|
1723
|
-
* @param {String} suffix An optional suffix that will be removed from the basename
|
|
1724
|
-
* @returns {String} The basename of path
|
|
1725
|
-
*/
|
|
1726
|
-
const baseName: (path: string, suffix?: string) => string;
|
|
1727
|
-
export { baseName };
|
|
1728
|
-
}
|
|
1729
|
-
declare module "fn/string/br2nl" {
|
|
1730
|
-
/**
|
|
1731
|
-
* Replaces the html <br> tag with new line characters '\ n' if present in the string.
|
|
1732
|
-
*
|
|
1733
|
-
* @method br2nl
|
|
1734
|
-
* @global
|
|
1735
|
-
*
|
|
1736
|
-
* @example
|
|
1737
|
-
* ```javascript
|
|
1738
|
-
* //"hello
|
|
1739
|
-
* //world!"
|
|
1740
|
-
* bbn.fn.br2nl('hello <br> world!')
|
|
1741
|
-
* ```
|
|
1742
|
-
*
|
|
1743
|
-
* @memberof bbn.fn
|
|
1744
|
-
* @param string st
|
|
1745
|
-
* @returns {String}
|
|
1746
|
-
*/
|
|
1747
|
-
const br2nl: (st: any) => string;
|
|
1748
|
-
export { br2nl };
|
|
1749
|
-
}
|
|
1750
|
-
declare module "fn/datetime/date" {
|
|
1751
|
-
/**
|
|
1752
|
-
* Returns a date object from the given argument.
|
|
1753
|
-
*
|
|
1754
|
-
* @method date
|
|
1755
|
-
* @global
|
|
1756
|
-
*
|
|
1757
|
-
* @example
|
|
1758
|
-
* ``` javascript
|
|
1759
|
-
* //Mon Feb 11 2019 12:00:00 GMT+0100 (Central European Standard Time)
|
|
1760
|
-
* bbn.fn.date('2019/02/11')
|
|
1761
|
-
* ```
|
|
1762
|
-
*
|
|
1763
|
-
* @memberof bbn.fn
|
|
1764
|
-
* @param {String|Number} v
|
|
1765
|
-
* @returns {date}
|
|
1766
|
-
*/
|
|
1767
|
-
const date: (v: any) => any;
|
|
1768
|
-
export { date };
|
|
1769
|
-
}
|
|
1770
|
-
declare module "fn/datetime/fdatetime" {
|
|
1771
|
-
/**
|
|
1772
|
-
* @method fdatetime
|
|
1773
|
-
* @todo Add method description for fdatetime
|
|
1774
|
-
* @global
|
|
1775
|
-
* @memberof bbn.fn
|
|
1776
|
-
* @returns {*}
|
|
1777
|
-
*/
|
|
1778
|
-
const fdatetime: (d: any, wrong_result?: boolean) => any;
|
|
1779
|
-
export { fdatetime };
|
|
1780
|
-
}
|
|
1781
|
-
declare module "fn/datetime/fdate" {
|
|
1782
|
-
/**
|
|
1783
|
-
* @method fdate
|
|
1784
|
-
* @todo Add method description for fdate
|
|
1785
|
-
* @global
|
|
1786
|
-
* @memberof bbn.fn
|
|
1787
|
-
* @param {String|Date} d
|
|
1788
|
-
* @param {String} wrong_result
|
|
1789
|
-
* @returns
|
|
1790
|
-
*/
|
|
1791
|
-
const fdate: (d: any, wrong_result?: boolean) => any;
|
|
1792
|
-
export { fdate };
|
|
1793
|
-
}
|
|
1794
|
-
declare module "fn/datetime/calendar" {
|
|
1795
|
-
/**
|
|
1796
|
-
* Returns a date relative to the current day.
|
|
1797
|
-
*
|
|
1798
|
-
* @method calendar
|
|
1799
|
-
* @global
|
|
1800
|
-
*
|
|
1801
|
-
* @example
|
|
1802
|
-
* ``` javascript
|
|
1803
|
-
* //"2020-04-16 16:15:23"
|
|
1804
|
-
* let date = new Date();
|
|
1805
|
-
* bbn.fn.dateSQL(date,false);
|
|
1806
|
-
* ```
|
|
1807
|
-
*
|
|
1808
|
-
* @memberof bbn.fn
|
|
1809
|
-
* @param {Date|String} d
|
|
1810
|
-
* @param {String | Boolean} wrong_result Whether or not include the time in the date
|
|
1811
|
-
* @returns {String}
|
|
1812
|
-
*/
|
|
1813
|
-
const calendar: (d: any, wrong_result?: boolean) => any;
|
|
1814
|
-
export { calendar };
|
|
1815
|
-
}
|
|
1816
|
-
declare module "fn/ajax/callback" {
|
|
1817
|
-
/**
|
|
1818
|
-
* Executes a serie of predefined actions once an Ajax request has been done.
|
|
1819
|
-
*
|
|
1820
|
-
* Used to treat all the requests functions results, it expects at least url and res to be defined;
|
|
1821
|
-
* The following properties from the object res have direct effects:
|
|
1822
|
-
* - __url__ {String}: if not given it will be automatically defined by the url parameter;
|
|
1823
|
-
* __the given URL will be passed to location.href (without reloading)__
|
|
1824
|
-
* - __prescript__ {String}: if defined it will attempt to evaluate the code contained in the property
|
|
1825
|
-
* - __content__ {String}: if defined and ele is defined too, the string will be inserted as content in the element
|
|
1826
|
-
* - __script__ {String}: if defined it will be evaluated, executed, and its result will be returned
|
|
1827
|
-
* - __data__ {Object}:
|
|
1828
|
-
* - __postscript__ {String}: if defined it will be evaluated and executed
|
|
1829
|
-
* - __error__ {String}: if defined it will be trigger bbn.fn.defaultAlertFunction
|
|
1830
|
-
*
|
|
1831
|
-
* If fn is defined it will be executed after prescript, otherwise it will be bbn.fn.defaultLinkFunction.
|
|
1832
|
-
*
|
|
1833
|
-
* The rest of the function comes executed if either of these results is not empty.
|
|
1834
|
-
*
|
|
1835
|
-
* If fn2 is defined it will be executed after script, otherwise it will be bbn.fn.defaultPostLinkFunction.
|
|
1836
|
-
*
|
|
1837
|
-
* Although not private this function should only be used internally.
|
|
1838
|
-
*
|
|
1839
|
-
* @method callback
|
|
1840
|
-
* @todo Add method description for callback
|
|
1841
|
-
* @global
|
|
1842
|
-
* @memberof bbn.fn
|
|
1843
|
-
*
|
|
1844
|
-
* @param {String} url The URL that has been called
|
|
1845
|
-
* @param {Object} res The object returned by the request
|
|
1846
|
-
* @param {Function} fn A first callback function to execute
|
|
1847
|
-
* @param {Function} fn2 A second callback function to execute
|
|
1848
|
-
* @param {HTMLElement} ele A DOM element where the content will be inserted
|
|
1849
|
-
*
|
|
1850
|
-
* @returns {*} The result of the main callback function: res.script, fn, or bbn.fn.defaultLinkFunction
|
|
1851
|
-
*/
|
|
1852
|
-
const callback: (url: any, res?: any, fn?: any, fn2?: any, ele?: any) => boolean;
|
|
1853
|
-
export { callback };
|
|
1854
|
-
}
|
|
1855
|
-
declare module "fn/string/camelize" {
|
|
1856
|
-
/**
|
|
1857
|
-
* Returns the string passed as an argument in camelize mode.
|
|
1858
|
-
*
|
|
1859
|
-
* A string can be separated for example by a underscore, a dash or space;
|
|
1860
|
-
* so the camelize function will automatically convert them to a single string.
|
|
1861
|
-
*
|
|
1862
|
-
* @method camelize
|
|
1863
|
-
* @global
|
|
1864
|
-
*
|
|
1865
|
-
* @example
|
|
1866
|
-
* ```javascript
|
|
1867
|
-
* //"thisIsATest"
|
|
1868
|
-
* bbn.fn.camelize("this_is-a test");
|
|
1869
|
-
* ```
|
|
1870
|
-
* @memberof bbn.fn
|
|
1871
|
-
* @param {String} str
|
|
1872
|
-
* @returns {String}
|
|
1873
|
-
*/
|
|
1874
|
-
const camelize: (str: any) => any;
|
|
1875
|
-
export { camelize };
|
|
1876
|
-
}
|
|
1877
|
-
declare module "fn/string/camelToCss" {
|
|
1878
|
-
/**
|
|
1879
|
-
* Returns the string passed as an argument in camelize mode for css.
|
|
1880
|
-
*
|
|
1881
|
-
* @method camelToCss
|
|
1882
|
-
* @global
|
|
1883
|
-
*
|
|
1884
|
-
* @example
|
|
1885
|
-
* ```javascript
|
|
1886
|
-
* //"this-is-a-test"
|
|
1887
|
-
* bbn.fn.camelToCss("thisIsATest");
|
|
1888
|
-
* ```
|
|
1889
|
-
*
|
|
1890
|
-
* @memberof bbn.fn
|
|
1891
|
-
* @param {String} str
|
|
1892
|
-
* @returns {String}
|
|
1893
|
-
*/
|
|
1894
|
-
const camelToCss: (str: any) => any;
|
|
1895
|
-
export { camelToCss };
|
|
1896
|
-
}
|
|
1897
|
-
declare module "fn/convert/canvasToImage" {
|
|
1898
|
-
/**
|
|
1899
|
-
* Returns a canvas in a HTML element img
|
|
1900
|
-
* @method canvasToImage
|
|
1901
|
-
* @global
|
|
1902
|
-
* ``` javascript
|
|
1903
|
-
* //<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAgCAYAAABO6BuSAAAUzUlEQVRYRz2ZWXBc95Xef/f27Xtv7w000AsaADdwh0iKlETRtrbYpi3ZsZNUJaOZcs2MPQ95SSaVrSqVqrykUqmkKp4lNfMwM/Ikk1lijxyrrLEkW5QtS6LMVQt3guAGEGiggUbv611T54+xu6rJJtG493/O+b7vfOdc7RuxUmhGoxiageYF6B5E0dFCndD30cKAqGXg+z66pWOnEnRHPYpTBV7+1m+hj2X5P//7L+jeqRBrjUj1QoqRNLrvE8XCwyCMRhgRMHJHRAiIYxJDJ4K8Qhz5GWBkEhC3WFlbYVdhGqfeJuVHsQPUdzU0PM3CsyJ4tklogE2A6zpomkY0ZhOJ6nhaSBjRiVombuCqu/zypf3PL/yTMBKJoPsa/sjBH3rgBwQjF9d16TRbGJbBYNij2WsT6iFDd8gLp7/Ar3/zN/GSMVpbLb73R6/QWVylGMQY1hpMmuOMHBcHjT4OHpCIJcjEEliBRtAf4DsOqWSGdr/HyAwZRaA56hOPx0noUZIYxAYhtgemrxNqOkHE+FXAkgVTCwlch1CPqMJEDANfRwVsmFGCwCMMQ/UOggDtR//6P4a6rqP7EDgumgdaCHg+nuOqyvphQK/XoTPsEUvY1DsNTn/5y+w8uAd9PKO+f/uDy7z//TcZrdSwHQ2n45BIp3ElYF8C1ojqEXAc/N6QGBFSsTgjb8Sm28C0UoxPFbDTGY7Mz3Pr8qe0KxtMECPmhBiehh6CF4ngRyO4UR1NA9330AMfLRJVAUuQEqwe3f4ssW0H620H/Np/+E+hwEEPQgIvwAx1LIE4xt9nRyMMfQICvMAlOZaiUq3w+S9+ga1+m5nD++i02+QzBRZ++iFnX38bYwROb0TUjrHV6+GGPm4YbCfS8dAdh1hgYBkRuqMBVirGrkP7OXj0KOUds8QnClx6/U0+fPMM8UFIwgXLEwpohJoEbBAYusJ5OmKhE4D8qQUEoYaPJMBAi0DMToAWCEkVqrXv/5f/HIZBgDdycEceJjp21CSiRQh9D0KNqGmgR3Vanaa6SavT4uXf+HXabp9qr0EymSQVmhST41z78BKfXviUfL5IbWuLmX1zdAd9esOBuu5kKosVQm2pwtLSQ1zdZ+7wQeYOHSBXKJJIJakuV1i+vcjP/t8bUOuRcMB2NSIBBBoEuo6no3ib0AzMiIFhmEQimqq0YUYwTVv9WxKhS24ExbqO9vZ3/vhXAXuOCI1U2EYHfNdTMBTOur5DvVUnYuhKGL74pdMMQ5fYWBJDkrFeRxv6dDebvP3jM3z80RXFpcT4OC4BumEwOZZlZ2GKQnacWKDjuyP2zB8gVyqgm1Fc31fJ21qvkcLi0jvv0bhbwR4FRPoefn/E0BkxkLfr4PshfndEzDAxDEFkgE+oPkej23CWZAiktVBTXNXO/fCvBGiEfoAWaOoLZsRUwY5GI9zhSAmWF3pKZS0rSiwZozhVUhCPxqNAQC41xvK9hwollco6r73+JnrMZBh4dIcDBSdLbt4dYnge+6d3Mj9/iGe++CxO4NF3XFw/JJMZI5fIovVd7l25QT6awRz66AMfdzBkNBhuB+06eJ5HMPQx9CiO49BsNmk3mgyHQ/UzeacSSXwRz6HLyBmgXfjxdxWHJQMiChHNUH8PekP6vY66kG2bZLMZVeXBaEgqlSCejpPPT7CyusRseUrdtFarce4XF1l8+JBWr8+Z994lm5+gVt/Ctm1mSmVioQ6DIY8fOMwLzz9DOpdR7SU7llO867UH7JiaZfHGAr2NJtlIDNuPIJgT9ClYahqBgiuM+h521FKf+/2+SoigU4mVD51Oh2F/QLfVpdtuoV1977VQSi6V6Xe6DPtD1ZaEE9GIQSqVYqu+iWWZmKYhlFZipkU1ds6WWVpcIJtJEYsnGToe12/eYml1lbfefYfKxiaT5RJ3794nk0kxv28fq/cesnuqzKkTT1IuFnj+hc8qfnt+oEROojcjUT4+9zFxw8bWTEbtHk5/SMKyFVRFQwS6k/kCth0nYpjYpqUq22q0MXSdRCwOfkjMklRp+I7PcNRHu3X270LJQrvdVYFKr5Q+GCGiILGy/IioGaFQyBONRhgMBmzUqgShx7HHDnPrysdkUkl27Znj+u0F7j5cYml1hffPn1OGQoLodLt02k12l6fZXF2jPDnJP//m72CbOsXCBPv375Wz0ZF2ZafYXK/x0zM/wx0GtBttVbVBt690NhLRGbkOZsykWCpTmpkhm82qt7TRfqdPzLaZyOSwLIt0LKXi8F1ftVjt5s9fD4Xsnucr3gYBGJquVE4CfLS0jB0zyWTSCtry3WvXr7C4uMDeXTthNGRu107agwEeIWubNWrNOj95910erVbYtXs316/f4qknj7F8/z4bK22+8qXPUMwXmD+wl3w+zdHHDrO50WCr0aGQn+LDDy/w8/fOMhx4tNpdwhDava6CbBhKe/QV2jK5cdK5HIVCgVK+QDKeIJPKMF2aojRZVAFLe5UieW6AaZpo1376WigwsaKWykCvN8AZDIlEosRiMfXlmGUqJTYM6YQBZ8++zwcffMBMKc9sqcBnnz6llDhi2bz2xt9R3rGDv/6b7zI1M836+jr1zRqF/ARWJMLqoxVeeO4ZJsbHmCpOUi7lsE2DtUoVy0pQzM/w6g9+yK3bi3T6DoOhCKON4/r0hj3FX1/6ujdSajzyHdLpNKlkkuJkkaOH5jl04DCTuQlipo1kq9PuEYaa6gDatTOvhYL9AE0Ji23FFeal0mI4JKvZdBLD0BkM+wz7PS5eOs+1K1fZN7ebmVJBZS4/VeLR2hrvnn2fr339H/PK//pzXnjh83zvr/6G9UqFbDrF/n1zrK2s8OJLX1Ktbv7QfvxRF2c0UM46m5nAGYX86I23qTc6rKxv0h6MlH/3xVCEHrGYhR7RGI0GBL67rSeapooUtxMc3n+A/XsPsHNmlumpGZLJFMPeUImY6JH2yVuvho4nBlvfhkDEVBeIx5MqI5IM35VM9+iJyumw/PABN2/eZHwsQ7O+Qahr9EdDDDtGIptmLJtT6BAH9nDxHjeuXuPpkycZz2a4fuMqJ04c560zb/HM506yY7ZILGqQScq1ely9coubN+8ycAPuL6+gW3GMmMXI93B9D9uMoimP6WHo0l1cdC2kudVkNPDJpVMU8nkeP/I4zz/7HIVCCV8cpGkrbdI++ckPQjEFsVgCGSL6/aEKMplIMTGZU9Vr1bfo9Tu4oyF2zKJR2+TcuXOsr1dYfLDIY0eOELUtJosldbBLlz7iX/3L32Xt0Qp/9Ad/yEyxyOPHjnHyySdY31hjbWMND5/sWBJNG5FOxDF1m5WlClc/uclmrcX9BxVagyH56WmVSMd1GTgDQt9lNOyj+yHZVBycIVZEo91s4zkOlljNEOYPPcbXvvaP2Lf3AJZlq/iEutrt998KhbsSWCKVUdXt9Xo4jqcSoIge+IonoszOcMDa2hpn33+P24t32HfoIENnwLPPP8dGrcathZu4jsOTxx9nZnqaP/79P1SW8tf+6T9jc3OTO3cX+fjKp6zXqszuKLN3bppkPIahmYg1a9S7rK3Xef1HP8OwDYrlaWKppDqLJz6g16XbbCirWMiNYRIgtnrU6xONbLenRm2LwmSRF09/ic997lmS6SyJRBIEEa2Fj8J6va4a99hYTl242W4pVRNIi/GIaDqLi4vq8+H5g7TbbS5fvkyvP2R65y4uXrxIt9fkt377G3zw/jtU1h6xd88Ojswf5s9feYW9e+b4F7/7b/n3/+bfMbtjN49Wqzx18hTtTp0zP/4hG9VVchNFDh6Yp9bscOHSp6xX60TtuDrXxMSEsrSa7yF+Y9CRXhsyO1NWVROtkYDFLI1nsmpIEed49OhRXn75ZaamZ2i1WtjxGNryuXfCsYmcqkK1tkm1WlXeM5lMKx4K0UXMpFdvbW2RiKdIZ5IsPXzE5Y8/otntK5v5ve/+Nb434Pf+x3+lUnnID77/f/nqV19irVJhfGyCVrPLu++dpVSeZdfO/cw/doQb16+xvnqXpQf36fT6YJjUWwOqtTrdvoMfhOr+YxKEjKmeg21EwHOI6JCTCtuWapUDCbjbYyKXU/7fGY7Ys2cPzz33HEcfP6aQO5RFQe36xbDT66ov6EZEZUsatTiUTCaj/LRAfnx8XGW71+6RTMZZXl7he99/leT4OOXpaXxvyBs/+iE6Hom4RbddZ3aHwDXBoD/i6vUbvPTSV/nGb36Tsx+c50//7DtSBp55+rhS3Ga7w/0Hy9y5v0RPWpEps7LP5OSkMhW4PsNeC1M2G4amAhZfn8qkt1V6OKLbbpNNZ1TxBv0++Xxe/e6LL75IuVym1++jrV07H969e1cZ71KpxEy5rMYpxWsjquArcJYqT5VLWEZUXURucufuPaqNBoVSnlKxwO3bN3nt1b/lyNFDpONxqtU1njh+gm9/+/dJplN02l1qjSarK5uUZ6Z47tnPsGdmmnKpgGHafPTpVd58+6fcf7iMJ23IC5mZmVHnipkW7WadUa+j5mgruu2lJ/J54smEssH1Wo3A89UAJDoiVJAYTp8+zfHjx4lEDbR7l95TKx5Z50im43aMsbExJf29dkcNDQJzuYD4YbmYwFtdOBGj57ps1mrEbJPp6Wnu3l5QQ0Wv2ebPXvkThRCp0te//nX+8i//guXVClNTU+zYuZOt2gajTpt0Mkk8maa2VefarTtUN2tiY8TpKk3ZvXMXhckc7VaTerWKGY2QTgq/A/KlIrlcjlx2TInpxnpV7eIMPUK5NKViOHDgAE888QTjkxNoGwtXQk32QkGAMxopOMu/pbfJa/H2bXbt2kXm781H3LLpdsUsjEiPj3Hv0RJvvPUmhw/O89RTTymxiOpRxnbv5jv/7b/Tbjf51re+xdbWJucvn+fpp59Sq5dqdZ12s8Wo0+Hm1WvcvfeApnjuXp92t0+7M6DR7qvlXblcpDxVwh0OVEtMJWJM5sYVyrLjY6THsspabmxssHTvvmqrMjzsnN2BFoRKi0TABNZar/IgrG6sq1aUsC2VUTEZooYiGJ7rKOUT87+6+khdIJGMKZNixmx67ohzly4y6A7UiPjFz59GDzVMw+Lq1asc2DtHPBFTM7S4tcraMpc/vry9PgoCwqHL5fMXuHHzNgPHQfYyoSzqvEB1gdFwqDy96Imhge+MKBUmKRWK+IGHZdsqcEGR0G91aXnbR8QTzM7MMOz1VWv9zNOntgMOO5shAulen3pjS01M2WwaSyAjA2UY0tiosrb6iGZ9SyVkYnJcCUOj22R5vcLySkVNKeJXT544ydGjx+g1trePWuirRJVmpjhz5i26gxatVlOZiFwmzfpShWqlqtqGBCzDgidjXSyGYdnq8M1mXe2zbFk+2Ca7ZncwVSoquggOBXGiK0LLzY0Nta4SzZGkeK6rIP8PX/oKs7OzaJWFa2p4ENFynCGtZoODB/eTjMXxA1e5q/PnfsHlyxe5t7igLlooTBI1DLWY002dTm9A3IozMZHHH/k4jsvhvfM888wz6jD9QZeLF89z4+ZVIrIgMba3iBPZMfqNLtlURvXTlco6D5YeokeiqivIcCDDhwQmBxfOCrV2795NPpfbnn9bbeUPpMpCR9EXYaMacTVNBSsLgFMnn+bUqVNoreV7ykvLaChZXVp6oMy5cHVyMkejucUf/N63SaWTLC0tqSoL36dnpkgkk0TjJlHTVmCYKkzR2GoogVtdXlXzqQig3LzRrLG5tYFs4gSiYlEnx3OkrQS+G6hD15tS/ZY6R0ZaESjz8+DBA2qbVfUdz3OIx2IUiwVy2XGVDBFVme7Gx7Mq+XLmfC7P3NxutW4SJ3f8+BPs2zeH5m9WQ1mgjXpdtpoNlpeXGRvLKCsp20rJ8Hf+9E+IJ2zeeecdZmbK3Lt3Tz0xmD96RJmRQqmo1P3Q/oNsVjewTJOl+w+UgdnarGFaUTzfV5WWRb4cTNrS1GSJTr2tYCj8EygLZSRJskaSxMpbLKn8rrTKVquhEimJSCYS6KGMrQYj12cw6BG1bHV90YJWu8Heuf0cO/oYJ0+eojhVRBs8Wg7tdErBpddqKfGaLBbQDIP6ZpWFhQUuXDyvAv/bV1/lyadOKPmXG8vgLT8X6ApfpJUZocbBQwfYqq5z48YN1itrJBIJ8sWCamuyV5bZWlAhra2+scnm+qYaQ0UIZfwTgZKAxATJZwXddoOVlRVVTRE/mX4EqhPjk+rMruuTTCdIpjJq4RiJyh4uzeOPn+Cznz3F3Nw+1X206vVroazw84UCqMCVCiij7fuu2hDeunWLO3fucOHyBSqVilrWabrOtWvXlBLi+8rXyqrm9OefVw5o7dEyn3zyEbG4pR6niOuJRi3WqpusVTdoNdt0O2IionTbHcVBCVgIKNsMgbW8hOtSWYFzo9FQkDflkYoepdtq0+8OGB8bw44l1D5aNy0iZoTdc3t54qkTHD70GHvmdim3d//BXbStGzdCWW6LaDxaWVHiJQ+hDj02T2pyUjq/PMWiX6+r/xfIN1pNVQGB4UeXLnP+Fx8SFTM/O8XXvvJlms2aspr12qY6oHBY1yPUm10ePFzh0fIKw6GHGbVJxIX/rrq/vGQakplbYKr4KvxvbOuG3P+XVlf+P2bF2VnewaFDh1Rvr7eapMayTE2XyU7kGMuNq7FVUCLUk7Nr4dp6iBFRcH7zJz9mZXVVwe/Z5/+BUsr1japyKM1WCytmq6cI3X6PMEAN2mPJNGHgs1Wt8PP3zmBHIZGMYkZ1FhZucG9xUT3uGLoeriPMN6hvdWh3+qpXxmP2r7YW4vSG/b4SNV2TFWtLwVmClTOJAZJ+WyqX2bdvH9NTUxTzZdpbddbW18lMjFM8eAA8l2Gviz0xjtPrYgpyfvkwLRw5If2+quSju3cUV4WjpfIUVizBkSeO8/DhEpP5Io7vsXjvjvK30vdaggZ0XGdE3DawTI3axiq3F67TaddJJhNqfbO2VuXC+YtUN+rkJ8sEga4CTidT8rQI1x2p3ik8llaoVjFhQG1rU/H/+IkTyg/vO3hAmQhJgKCrWlljx8wOxeFPrnxKrVHn6LFj7JjbjS+otUwsO67alax4hDL/H0xJ7BFdZf6MAAAAAElFTkSuQmCC">
|
|
1904
|
-
* let a = '<canvas width="60" height="32"></canvas>';
|
|
1905
|
-
* bbn.fn.canvasToImage(a);
|
|
1906
|
-
* ```
|
|
1907
|
-
*
|
|
1908
|
-
* @memberof bbn.fn
|
|
1909
|
-
* @param {canvas} canvas
|
|
1910
|
-
* @returns {HTMLElement}
|
|
1911
|
-
*/
|
|
1912
|
-
const canvasToImage: (canvas: any) => HTMLImageElement;
|
|
1913
|
-
export { canvasToImage };
|
|
1914
|
-
}
|
|
1915
|
-
declare module "fn/style/center" {
|
|
1916
|
-
/**
|
|
1917
|
-
* Centers the given element by giving it a position absolute.
|
|
1918
|
-
*
|
|
1919
|
-
* @method center
|
|
1920
|
-
* @global
|
|
1921
|
-
* @example
|
|
1922
|
-
* ```javascript
|
|
1923
|
-
* //<div style="position: absolute; top: 73px; left: 0px;">Documentation</div>
|
|
1924
|
-
* bbn.fn.center('<div>Documentation</div>')
|
|
1925
|
-
* ```
|
|
1926
|
-
* @memberof bbn.fn
|
|
1927
|
-
* @param {HTMLElement} ele
|
|
1928
|
-
* @returns {HTMLElement} The dom element with the new style.
|
|
1929
|
-
*/
|
|
1930
|
-
const center: (ele: any) => any;
|
|
1931
|
-
export { center };
|
|
1932
|
-
}
|
|
1933
|
-
declare module "fn/object/checkPropsDetails" {
|
|
1934
|
-
const checkPropsDetails: (obj: object, props: string | string[], checkEmpty?: boolean) => BbnResError;
|
|
1935
|
-
export { checkPropsDetails };
|
|
1936
|
-
}
|
|
1937
|
-
declare module "fn/object/checkProps" {
|
|
1938
|
-
const checkProps: (obj: object, props: string | string[], checkEmpty?: boolean) => boolean;
|
|
1939
|
-
export { checkProps };
|
|
1940
|
-
}
|
|
1941
|
-
declare module "fn/object/checkPropsOrDie" {
|
|
1942
|
-
const checkPropsOrDie: (obj: object, props: string | string[], checkEmpty?: boolean) => boolean;
|
|
1943
|
-
export { checkPropsOrDie };
|
|
1944
|
-
}
|
|
1945
|
-
declare module "fn/object/clone" {
|
|
1946
|
-
/**
|
|
1947
|
-
* Creates and returns a perfect clone - but different - from the given object.
|
|
1948
|
-
*
|
|
1949
|
-
* @method clone
|
|
1950
|
-
* @global
|
|
1951
|
-
* @example
|
|
1952
|
-
* ```javascript
|
|
1953
|
-
* let obj = {name: "Thomas"};
|
|
1954
|
-
* let objCopy = bbn.fn.clone(obj);
|
|
1955
|
-
* obj.name = "Julie";
|
|
1956
|
-
* // obj: {name: "Julie"}
|
|
1957
|
-
* // objCopy: {name: "Thomas"}
|
|
1958
|
-
* ```
|
|
1959
|
-
* @memberof bbn.fn
|
|
1960
|
-
* @param {Object} obj The source object
|
|
1961
|
-
* @returns {Object} A new object
|
|
1962
|
-
*/
|
|
1963
|
-
const clone: (obj: any) => any;
|
|
1964
|
-
export { clone };
|
|
1965
|
-
}
|
|
1966
|
-
declare module "fn/convert/colorToHex" {
|
|
1967
|
-
/**
|
|
1968
|
-
* Returns the hex color of the given rgb or color name.
|
|
1969
|
-
* @method colorToHex
|
|
1970
|
-
* @global
|
|
1971
|
-
* @example
|
|
1972
|
-
* ```javascript
|
|
1973
|
-
* //"#ff0000"
|
|
1974
|
-
* bbn.fn.colorToHex('red');
|
|
1975
|
-
* ```
|
|
1976
|
-
*
|
|
1977
|
-
* @example
|
|
1978
|
-
* ```javascript
|
|
1979
|
-
* //"#ff0000"
|
|
1980
|
-
* bbn.fn.colorToHex('rgb(255,0,0)');
|
|
1981
|
-
* ```
|
|
1982
|
-
* @memberof bbn.fn
|
|
1983
|
-
* @returns {String}
|
|
1984
|
-
*/
|
|
1985
|
-
const colorToHex: (color: any) => string | CanvasGradient | CanvasPattern;
|
|
1986
|
-
export { colorToHex };
|
|
1987
|
-
}
|
|
1988
|
-
declare module "fn/browser/copy" {
|
|
1989
|
-
/**
|
|
1990
|
-
* Copies to the clipboard the value of the given string.
|
|
1991
|
-
* @method copy
|
|
1992
|
-
* @global
|
|
1993
|
-
* ``` javascript
|
|
1994
|
-
* let myVal = 'the value you want to copy to clipbord';
|
|
1995
|
-
* bbn.fn.copy(myVal);
|
|
1996
|
-
*
|
|
1997
|
-
* ```
|
|
1998
|
-
* @memberof bbn.fn
|
|
1999
|
-
* @param {String} st The string to copy.
|
|
2000
|
-
* @returns
|
|
2001
|
-
*/
|
|
2002
|
-
const copy: (st: any) => Promise<unknown>;
|
|
2003
|
-
export { copy };
|
|
2004
|
-
}
|
|
2005
|
-
declare module "fn/object/count" {
|
|
2006
|
-
/**
|
|
2007
|
-
* Counts the number of objects matching the given filter in the given array.
|
|
2008
|
-
*
|
|
2009
|
-
* The arguments follow the same scheme as bbn.fn.search.
|
|
2010
|
-
*
|
|
2011
|
-
* @method count
|
|
2012
|
-
* @global
|
|
2013
|
-
* @example
|
|
2014
|
-
* ```javascript
|
|
2015
|
-
* let ar = [
|
|
2016
|
-
* {name: "Raiders of the lost ark", director: "Steven Spielberg", year: 1981, id: 589},
|
|
2017
|
-
* {name: "Goonies", director: "Richard Donner", year: 1985, id: 689},
|
|
2018
|
-
* {name: "Star wars", director: "George Lucas", year: 1977, id: 256},
|
|
2019
|
-
* {name: "Jaws", director: "Steven Spielberg", year: 1975, id: 423}
|
|
2020
|
-
* ];
|
|
2021
|
-
* bbn.fn.count(ar, "id", 256);
|
|
2022
|
-
* // 1
|
|
2023
|
-
* bbn.fn.count(ar, {director: "Steven Spielberg"});
|
|
2024
|
-
* // 2
|
|
2025
|
-
* bbn.fn.search(ar, "year", 1975, ">");
|
|
2026
|
-
* // 3
|
|
2027
|
-
* // Complex filters: all the movies from Spielberg between 1974 and 1980
|
|
2028
|
-
* bbn.fn.search(ar, {
|
|
2029
|
-
* logic: "AND",
|
|
2030
|
-
* conditions: [
|
|
2031
|
-
* {
|
|
2032
|
-
* field: "director",
|
|
2033
|
-
* operator: "eq",
|
|
2034
|
-
* value: "Steven Spielberg"
|
|
2035
|
-
* }, {
|
|
2036
|
-
* logic: "AND",
|
|
2037
|
-
* conditions: [
|
|
2038
|
-
* {
|
|
2039
|
-
* field: "year",
|
|
2040
|
-
* operator: ">=",
|
|
2041
|
-
* value: 1974
|
|
2042
|
-
* }, {
|
|
2043
|
-
* field: "year",
|
|
2044
|
-
* operator: "<=",
|
|
2045
|
-
* value: 1980
|
|
2046
|
-
* }
|
|
2047
|
-
* ]
|
|
2048
|
-
* }
|
|
2049
|
-
* ]
|
|
2050
|
-
* });
|
|
2051
|
-
* // 1
|
|
2052
|
-
* ```
|
|
2053
|
-
* @memberof bbn.fn
|
|
2054
|
-
* @param {Array} arr The subject array
|
|
2055
|
-
* @param {(String|Object|Function)} prop A property's name or a filter object or function
|
|
2056
|
-
* @param {*} val The value with which comparing the given property
|
|
2057
|
-
* @param {String} operator The operator to use for comparison with the value as used in bbn.fn.compare
|
|
2058
|
-
* @returns {Number} The number of items
|
|
2059
|
-
*/
|
|
2060
|
-
const count: (arr: any[], prop: object | string, val?: any, operator?: string) => number;
|
|
2061
|
-
export { count };
|
|
2062
|
-
}
|
|
2063
|
-
declare module "fn/string/crc32" {
|
|
2064
|
-
const crc32: (str: any) => number;
|
|
2065
|
-
export { crc32 };
|
|
2066
|
-
}
|
|
2067
|
-
declare module "fn/object/createObject" {
|
|
2068
|
-
const createObject: (...args: any[]) => any;
|
|
2069
|
-
export { createObject };
|
|
2070
|
-
}
|
|
2071
|
-
declare module "fn/style/cssExists" {
|
|
2072
|
-
/**
|
|
2073
|
-
* not used
|
|
2074
|
-
* @ignore
|
|
2075
|
-
* @method cssExists
|
|
2076
|
-
* @todo Add method description for cssExists
|
|
2077
|
-
* @global
|
|
2078
|
-
* @memberof bbn.fn
|
|
2079
|
-
* @param {String} f
|
|
2080
|
-
* @returns
|
|
2081
|
-
*/
|
|
2082
|
-
const cssExists: (f: any) => boolean;
|
|
2083
|
-
export { cssExists };
|
|
2084
|
-
}
|
|
2085
|
-
declare module "fn/datetime/dateSQL" {
|
|
2086
|
-
/**
|
|
2087
|
-
* Returns a date with SQL format.
|
|
2088
|
-
*
|
|
2089
|
-
* @method dateSQL
|
|
2090
|
-
* @global
|
|
2091
|
-
*
|
|
2092
|
-
* @example
|
|
2093
|
-
* ``` javascript
|
|
2094
|
-
* //"2020-04-16 16:15:23"
|
|
2095
|
-
* let date = new Date();
|
|
2096
|
-
* bbn.fn.dateSQL(date,false);
|
|
2097
|
-
* ```
|
|
2098
|
-
*
|
|
2099
|
-
* @memberof bbn.fn
|
|
2100
|
-
* @param {Date|String} v
|
|
2101
|
-
* @param {Boolean} dayOnly Whether or not include the time in the date
|
|
2102
|
-
* @returns {String}
|
|
2103
|
-
*/
|
|
2104
|
-
const dateSQL: (v: any, dayOnly: any) => any;
|
|
2105
|
-
export { dateSQL };
|
|
2106
|
-
}
|
|
2107
|
-
declare module "fn/datetime/daysInMonth" {
|
|
2108
|
-
/**
|
|
2109
|
-
* Returns the number of days of the month given in the date.
|
|
2110
|
-
* @method daysInMonth
|
|
2111
|
-
* @global
|
|
2112
|
-
*
|
|
2113
|
-
* @example
|
|
2114
|
-
* ``` javascript
|
|
2115
|
-
* //30
|
|
2116
|
-
* bbn.fn.daysInMonth(new Date());
|
|
2117
|
-
* ```
|
|
2118
|
-
*
|
|
2119
|
-
* @memberof bbn.fn
|
|
2120
|
-
* @param {String|Date} v
|
|
2121
|
-
* @returns {Number}
|
|
2122
|
-
*/
|
|
2123
|
-
const daysInMonth: (v: any) => number | false;
|
|
2124
|
-
export { daysInMonth };
|
|
2125
|
-
}
|
|
2126
|
-
declare module "fn/object/deepPath" {
|
|
2127
|
-
/**
|
|
2128
|
-
* Retrieves all elements of a hierarchical array corresponding to the filter.
|
|
2129
|
-
*
|
|
2130
|
-
* The arguments follow the same scheme as bbn.fn.search.
|
|
2131
|
-
*
|
|
2132
|
-
* @method findAll
|
|
2133
|
-
* @global
|
|
2134
|
-
* @example
|
|
2135
|
-
* ```javascript
|
|
2136
|
-
* let ar = [
|
|
2137
|
-
* {name: "Raiders of the lost ark", director: "Steven Spielberg", year: 1981, id: 589},
|
|
2138
|
-
* {name: "Goonies", director: "Richard Donner", year: 1985, id: 689},
|
|
2139
|
-
* {name: "Star wars", director: "George Lucas", year: 1977, id: 256},
|
|
2140
|
-
* {name: "Jaws", director: "Steven Spielberg", year: 1975, id: 423}
|
|
2141
|
-
* ];
|
|
2142
|
-
* bbn.fn.count(ar, "id", 256);
|
|
2143
|
-
* // 1
|
|
2144
|
-
* bbn.fn.count(ar, {director: "Steven Spielberg"});
|
|
2145
|
-
* // 2
|
|
2146
|
-
* bbn.fn.search(ar, "year", 1975, ">");
|
|
2147
|
-
* // 3
|
|
2148
|
-
* // Complex filters: all the movies from Spielberg between 1974 and 1980
|
|
2149
|
-
* bbn.fn.search(ar, {
|
|
2150
|
-
* logic: "AND",
|
|
2151
|
-
* conditions: [
|
|
2152
|
-
* {
|
|
2153
|
-
* field: "director",
|
|
2154
|
-
* operator: "eq",
|
|
2155
|
-
* value: "Steven Spielberg"
|
|
2156
|
-
* }, {
|
|
2157
|
-
* logic: "AND",
|
|
2158
|
-
* conditions: [
|
|
2159
|
-
* {
|
|
2160
|
-
* field: "year",
|
|
2161
|
-
* operator: ">=",
|
|
2162
|
-
* value: 1974
|
|
2163
|
-
* }, {
|
|
2164
|
-
* field: "year",
|
|
2165
|
-
* operator: "<=",
|
|
2166
|
-
* value: 1980
|
|
2167
|
-
* }
|
|
2168
|
-
* ]
|
|
2169
|
-
* }
|
|
2170
|
-
* ]
|
|
2171
|
-
* });
|
|
2172
|
-
* // 1
|
|
2173
|
-
* ```
|
|
2174
|
-
* @memberof bbn.fn
|
|
2175
|
-
* @todo Do the doc!
|
|
2176
|
-
* @param {Array} arr The subject array
|
|
2177
|
-
* @param {(String|Object|Function)} prop A property's name or a filter object or function
|
|
2178
|
-
* @param {*} val The value with which comparing the given property
|
|
2179
|
-
* @param {String} operator The operator to use for comparison with the value as used in bbn.fn.compare
|
|
2180
|
-
* @returns {Number} The number of items
|
|
2181
|
-
*/
|
|
2182
|
-
const deepPath: (arr: any[], filter: object, deepProperty: string, res?: any[]) => false | any[];
|
|
2183
|
-
export { deepPath };
|
|
2184
|
-
}
|
|
2185
|
-
declare module "fn/default/defaultAjaxAbortFunction" {
|
|
2186
|
-
const defaultAjaxAbortFunction: (message: any, url?: string) => void;
|
|
2187
|
-
export { defaultAjaxAbortFunction };
|
|
2188
|
-
}
|
|
2189
|
-
declare module "fn/default/defaultAjaxErrorFunction" {
|
|
2190
|
-
const defaultAjaxErrorFunction: (jqXHR: any, textStatus?: any, errorThrown?: any) => void;
|
|
2191
|
-
export { defaultAjaxErrorFunction };
|
|
2192
|
-
}
|
|
2193
|
-
declare module "fn/default/defaultAlertFunction" {
|
|
2194
|
-
const defaultAlertFunction: (msg: any, title?: any) => void;
|
|
2195
|
-
export { defaultAlertFunction };
|
|
2196
|
-
}
|
|
2197
|
-
declare module "fn/default/defaultConfirmFunction" {
|
|
2198
|
-
const defaultConfirmFunction: (text: any, yesFn: any, noFn?: any) => void;
|
|
2199
|
-
export { defaultConfirmFunction };
|
|
2200
|
-
}
|
|
2201
|
-
declare module "fn/default/defaultEndLoadingFunction" {
|
|
2202
|
-
const defaultEndLoadingFunction: (url: any, timestamp: any, data?: any, res?: any) => boolean;
|
|
2203
|
-
export { defaultEndLoadingFunction };
|
|
2204
|
-
}
|
|
2205
|
-
declare module "fn/default/defaultErrorFunction" {
|
|
2206
|
-
const defaultErrorFunction: (message: any) => void;
|
|
2207
|
-
export { defaultErrorFunction };
|
|
2208
|
-
}
|
|
2209
|
-
declare module "fn/default/defaultHistoryFunction" {
|
|
2210
|
-
const defaultHistoryFunction: (obj: any) => boolean;
|
|
2211
|
-
export { defaultHistoryFunction };
|
|
2212
|
-
}
|
|
2213
|
-
declare module "fn/default/defaultLinkFunction" {
|
|
2214
|
-
const defaultLinkFunction: (responseObj: any, ele: any) => boolean;
|
|
2215
|
-
export { defaultLinkFunction };
|
|
2216
|
-
}
|
|
2217
|
-
declare module "fn/default/defaultPostLinkFunction" {
|
|
2218
|
-
const defaultPostLinkFunction: (r: any, ele?: any) => boolean;
|
|
2219
|
-
export { defaultPostLinkFunction };
|
|
2220
|
-
}
|
|
2221
|
-
declare module "fn/default/defaultPreLinkFunction" {
|
|
2222
|
-
const defaultPreLinkFunction: (url: any, force?: boolean, ele?: any) => boolean;
|
|
2223
|
-
export { defaultPreLinkFunction };
|
|
2224
|
-
}
|
|
2225
|
-
declare module "fn/default/defaultResizeFunction" {
|
|
2226
|
-
const defaultResizeFunction: () => boolean;
|
|
2227
|
-
export { defaultResizeFunction };
|
|
2228
|
-
}
|
|
2229
|
-
declare module "fn/default/defaultStartLoadingFunction" {
|
|
2230
|
-
const defaultStartLoadingFunction: (url: any, tst: any, data?: any, requestId?: any) => boolean;
|
|
2231
|
-
export { defaultStartLoadingFunction };
|
|
2232
|
-
}
|
|
2233
|
-
declare module "fn/object/deleteProp" {
|
|
2234
|
-
/**
|
|
2235
|
-
* Gets the given property from the given object
|
|
2236
|
-
* @param {Object} obj
|
|
2237
|
-
* @param {String} prop
|
|
2238
|
-
* @returns
|
|
2239
|
-
*/
|
|
2240
|
-
const deleteProp: (obj: object, prop: string) => void;
|
|
2241
|
-
export { deleteProp };
|
|
2242
|
-
}
|
|
2243
|
-
declare module "fn/type/isValue" {
|
|
2244
|
-
/**
|
|
2245
|
-
* Returns true if the given argument is not null or type object or array.
|
|
2246
|
-
* @method isValue
|
|
2247
|
-
* @deprecated
|
|
2248
|
-
* @see bbn.fn.isPrimitive
|
|
2249
|
-
* @example
|
|
2250
|
-
* ```javascript
|
|
2251
|
-
* bbn.fn.isValue('myString');
|
|
2252
|
-
* //true
|
|
2253
|
-
* ```
|
|
2254
|
-
* @example
|
|
2255
|
-
* ```javascript
|
|
2256
|
-
* bbn.fn.isValue(6);
|
|
2257
|
-
* //true
|
|
2258
|
-
* ```
|
|
2259
|
-
* @example
|
|
2260
|
-
* ```javascript
|
|
2261
|
-
* bbn.fn.isValue([80,10,22]);
|
|
2262
|
-
* //false
|
|
2263
|
-
* ```
|
|
2264
|
-
* @global
|
|
2265
|
-
* @memberof bbn.fn
|
|
2266
|
-
* @returns {Boolean}
|
|
2267
|
-
*/
|
|
2268
|
-
const isValue: (...args: any[]) => boolean;
|
|
2269
|
-
export { isValue };
|
|
2270
|
-
}
|
|
2271
|
-
declare module "fn/object/diffObj" {
|
|
2272
|
-
/**
|
|
2273
|
-
* Returns an object describing the differences for transforming the first given object into the second.
|
|
2274
|
-
*
|
|
2275
|
-
* The returned data will use the objects properties as keys. If unchanged is set to true, all the
|
|
2276
|
-
* properties will be returned, otherwise only the different ones. Each of these keys will have the
|
|
2277
|
-
* following properties:
|
|
2278
|
-
* - type: can be _modified_, _created_, _deleted_, and if unchanged is set to true _unchanged_
|
|
2279
|
-
* - data: the first object's property's value, or the second if type is _created_
|
|
2280
|
-
* - newData: the second object's property's value in case of type _updated_
|
|
2281
|
-
*
|
|
2282
|
-
* @method diffObj
|
|
2283
|
-
* @global
|
|
2284
|
-
* @example
|
|
2285
|
-
* ```javascript
|
|
2286
|
-
* bbn.fn.diffObj(
|
|
2287
|
-
* {
|
|
2288
|
-
* name: "Thomas",
|
|
2289
|
-
* age: 45
|
|
2290
|
-
* }, {
|
|
2291
|
-
* name: "Eva",
|
|
2292
|
-
* sex: "Female",
|
|
2293
|
-
* retired: false
|
|
2294
|
-
* }
|
|
2295
|
-
* );
|
|
2296
|
-
* // {
|
|
2297
|
-
* // name: {
|
|
2298
|
-
* // type: "updated",
|
|
2299
|
-
* // data: "Thomas",
|
|
2300
|
-
* // newData: "Eva"
|
|
2301
|
-
* // },
|
|
2302
|
-
* // age: {
|
|
2303
|
-
* // type: "deleted",
|
|
2304
|
-
* // data: 45
|
|
2305
|
-
* // },
|
|
2306
|
-
* // sex: {
|
|
2307
|
-
* // type: "created",
|
|
2308
|
-
* // data: "Female"
|
|
2309
|
-
* // },
|
|
2310
|
-
* // retired: {
|
|
2311
|
-
* // type: "created",
|
|
2312
|
-
* // data: false
|
|
2313
|
-
* // }
|
|
2314
|
-
* // }
|
|
2315
|
-
* ```
|
|
2316
|
-
* @example
|
|
2317
|
-
* ```javascript
|
|
2318
|
-
* bbn.fn.diffObj(
|
|
2319
|
-
* {pupil: "Agnes Varda", grade: {year: "B", month: "A"}},
|
|
2320
|
-
* {pupil: "Luc Besson", grade: {year: "C", month: "D"}}
|
|
2321
|
-
* );
|
|
2322
|
-
* // {
|
|
2323
|
-
* // "pupil": {
|
|
2324
|
-
* // "type": "updated",
|
|
2325
|
-
* // "data": "Agnes Varda",
|
|
2326
|
-
* // "newData": "Luc Besson"
|
|
2327
|
-
* // },
|
|
2328
|
-
* // "grade": {
|
|
2329
|
-
* // "year": {
|
|
2330
|
-
* // "type": "updated",
|
|
2331
|
-
* // "data": "B",
|
|
2332
|
-
* // "newData": "C"
|
|
2333
|
-
* // },
|
|
2334
|
-
* // "month": {
|
|
2335
|
-
* // "type": "updated",
|
|
2336
|
-
* // "data": "A",
|
|
2337
|
-
* // "newData": "D"
|
|
2338
|
-
* // }
|
|
2339
|
-
* // }
|
|
2340
|
-
* // }
|
|
2341
|
-
* ```
|
|
2342
|
-
* @memberof bbn.fn
|
|
2343
|
-
* @param {Object} obj1
|
|
2344
|
-
* @param {Object} obj2
|
|
2345
|
-
* @param {String} unchanged
|
|
2346
|
-
* @param {Boolean} notRoot
|
|
2347
|
-
* @returns {Object}
|
|
2348
|
-
*/
|
|
2349
|
-
const diffObj: (obj1: object, obj2: object, unchanged?: boolean, notRoot?: boolean) => any;
|
|
2350
|
-
export { diffObj };
|
|
2351
|
-
}
|
|
2352
|
-
declare module "fn/string/dirName" {
|
|
2353
|
-
/**
|
|
2354
|
-
* Returns the path of the folder containing the last hierarchical element of the path.
|
|
2355
|
-
*
|
|
2356
|
-
* @method dirName
|
|
2357
|
-
* @global
|
|
2358
|
-
*
|
|
2359
|
-
* @example
|
|
2360
|
-
* ```javascript
|
|
2361
|
-
* //"folder/other_folder"
|
|
2362
|
-
* bbn.fn.dirName('folder/other_folder/file');
|
|
2363
|
-
* ```
|
|
2364
|
-
* @memberof bbn.fn
|
|
2365
|
-
* @param {String} path
|
|
2366
|
-
* @returns {String} path of the folder
|
|
2367
|
-
*/
|
|
2368
|
-
const dirName: (path: any) => string;
|
|
2369
|
-
export { dirName };
|
|
2370
|
-
}
|
|
2371
|
-
declare module "fn/type/isBlob" {
|
|
2372
|
-
/**
|
|
2373
|
-
* @method isBlob
|
|
2374
|
-
* @todo Add method description for isFunction
|
|
2375
|
-
* @global
|
|
2376
|
-
* @memberof bbn.fn
|
|
2377
|
-
* @returns {Boolean}
|
|
2378
|
-
*/
|
|
2379
|
-
const isBlob: (...args: any[]) => boolean;
|
|
2380
|
-
export { isBlob };
|
|
2381
|
-
}
|
|
2382
|
-
declare module "fn/string/fileExt" {
|
|
2383
|
-
/**
|
|
2384
|
-
* Gets the extension from a file's name.
|
|
2385
|
-
*
|
|
2386
|
-
* The extension is returned in lower case; if the filename has no extension
|
|
2387
|
-
* or is not valid it will return an empty string.
|
|
2388
|
-
*
|
|
2389
|
-
* @method fileExt
|
|
2390
|
-
* @global
|
|
2391
|
-
*
|
|
2392
|
-
* @example
|
|
2393
|
-
* ```javascript
|
|
2394
|
-
* // "txt"
|
|
2395
|
-
* bbn.fn.fileExt('my_file.txt')
|
|
2396
|
-
* ```
|
|
2397
|
-
*
|
|
2398
|
-
* @example
|
|
2399
|
-
* ```javascript
|
|
2400
|
-
* // "txt"
|
|
2401
|
-
* bbn.fn.fileExt('MY_FILE.TXT')
|
|
2402
|
-
* ```
|
|
2403
|
-
*
|
|
2404
|
-
* @example
|
|
2405
|
-
* ```javascript
|
|
2406
|
-
* // ""
|
|
2407
|
-
* bbn.fn.fileExt('MY_FILE')
|
|
2408
|
-
* ```
|
|
2409
|
-
*
|
|
2410
|
-
* @example
|
|
2411
|
-
* ```javascript
|
|
2412
|
-
* // ""
|
|
2413
|
-
* bbn.fn.fileExt('.MY_FILE')
|
|
2414
|
-
* ```
|
|
2415
|
-
*
|
|
2416
|
-
* @param {String} filename
|
|
2417
|
-
* @returns {String} The file's extension
|
|
2418
|
-
*/
|
|
2419
|
-
const fileExt: (filename: any) => any;
|
|
2420
|
-
export { fileExt };
|
|
2421
|
-
}
|
|
2422
|
-
declare module "fn/type/isCanvas" {
|
|
2423
|
-
/**
|
|
2424
|
-
* Returns true if the given argumen is a Canvas.
|
|
2425
|
-
*
|
|
2426
|
-
* @method isCanvas
|
|
2427
|
-
* @global
|
|
2428
|
-
* @example
|
|
2429
|
-
* ```javascript
|
|
2430
|
-
* let myCanvas = document.createElement('canvas');
|
|
2431
|
-
* bbn.fn.isCanvas(myCanvas);
|
|
2432
|
-
* //true
|
|
2433
|
-
* ```
|
|
2434
|
-
* @memberof bbn.fn
|
|
2435
|
-
* @returns {Boolean}
|
|
2436
|
-
*/
|
|
2437
|
-
const isCanvas: (...args: any[]) => boolean;
|
|
2438
|
-
export { isCanvas };
|
|
2439
|
-
}
|
|
2440
|
-
declare module "fn/ajax/downloadContent" {
|
|
2441
|
-
/**
|
|
2442
|
-
* Downloads a file with given filename from the given content.
|
|
2443
|
-
*
|
|
2444
|
-
* Creates a link putting in href a URL Object Blob made of the given content,
|
|
2445
|
-
* which can be a canvas, a file or a blob object, or just a string.
|
|
2446
|
-
*
|
|
2447
|
-
* @method downloadContent
|
|
2448
|
-
* @global
|
|
2449
|
-
* @memberof bbn.fn
|
|
2450
|
-
*
|
|
2451
|
-
* @example
|
|
2452
|
-
* ```javascript
|
|
2453
|
-
* // Download from a string
|
|
2454
|
-
* bbn.fn.downloadContent('myTextFile.txt', 'Just a string\nThat we can save directly in a file', 'text/plain');
|
|
2455
|
-
*
|
|
2456
|
-
* // Download from a file
|
|
2457
|
-
* let file = new File(["foo"], "foo.txt", {type: "text/plain"});
|
|
2458
|
-
* bbn.fn.downloadContent('foo.txt', file);
|
|
2459
|
-
* ```
|
|
2460
|
-
*
|
|
2461
|
-
* @param {String} filename The name for the downloaded file
|
|
2462
|
-
* @param {HTMLCanvasElement|File|String} content A Canvas, a File object or a String
|
|
2463
|
-
* @param {String} type The type of file to be made
|
|
2464
|
-
*
|
|
2465
|
-
* @returns {undefined}
|
|
2466
|
-
*/
|
|
2467
|
-
const downloadContent: (filename: any, content: any, type?: any) => void;
|
|
2468
|
-
export { downloadContent };
|
|
2469
|
-
}
|
|
2470
|
-
declare module "fn/ajax/download" {
|
|
2471
|
-
/**
|
|
2472
|
-
* Downloads a file with given filename from a URL.
|
|
2473
|
-
*
|
|
2474
|
-
* Gets the file's content as Blob through XHR, then sends it to bbn.fn.downloadContent.
|
|
2475
|
-
* __Attention__ The CORS policy applies
|
|
2476
|
-
*
|
|
2477
|
-
* @method download
|
|
2478
|
-
* @global
|
|
2479
|
-
* @memberof bbn.fn
|
|
2480
|
-
*
|
|
2481
|
-
* @example
|
|
2482
|
-
* ```javascript
|
|
2483
|
-
* // Forcing the download of an image
|
|
2484
|
-
* bbn.fn.download('/bbn/js-title-black.png');
|
|
2485
|
-
*
|
|
2486
|
-
* // Forcing the download of a PDF
|
|
2487
|
-
* bbn.fn.download('/files/my-document.pdf');
|
|
2488
|
-
*
|
|
2489
|
-
* // Changing the name as it is downloaded
|
|
2490
|
-
* bbn.fn.download('/files/f4b1092d71aefd96458feaa71d170f69.pdf', 'myDocument_' + bbn.fn.dateSQL() + '.pdf');
|
|
2491
|
-
* ```
|
|
2492
|
-
*
|
|
2493
|
-
* @param {String} url The URL from which the file will be requested
|
|
2494
|
-
* @param {String} filename The name for the downloaded file (otherwise it will take the basename of the url)
|
|
2495
|
-
* @param {Object} params A data object to send with the request
|
|
2496
|
-
*
|
|
2497
|
-
* @returns {undefined}
|
|
2498
|
-
*/
|
|
2499
|
-
const download: (url: any, filename?: string, params?: any) => any;
|
|
2500
|
-
export { download };
|
|
2501
|
-
}
|
|
2502
|
-
declare module "fn/browser/eraseCookie" {
|
|
2503
|
-
/**
|
|
2504
|
-
* Erase the cookie corresponding to the given name;
|
|
2505
|
-
*
|
|
2506
|
-
* @method eraseCookie
|
|
2507
|
-
* @global
|
|
2508
|
-
* @example
|
|
2509
|
-
* ``` javascript
|
|
2510
|
-
* // 'en'
|
|
2511
|
-
* bbn.fn.erase('lang');
|
|
2512
|
-
* ```
|
|
2513
|
-
* @memberof bbn.fn
|
|
2514
|
-
* @returns {*}
|
|
2515
|
-
*/
|
|
2516
|
-
const eraseCookie: (name: any) => void;
|
|
2517
|
-
export { eraseCookie };
|
|
2518
|
-
}
|
|
2519
|
-
declare module "fn/string/escapeDquotes" {
|
|
2520
|
-
const escapeDquotes: (str: any) => any;
|
|
2521
|
-
export { escapeDquotes };
|
|
2522
|
-
}
|
|
2523
|
-
declare module "fn/string/escapeSquotes" {
|
|
2524
|
-
const escapeSquotes: (str: any) => any;
|
|
2525
|
-
export { escapeSquotes };
|
|
2526
|
-
}
|
|
2527
|
-
declare module "fn/string/escapeTicks" {
|
|
2528
|
-
const escapeTicks: (str: any) => any;
|
|
2529
|
-
export { escapeTicks };
|
|
2530
|
-
}
|
|
2531
|
-
declare module "fn/string/escapeUrl" {
|
|
2532
|
-
/**
|
|
2533
|
-
* Escapes a URL or a file path, optionally adding parameters (get type, to append to the URL without the first separator).
|
|
2534
|
-
*
|
|
2535
|
-
* @param {*} url
|
|
2536
|
-
* @param {*} params
|
|
2537
|
-
* @returns
|
|
2538
|
-
*/
|
|
2539
|
-
const escapeUrl: (url: any, params: any) => string;
|
|
2540
|
-
export { escapeUrl };
|
|
2541
|
-
}
|
|
2542
|
-
declare module "fn/object/extendOut" {
|
|
2543
|
-
/**
|
|
2544
|
-
* Returns a new object made of the properties from all the given objects.
|
|
2545
|
-
*
|
|
2546
|
-
* Compared to bbn.fn.extend this still treats the arguments from left to right
|
|
2547
|
-
* but without overwriting existing properties, and returning a new object.
|
|
2548
|
-
*
|
|
2549
|
-
* @method extendOut
|
|
2550
|
-
* @global
|
|
2551
|
-
* @example
|
|
2552
|
-
* ```javascript
|
|
2553
|
-
* //{field1: 1, field2: 2, field3: 3, items: {item: 0, item1: 1, item2: 2}, field4: 4}
|
|
2554
|
-
* bbn.fn.extendOut({field1: 1, field2: 2, field3: 3, items: {item: 0}}, {field4: 4, items: {item1: 1, item2: 2}});
|
|
2555
|
-
* ```
|
|
2556
|
-
* @memberof bbn.fn
|
|
2557
|
-
* @returns {Object}
|
|
2558
|
-
*/
|
|
2559
|
-
const extendOut: (...args: object[]) => any;
|
|
2560
|
-
export { extendOut };
|
|
2561
|
-
}
|
|
2562
|
-
declare module "fn/form/fieldValue" {
|
|
2563
|
-
/**
|
|
2564
|
-
* Returns the value of a form's input, differenciating between checkboxes, radio and other inputs.
|
|
2565
|
-
*
|
|
2566
|
-
* @method fieldValue
|
|
2567
|
-
* @global
|
|
2568
|
-
* @memberof bbn.fn
|
|
2569
|
-
* @param {HTMLElement} field The input element
|
|
2570
|
-
*
|
|
2571
|
-
* @returns {Mixed} The value
|
|
2572
|
-
*/
|
|
2573
|
-
const fieldValue: (field: any) => any;
|
|
2574
|
-
export { fieldValue };
|
|
2575
|
-
}
|
|
2576
|
-
declare module "fn/object/findAll" {
|
|
2577
|
-
/**
|
|
2578
|
-
* Retrieves all elements of a hierarchical array corresponding to the filter.
|
|
2579
|
-
*
|
|
2580
|
-
* The arguments follow the same scheme as bbn.fn.search.
|
|
2581
|
-
*
|
|
2582
|
-
* @method findAll
|
|
2583
|
-
* @global
|
|
2584
|
-
* @example
|
|
2585
|
-
* ```javascript
|
|
2586
|
-
* let ar = [
|
|
2587
|
-
* {name: "Raiders of the lost ark", director: "Steven Spielberg", year: 1981, id: 589},
|
|
2588
|
-
* {name: "Goonies", director: "Richard Donner", year: 1985, id: 689},
|
|
2589
|
-
* {name: "Star wars", director: "George Lucas", year: 1977, id: 256},
|
|
2590
|
-
* {name: "Jaws", director: "Steven Spielberg", year: 1975, id: 423}
|
|
2591
|
-
* ];
|
|
2592
|
-
* bbn.fn.count(ar, "id", 256);
|
|
2593
|
-
* // 1
|
|
2594
|
-
* bbn.fn.count(ar, {director: "Steven Spielberg"});
|
|
2595
|
-
* // 2
|
|
2596
|
-
* bbn.fn.search(ar, "year", 1975, ">");
|
|
2597
|
-
* // 3
|
|
2598
|
-
* // Complex filters: all the movies from Spielberg between 1974 and 1980
|
|
2599
|
-
* bbn.fn.search(ar, {
|
|
2600
|
-
* logic: "AND",
|
|
2601
|
-
* conditions: [
|
|
2602
|
-
* {
|
|
2603
|
-
* field: "director",
|
|
2604
|
-
* operator: "eq",
|
|
2605
|
-
* value: "Steven Spielberg"
|
|
2606
|
-
* }, {
|
|
2607
|
-
* logic: "AND",
|
|
2608
|
-
* conditions: [
|
|
2609
|
-
* {
|
|
2610
|
-
* field: "year",
|
|
2611
|
-
* operator: ">=",
|
|
2612
|
-
* value: 1974
|
|
2613
|
-
* }, {
|
|
2614
|
-
* field: "year",
|
|
2615
|
-
* operator: "<=",
|
|
2616
|
-
* value: 1980
|
|
2617
|
-
* }
|
|
2618
|
-
* ]
|
|
2619
|
-
* }
|
|
2620
|
-
* ]
|
|
2621
|
-
* });
|
|
2622
|
-
* // 1
|
|
2623
|
-
* ```
|
|
2624
|
-
* @memberof bbn.fn
|
|
2625
|
-
* @todo Do the doc!
|
|
2626
|
-
* @param {Array} arr The subject array
|
|
2627
|
-
* @param {(String|Object|Function)} prop A property's name or a filter object or function
|
|
2628
|
-
* @param {*} val The value with which comparing the given property
|
|
2629
|
-
* @param {String} operator The operator to use for comparison with the value as used in bbn.fn.compare
|
|
2630
|
-
* @returns {Number} The number of items
|
|
2631
|
-
*/
|
|
2632
|
-
const findAll: (arr: any, filter: any, deepProperty: any, res?: any[]) => any[];
|
|
2633
|
-
export { findAll };
|
|
2634
|
-
}
|
|
2635
|
-
declare module "fn/loop/fori" {
|
|
2636
|
-
/**
|
|
2637
|
-
* Executes the provided function on each element of the given array.
|
|
2638
|
-
*
|
|
2639
|
-
* A minimum and a maximum value can be provided, within the boundaries of the
|
|
2640
|
-
* array's indexes. Returning false will stop the loop.
|
|
2641
|
-
*
|
|
2642
|
-
* @method fori
|
|
2643
|
-
* @global
|
|
2644
|
-
* @example
|
|
2645
|
-
* ```javascript
|
|
2646
|
-
* let res = 0;
|
|
2647
|
-
* bbn.fn.fori([4, 5, 5, 10, 1, 2], d => {
|
|
2648
|
-
* res += d;
|
|
2649
|
-
* }, 3);
|
|
2650
|
-
* // res = 24
|
|
2651
|
-
* ```
|
|
2652
|
-
* @example
|
|
2653
|
-
* ```javascript
|
|
2654
|
-
* let res = 0;
|
|
2655
|
-
* bbn.fn.fori([4, 5, 5, 10, 1, 2], d => {
|
|
2656
|
-
* if (res >= 20) {
|
|
2657
|
-
* return false;
|
|
2658
|
-
* }
|
|
2659
|
-
* res += d;
|
|
2660
|
-
* }, 4, 1);
|
|
2661
|
-
* // res = 20
|
|
2662
|
-
* ```
|
|
2663
|
-
* @memberof bbn.fn
|
|
2664
|
-
* @param {Array} arr The array to loop on
|
|
2665
|
-
* @param {Function} fn The function, gets the array's element and the index as arguments
|
|
2666
|
-
* @param {Number} max The index to which the loop will stop
|
|
2667
|
-
* @param {Number} min The index at which the loop will start
|
|
2668
|
-
* @returns {undefined}
|
|
2669
|
-
*/
|
|
2670
|
-
const fori: (arr: any, fn: any, max?: number, min?: number) => void;
|
|
2671
|
-
export { fori };
|
|
2672
|
-
}
|
|
2673
|
-
declare module "fn/loop/forir" {
|
|
2674
|
-
/**
|
|
2675
|
-
* Executes the provided function on each element of the given array, going backward.
|
|
2676
|
-
*
|
|
2677
|
-
* A maximum and a minimum value can be provided, within the boundaries of the
|
|
2678
|
-
* array's indexes. Returning false will stop the loop.
|
|
2679
|
-
*
|
|
2680
|
-
* @method forir
|
|
2681
|
-
* @global
|
|
2682
|
-
* @example
|
|
2683
|
-
* ```javascript
|
|
2684
|
-
* let res = 0;
|
|
2685
|
-
* bbn.fn.forir([4, 5, 5, 10, 1, 2], d => {
|
|
2686
|
-
* res += d;
|
|
2687
|
-
* }, 4, 2);
|
|
2688
|
-
* // res = 16
|
|
2689
|
-
* ```
|
|
2690
|
-
* @example
|
|
2691
|
-
* ```javascript
|
|
2692
|
-
* let res = 0;
|
|
2693
|
-
* bbn.fn.forir([4, 5, 5, 10, 1, 2], d => {
|
|
2694
|
-
* if (res >= 20) {
|
|
2695
|
-
* return false;
|
|
2696
|
-
* }
|
|
2697
|
-
* res += d;
|
|
2698
|
-
* });
|
|
2699
|
-
* // res = 23
|
|
2700
|
-
* ```
|
|
2701
|
-
* @memberof bbn.fn
|
|
2702
|
-
* @param {Array} arr The array to loop on
|
|
2703
|
-
* @param {Function} fn The function, gets the array's element and the index as arguments
|
|
2704
|
-
* @param {Number} max The index to which the loop will stop
|
|
2705
|
-
* @param {Number} min The index at which the loop will start
|
|
2706
|
-
* @returns {undefined}
|
|
2707
|
-
*/
|
|
2708
|
-
const forir: (arr: any, fn: any, max?: number, min?: number) => void;
|
|
2709
|
-
export { forir };
|
|
2710
|
-
}
|
|
2711
|
-
declare module "fn/string/format" {
|
|
2712
|
-
const format: (str: any) => any;
|
|
2713
|
-
export { format };
|
|
2714
|
-
}
|
|
2715
|
-
declare module "fn/string/formatBytes" {
|
|
2716
|
-
/**
|
|
2717
|
-
* Formats the value given in bytes.
|
|
2718
|
-
* @method formatBytes
|
|
2719
|
-
* @global
|
|
2720
|
-
* @example
|
|
2721
|
-
* //"52.23 MB"
|
|
2722
|
-
* ``` javascript
|
|
2723
|
-
* bbn.fn.formatBytes(54764654);
|
|
2724
|
-
* ```
|
|
2725
|
-
* @memberof bbn.fn
|
|
2726
|
-
* @returns {String}
|
|
2727
|
-
*/
|
|
2728
|
-
const formatBytes: (bytes: any, decimals?: number) => string;
|
|
2729
|
-
export { formatBytes };
|
|
2730
|
-
}
|
|
2731
|
-
declare module "fn/datetime/formatDate" {
|
|
2732
|
-
const formatDate: (date: any, format: any) => string;
|
|
2733
|
-
export { formatDate };
|
|
2734
|
-
}
|
|
2735
|
-
declare module "fn/string/formatSize" {
|
|
2736
|
-
const formatSize: (st: any, noValid: any) => any;
|
|
2737
|
-
export { formatSize };
|
|
2738
|
-
}
|
|
2739
|
-
declare module "fn/form/formdata" {
|
|
2740
|
-
/**
|
|
2741
|
-
* Returns all the data contained in a form as a single object.
|
|
2742
|
-
*
|
|
2743
|
-
* @method formdata
|
|
2744
|
-
* @global
|
|
2745
|
-
* @memberof bbn.fn
|
|
2746
|
-
* @fires {*}
|
|
2747
|
-
*
|
|
2748
|
-
* @example
|
|
2749
|
-
* ```javascript
|
|
2750
|
-
* // <form id="myform">
|
|
2751
|
-
* // <input type="hidden" name="bbn[name]" value="Smith">
|
|
2752
|
-
* // <input type="hidden" name="bbn[fname]" value="John">
|
|
2753
|
-
* // </form>
|
|
2754
|
-
* bbn.fn.formdata(document.getElementById('myform'));
|
|
2755
|
-
* // {name: "Smith", fname: "John"};
|
|
2756
|
-
*
|
|
2757
|
-
* ```
|
|
2758
|
-
*
|
|
2759
|
-
* @example
|
|
2760
|
-
* ```javascript
|
|
2761
|
-
* // <form id="myform">
|
|
2762
|
-
* // <input type="hidden" name="People[0][name]" value="Smith">
|
|
2763
|
-
* // <input type="hidden" name="People[0][fname]" value="John">
|
|
2764
|
-
* // <input type="hidden" name="People[1][name]" value="Smith">
|
|
2765
|
-
* // <input type="hidden" name="People[1][fname]" value="Eileen">
|
|
2766
|
-
* // <input type="hidden" name="Dates[0]" value="2021-08-25">
|
|
2767
|
-
* // <input type="hidden" name="Dates[1]" value="2021-09-06">
|
|
2768
|
-
* // </form>
|
|
2769
|
-
* bbn.fn.formdata(document.getElementById('myform'));
|
|
2770
|
-
* // {
|
|
2771
|
-
* // People: [
|
|
2772
|
-
* // {name: "Smith", fname: "John"},
|
|
2773
|
-
* // {name: "Smith", fname: "Eileen"}
|
|
2774
|
-
* // ],
|
|
2775
|
-
* // Dates: ['2021-08-25', '2021-09-06']
|
|
2776
|
-
* // }
|
|
2777
|
-
* ```
|
|
2778
|
-
*
|
|
2779
|
-
* @param {HTMLElementL} form
|
|
2780
|
-
*
|
|
2781
|
-
* @returns {Object}
|
|
2782
|
-
*/
|
|
2783
|
-
const formdata: (form: any) => {};
|
|
2784
|
-
export { formdata };
|
|
2785
|
-
}
|
|
2786
|
-
declare module "fn/convert/fromXml" {
|
|
2787
|
-
/**
|
|
2788
|
-
* Parses XML and returns an object.
|
|
2789
|
-
*
|
|
2790
|
-
* Picked from https://stackoverflow.com/questions/4200913/xml-to-javascript-object
|
|
2791
|
-
*
|
|
2792
|
-
* @memberof bbn.fn
|
|
2793
|
-
* @param {String} xml The XML to be parsed
|
|
2794
|
-
* @param {Array} arrayTags An array of tag names which should always be returned as array (even if single)
|
|
2795
|
-
* @returns {Object}
|
|
2796
|
-
*/
|
|
2797
|
-
const fromXml: (xml: any, arrayTags: any) => {};
|
|
2798
|
-
export { fromXml };
|
|
2799
|
-
}
|
|
2800
|
-
declare module "fn/datetime/ftime" {
|
|
2801
|
-
/**
|
|
2802
|
-
* @method ftime
|
|
2803
|
-
* @todo Add method description for ftime
|
|
2804
|
-
* @global
|
|
2805
|
-
* @memberof bbn.fn
|
|
2806
|
-
* @returns {*}
|
|
2807
|
-
*/
|
|
2808
|
-
const ftime: (d: any, wrong_result: any) => any;
|
|
2809
|
-
export { ftime };
|
|
2810
|
-
}
|
|
2811
|
-
declare module "fn/object/unique" {
|
|
2812
|
-
/**
|
|
2813
|
-
* Removes duplicate values from an array.
|
|
2814
|
-
*
|
|
2815
|
-
* Takes an input array and returns a new array without duplicate values.
|
|
2816
|
-
*
|
|
2817
|
-
* @method unique
|
|
2818
|
-
* @global
|
|
2819
|
-
* @example
|
|
2820
|
-
* ```javascript
|
|
2821
|
-
* bbn.fn.unique(["a", "b", "a", "b", "a", "b", "c", "c", "d"]);
|
|
2822
|
-
* // ["a", "b", "c", "d"]
|
|
2823
|
-
* ```
|
|
2824
|
-
* @memberof bbn.fn
|
|
2825
|
-
* @param {Array} arr
|
|
2826
|
-
* @returns {Array}
|
|
2827
|
-
*/
|
|
2828
|
-
const unique: (arr: any[]) => any[];
|
|
2829
|
-
export { unique };
|
|
2830
|
-
}
|
|
2831
|
-
declare module "fn/html/getAllTags" {
|
|
2832
|
-
/**
|
|
2833
|
-
* Gets all the tag names present in the DOM
|
|
2834
|
-
* @returns array
|
|
2835
|
-
*/
|
|
2836
|
-
const getAllTags: () => any[];
|
|
2837
|
-
export { getAllTags };
|
|
2838
|
-
}
|
|
2839
|
-
declare module "fn/html/getAncestors" {
|
|
2840
|
-
const getAncestors: (ele: any, selector?: any) => any[];
|
|
2841
|
-
export { getAncestors };
|
|
2842
|
-
}
|
|
2843
|
-
declare module "fn/html/getAttributes" {
|
|
2844
|
-
/**
|
|
2845
|
-
* Check if the property contain sizing
|
|
2846
|
-
* @return {Boolean}
|
|
2847
|
-
*/
|
|
2848
|
-
const getAttributes: (ele: any) => any;
|
|
2849
|
-
export { getAttributes };
|
|
2850
|
-
}
|
|
2851
|
-
declare module "fn/browser/getBrowserName" {
|
|
2852
|
-
/**
|
|
2853
|
-
* Gets the browser's name
|
|
2854
|
-
* @method getBrowserName
|
|
2855
|
-
* @global
|
|
2856
|
-
* @memberof bbn.fn
|
|
2857
|
-
* @returns {String}
|
|
2858
|
-
*/
|
|
2859
|
-
const getBrowserName: () => "Edge" | "Opera" | "Chrome" | "Internet Explorer" | "Firefox" | "Safari" | "Other";
|
|
2860
|
-
export { getBrowserName };
|
|
2861
|
-
}
|
|
2862
|
-
declare module "fn/browser/getBrowserVersion" {
|
|
2863
|
-
/**
|
|
2864
|
-
* Gets the browser's version
|
|
2865
|
-
* @method getBrowserVersion
|
|
2866
|
-
* @global
|
|
2867
|
-
* @memberof bbn.fn
|
|
2868
|
-
* @returns {String}
|
|
2869
|
-
*/
|
|
2870
|
-
const getBrowserVersion: () => string;
|
|
2871
|
-
export { getBrowserVersion };
|
|
2872
|
-
}
|
|
2873
|
-
declare module "fn/browser/getCookie" {
|
|
2874
|
-
/**
|
|
2875
|
-
* If it exsists returns the cookie corresponding to the given name.
|
|
2876
|
-
*
|
|
2877
|
-
* @method getCookie
|
|
2878
|
-
* @example
|
|
2879
|
-
* ``` javascript
|
|
2880
|
-
* // 'en'
|
|
2881
|
-
* bbn.fn.getCookie('lang');
|
|
2882
|
-
* ```
|
|
2883
|
-
* @global
|
|
2884
|
-
* @memberof bbn.fn
|
|
2885
|
-
* @param {String} name
|
|
2886
|
-
* @returns
|
|
2887
|
-
*/
|
|
2888
|
-
const getCookie: (name: any) => any;
|
|
2889
|
-
export { getCookie };
|
|
2890
|
-
}
|
|
2891
|
-
declare module "fn/style/getCssVar" {
|
|
2892
|
-
/**
|
|
2893
|
-
* Gets a CSS variable value
|
|
2894
|
-
* @param {String*} varname
|
|
2895
|
-
* @returns
|
|
2896
|
-
*/
|
|
2897
|
-
const getCssVar: (varname: any) => string;
|
|
2898
|
-
export { getCssVar };
|
|
2899
|
-
}
|
|
2900
|
-
declare module "fn/datetime/getDay" {
|
|
2901
|
-
/**
|
|
2902
|
-
* @method getDay
|
|
2903
|
-
* @ignore
|
|
2904
|
-
* @todo Add method description for getDay
|
|
2905
|
-
* @global
|
|
2906
|
-
* @memberof bbn.fn
|
|
2907
|
-
* @param {String|Date} v
|
|
2908
|
-
* @returns
|
|
2909
|
-
*/
|
|
2910
|
-
const getDay: (v: any) => number | false;
|
|
2911
|
-
export { getDay };
|
|
2912
|
-
}
|
|
2913
|
-
declare module "fn/browser/getDeviceType" {
|
|
2914
|
-
/**
|
|
2915
|
-
* Returns the current device type.
|
|
2916
|
-
* @method getDeviceType
|
|
2917
|
-
* @global
|
|
2918
|
-
* @example
|
|
2919
|
-
* ``` javascript
|
|
2920
|
-
* bbn.fn.getDeviceType();
|
|
2921
|
-
* // mobile
|
|
2922
|
-
* ```
|
|
2923
|
-
* @memberof bbn.fn
|
|
2924
|
-
* @returns {String}
|
|
2925
|
-
*/
|
|
2926
|
-
const getDeviceType: () => "mobile" | "tablet" | "desktop";
|
|
2927
|
-
export { getDeviceType };
|
|
2928
|
-
}
|
|
2929
|
-
declare module "fn/html/getHTMLOfSelection" {
|
|
2930
|
-
const getHTMLOfSelection: () => string;
|
|
2931
|
-
export { getHTMLOfSelection };
|
|
2932
|
-
}
|
|
2933
|
-
declare module "fn/browser/getEventData" {
|
|
2934
|
-
/**
|
|
2935
|
-
* Returns a promise having the event's data as argument.
|
|
2936
|
-
* @method getEventData
|
|
2937
|
-
* @global
|
|
2938
|
-
* @example
|
|
2939
|
-
* ``` javascript
|
|
2940
|
-
* let type = e.type;
|
|
2941
|
-
* bbn.fn.getEventData(e).then((data) => {
|
|
2942
|
-
* bbn.fn.log("DATA FROM " + type, data);
|
|
2943
|
-
* });
|
|
2944
|
-
* ```
|
|
2945
|
-
* @memberof bbn.fn
|
|
2946
|
-
* @returns {Promise}
|
|
2947
|
-
*/
|
|
2948
|
-
const getEventData: (e: any) => Promise<unknown>;
|
|
2949
|
-
export { getEventData };
|
|
2950
|
-
}
|
|
2951
|
-
declare module "fn/object/getField" {
|
|
2952
|
-
/**
|
|
2953
|
-
* Returns the value of the given field (property) from the first object matching the given filter in an array of objects.
|
|
2954
|
-
*
|
|
2955
|
-
* The filtering arguments follow the same scheme as bbn.fn.search.
|
|
2956
|
-
*
|
|
2957
|
-
* @method getField
|
|
2958
|
-
* @global
|
|
2959
|
-
* @example
|
|
2960
|
-
* ```javascript
|
|
2961
|
-
* let ar = [
|
|
2962
|
-
* {name: "Raiders of the lost ark", director: "Steven Spielberg", year: 1981, id: 589},
|
|
2963
|
-
* {name: "Goonies", director: "Richard Donner", year: 1985, id: 689},
|
|
2964
|
-
* {name: "Star wars", director: "George Lucas", year: 1977, id: 256},
|
|
2965
|
-
* {name: "Jaws", director: "Steven Spielberg", year: 1975, id: 423}
|
|
2966
|
-
* ];
|
|
2967
|
-
* bbn.fn.getField(ar, "name", {id: 256});
|
|
2968
|
-
* // Star wars
|
|
2969
|
-
* bbn.fn.getField(ar, "name", "id", 689);
|
|
2970
|
-
* // Goonies
|
|
2971
|
-
* ```
|
|
2972
|
-
* @memberof bbn.fn
|
|
2973
|
-
* @param {Array} arr The subject array
|
|
2974
|
-
* @param {String} field The property from which the value is returned
|
|
2975
|
-
* @param {(String|Object|Function)} prop A property's name or a filter object or function
|
|
2976
|
-
* @param {*} val The value with which comparing the given property
|
|
2977
|
-
* @param {String} operator The operator to use for comparison with the value as used in bbn.fn.compare
|
|
2978
|
-
* @returns {*}
|
|
2979
|
-
*/
|
|
2980
|
-
const getField: (arr: any[], field: string, prop?: object | string, val?: any, operator?: string) => any;
|
|
2981
|
-
export { getField };
|
|
2982
|
-
}
|
|
2983
|
-
declare module "fn/object/getFieldValues" {
|
|
2984
|
-
/**
|
|
2985
|
-
* Returns all the unique values of the given field (property) from the first object matching the given filter in an array.
|
|
2986
|
-
*
|
|
2987
|
-
* The filtering arguments follow the same scheme as bbn.fn.search.
|
|
2988
|
-
*
|
|
2989
|
-
* @method getFieldValues
|
|
2990
|
-
* @global
|
|
2991
|
-
* @example
|
|
2992
|
-
* ```javascript
|
|
2993
|
-
* let ar = [
|
|
2994
|
-
* {name: "Raiders of the lost ark", director: "Steven Spielberg", year: 1981, id: 589},
|
|
2995
|
-
* {name: "Star wars", director: "George Lucas", year: 1977, id: 256},
|
|
2996
|
-
* {name: "Jaws", director: "Steven Spielberg", year: 1975, id: 423}
|
|
2997
|
-
* {name: "Barry Lindon", director: "Stanley Kubrick", year: 1975, id: 802}
|
|
2998
|
-
* ];
|
|
2999
|
-
* bbn.fn.getFieldValues(ar, "director");
|
|
3000
|
-
* // ["Steven Spielberg", "George Lucas", "Stanley Kubrick"]
|
|
3001
|
-
* bbn.fn.getFieldValues(ar, "name", {year: 1975});
|
|
3002
|
-
* // ["Jaws", "Barry Lindon"]
|
|
3003
|
-
* ```
|
|
3004
|
-
* @memberof bbn.fn
|
|
3005
|
-
* @param {Array} arr The subject array
|
|
3006
|
-
* @param {String} field The property from which the values are returned
|
|
3007
|
-
* @param {(String|Object|Function)} prop A property's name or a filter object or function
|
|
3008
|
-
* @param {*} val The value with which comparing the given property
|
|
3009
|
-
* @param {String} operator The operator to use for comparison with the value as used in bbn.fn.compare
|
|
3010
|
-
* @returns {*}
|
|
3011
|
-
*/
|
|
3012
|
-
const getFieldValues: (arr: object[], field: string, prop: any, val: any, operator: any) => any[];
|
|
3013
|
-
export { getFieldValues };
|
|
3014
|
-
}
|
|
3015
|
-
declare module "fn/string/removeHtmlComments" {
|
|
3016
|
-
const removeHtmlComments: (str: string) => string;
|
|
3017
|
-
export { removeHtmlComments };
|
|
3018
|
-
}
|
|
3019
|
-
declare module "fn/html/getHtml" {
|
|
3020
|
-
const getHtml: (ele: any, stripComments?: boolean) => any;
|
|
3021
|
-
export { getHtml };
|
|
3022
|
-
}
|
|
3023
|
-
declare module "fn/html/getPath" {
|
|
3024
|
-
/**
|
|
3025
|
-
* @method getPath
|
|
3026
|
-
* @todo Add method description for getPath
|
|
3027
|
-
* @global
|
|
3028
|
-
* @ignore
|
|
3029
|
-
* @memberof bbn.fn
|
|
3030
|
-
* @returns {*}
|
|
3031
|
-
*/
|
|
3032
|
-
const getPath: (element: any) => any;
|
|
3033
|
-
export { getPath };
|
|
3034
|
-
}
|
|
3035
|
-
declare module "fn/object/getProp" {
|
|
3036
|
-
/**
|
|
3037
|
-
* Gets the given property from the given object
|
|
3038
|
-
* @param {Object} obj
|
|
3039
|
-
* @param {String} prop
|
|
3040
|
-
* @returns
|
|
3041
|
-
*/
|
|
3042
|
-
const getProp: (obj: any, prop: any) => any;
|
|
3043
|
-
export { getProp };
|
|
3044
|
-
}
|
|
3045
|
-
declare module "fn/style/getScrollBarSize" {
|
|
3046
|
-
const getScrollBarSize: () => number;
|
|
3047
|
-
export { getScrollBarSize };
|
|
3048
|
-
}
|
|
3049
|
-
declare module "fn/html/getText" {
|
|
3050
|
-
const getText: (ele: any) => any;
|
|
3051
|
-
export { getText };
|
|
3052
|
-
}
|
|
3053
|
-
declare module "fn/misc/getTimeoff" {
|
|
3054
|
-
/**
|
|
3055
|
-
* Returns the length of time the window has not been focused in seconds.
|
|
3056
|
-
* @method getTimeoff
|
|
3057
|
-
* @global
|
|
3058
|
-
* @example
|
|
3059
|
-
* ``` javascript
|
|
3060
|
-
* bbn.fn.getTimeoff();
|
|
3061
|
-
* // 0
|
|
3062
|
-
* ```
|
|
3063
|
-
* @memberof bbn.fn
|
|
3064
|
-
* @returns {Boolean}
|
|
3065
|
-
*/
|
|
3066
|
-
const getTimeoff: () => number;
|
|
3067
|
-
export { getTimeoff };
|
|
3068
|
-
}
|
|
3069
|
-
declare module "fn/browser/happy" {
|
|
3070
|
-
/**
|
|
3071
|
-
* Logs the given argument in the browser's console highlighting it with a green background.
|
|
3072
|
-
* @method happy
|
|
3073
|
-
* @global
|
|
3074
|
-
* @example
|
|
3075
|
-
* ``` javascript
|
|
3076
|
-
* bbn.fn.happy('I want to log the success of my function');
|
|
3077
|
-
* ```
|
|
3078
|
-
* @memberof bbn.fn
|
|
3079
|
-
* @param {...any} args
|
|
3080
|
-
* @returns
|
|
3081
|
-
*/
|
|
3082
|
-
const happy: (...args: any[]) => any;
|
|
3083
|
-
export { happy };
|
|
3084
|
-
}
|
|
3085
|
-
declare module "fn/convert/hex2rgb" {
|
|
3086
|
-
/**
|
|
3087
|
-
* Convert an hexadecimmal string to RGB.
|
|
3088
|
-
*
|
|
3089
|
-
* Converts a string that expresses a color in hexadecimal format into an object with
|
|
3090
|
-
* the properties that define the color and the corresponding value.
|
|
3091
|
-
*
|
|
3092
|
-
* @method hex2rgb
|
|
3093
|
-
* @global
|
|
3094
|
-
*
|
|
3095
|
-
* @example
|
|
3096
|
-
* ```javascript
|
|
3097
|
-
* //{r:255, g:0, b:0}
|
|
3098
|
-
* bbn.fn.hex2rgb("#FF0000");
|
|
3099
|
-
* ```
|
|
3100
|
-
*
|
|
3101
|
-
* @memberof bbn.fn
|
|
3102
|
-
* @returns {*}
|
|
3103
|
-
*/
|
|
3104
|
-
const hex2rgb: (hex: any) => {
|
|
3105
|
-
r: number;
|
|
3106
|
-
g: number;
|
|
3107
|
-
b: number;
|
|
3108
|
-
};
|
|
3109
|
-
export { hex2rgb };
|
|
3110
|
-
}
|
|
3111
|
-
declare module "fn/browser/history" {
|
|
3112
|
-
const history: () => false | History;
|
|
3113
|
-
export { history };
|
|
3114
|
-
}
|
|
3115
|
-
declare module "fn/html/html2text" {
|
|
3116
|
-
/**
|
|
3117
|
-
* Convert text in html format to plain text.
|
|
3118
|
-
*
|
|
3119
|
-
* @method html2text
|
|
3120
|
-
* @global
|
|
3121
|
-
*
|
|
3122
|
-
* @example
|
|
3123
|
-
* ```javascript
|
|
3124
|
-
* //"Hello world!"
|
|
3125
|
-
* bbn.fn.html2text("<div><p>Hello <b>world!</b></p></div>");
|
|
3126
|
-
* ```
|
|
3127
|
-
* @memberof bbn.fn
|
|
3128
|
-
* @param {String} st
|
|
3129
|
-
* @returns {String}
|
|
3130
|
-
*/
|
|
3131
|
-
const html2text: (st: any) => any;
|
|
3132
|
-
export { html2text };
|
|
3133
|
-
}
|
|
3134
|
-
declare module "fn/convert/imageToCanvas" {
|
|
3135
|
-
/**
|
|
3136
|
-
* Draws the given html image nto a canvas.
|
|
3137
|
-
* @method imageToCanvas
|
|
3138
|
-
* @example
|
|
3139
|
-
* ``` javascript
|
|
3140
|
-
* //<canvas width="60" height="32"></canvas>
|
|
3141
|
-
* bbn.fn.imageToCanvas('<img src="path/myImage.png">');
|
|
3142
|
-
* ```
|
|
3143
|
-
* @global
|
|
3144
|
-
* @memberof bbn.fn
|
|
3145
|
-
* @param {HTMLElement} img
|
|
3146
|
-
* @returns {HTMLCanvasElement}
|
|
3147
|
-
*/
|
|
3148
|
-
const imageToCanvas: (img: any) => HTMLCanvasElement;
|
|
3149
|
-
export { imageToCanvas };
|
|
3150
|
-
}
|
|
3151
|
-
declare module "fn/convert/imgToBase64" {
|
|
3152
|
-
const imgToBase64: (img: any, type?: string) => string;
|
|
3153
|
-
export { imgToBase64 };
|
|
3154
|
-
}
|
|
3155
|
-
declare module "fn/browser/info" {
|
|
3156
|
-
/**
|
|
3157
|
-
* Logs the given argument in the browser's console highlighting it with a blue background.
|
|
3158
|
-
* @method info
|
|
3159
|
-
* @global
|
|
3160
|
-
* @memberof bbn.fn
|
|
3161
|
-
* @param {...any} args
|
|
3162
|
-
* @returns {*}
|
|
3163
|
-
*/
|
|
3164
|
-
const info: (...args: any[]) => any;
|
|
3165
|
-
export { info };
|
|
3166
|
-
}
|
|
3167
|
-
declare module "fn/ajax/treatAjaxArguments" {
|
|
3168
|
-
/**
|
|
3169
|
-
* Transforms unordered arguments into a configuratiuon object for Ajax shortcut functions.
|
|
3170
|
-
*
|
|
3171
|
-
* The final object will have the following arguments: url, obj, datatype, force, successFn,
|
|
3172
|
-
* errorFn, abortFn, e, and ele; The rules are:
|
|
3173
|
-
* * The first string found is the URL
|
|
3174
|
-
* * The second string found is the datatype
|
|
3175
|
-
* * The first function is successFn
|
|
3176
|
-
* * The second function is errorFn
|
|
3177
|
-
* * The third function is abortFn
|
|
3178
|
-
* * A boolean true is force
|
|
3179
|
-
* * An Event is e
|
|
3180
|
-
* * An HTML element is ele
|
|
3181
|
-
*
|
|
3182
|
-
* If no object is given the _bbn property will be added in order to always post something
|
|
3183
|
-
* and let the bbn server scripts know if a whole DOM is requested or a JSON answer
|
|
3184
|
-
*
|
|
3185
|
-
* @method treatAjaxArguments
|
|
3186
|
-
* @global
|
|
3187
|
-
* @memberof bbn.fn
|
|
3188
|
-
*
|
|
3189
|
-
* @example
|
|
3190
|
-
* ```javascript
|
|
3191
|
-
* bbn.fn.treatAjaxArguments(['my/script', 'json', {a:1, b:2}, () => bbn.fn.log('Hi'), () => bbn.fn.log('Bye'), () => bbn.fn.log('Argh'), true])
|
|
3192
|
-
* // {
|
|
3193
|
-
* // "url": "my/script",
|
|
3194
|
-
* // "datatype": "json",
|
|
3195
|
-
* // "obj": {
|
|
3196
|
-
* // "a": 1,
|
|
3197
|
-
* // "b": 2
|
|
3198
|
-
* // },
|
|
3199
|
-
* // "successFn": () => bbn.fn.log('Hi'),
|
|
3200
|
-
* // "errorFn": () => bbn.fn.log('Bye'),
|
|
3201
|
-
* // "abortFn": () => bbn.fn.log('Argh'),
|
|
3202
|
-
* // "force": true
|
|
3203
|
-
* // }
|
|
3204
|
-
*
|
|
3205
|
-
* bbn.fn.treatAjaxArguments(['my/script?id=1'])
|
|
3206
|
-
* // {
|
|
3207
|
-
* // "url": "my/script?id=1",
|
|
3208
|
-
* // "obj": {
|
|
3209
|
-
* // "_bbn": "public"
|
|
3210
|
-
* // },
|
|
3211
|
-
* // "datatype": "json"
|
|
3212
|
-
* // }
|
|
3213
|
-
* ```
|
|
3214
|
-
*
|
|
3215
|
-
* @param {*} args
|
|
3216
|
-
*
|
|
3217
|
-
* @returns {Object} The configuration object
|
|
3218
|
-
*/
|
|
3219
|
-
const treatAjaxArguments: (args: any) => any;
|
|
3220
|
-
export { treatAjaxArguments };
|
|
3221
|
-
}
|
|
3222
|
-
declare module "fn/ajax/setNavigationVars" {
|
|
3223
|
-
/**
|
|
3224
|
-
* Changes the URL and the associated variables and updates the history.
|
|
3225
|
-
*
|
|
3226
|
-
* @method setNavigationVars
|
|
3227
|
-
* @todo Add method description for setNavigationVars
|
|
3228
|
-
* @global
|
|
3229
|
-
* @memberof bbn.fn
|
|
3230
|
-
*
|
|
3231
|
-
* @example
|
|
3232
|
-
* ```javascript
|
|
3233
|
-
* // Changing URL
|
|
3234
|
-
* bbn.fn.setNavigationVars('my/page', 'My page');
|
|
3235
|
-
* // Replacing the previous state
|
|
3236
|
-
* bbn.fn.setNavigationVars('my/page/deeper', 'My deeper page', null, true);
|
|
3237
|
-
* ```
|
|
3238
|
-
*
|
|
3239
|
-
* @param {String} url The URL which will become the location.href
|
|
3240
|
-
* @param {String} title The title corresponding to the given URL
|
|
3241
|
-
* @param {Object} data The data if any
|
|
3242
|
-
* @param {Boolean} repl If true the history state object will replace the current one, will be added otherwise
|
|
3243
|
-
*
|
|
3244
|
-
* @returns {void}
|
|
3245
|
-
*/
|
|
3246
|
-
const setNavigationVars: (url: any, title: any, data?: any, repl?: boolean) => void;
|
|
3247
|
-
export { setNavigationVars };
|
|
3248
|
-
}
|
|
3249
|
-
declare module "fn/ajax/link" {
|
|
3250
|
-
/**
|
|
3251
|
-
* Follows a link and if needed by sending the corresponding Ajax request and executing bbn.fn.defaultPreLinkFunction.
|
|
3252
|
-
*
|
|
3253
|
-
* Once bbn has been initiated this function will be triggered every time a link is clicked.
|
|
3254
|
-
* It accepts the same arguments as seen in treatAjaxArguments but will tipically just be called with a URL,
|
|
3255
|
-
* the defaultLinkURL functions being in charge of loading the content
|
|
3256
|
-
*
|
|
3257
|
-
* @method link
|
|
3258
|
-
* @todo Manage anchors + returned data unclear
|
|
3259
|
-
* @global
|
|
3260
|
-
* @memberof bbn.fn
|
|
3261
|
-
*
|
|
3262
|
-
* @example
|
|
3263
|
-
* ```javascript
|
|
3264
|
-
* // Will open in a new window/tab
|
|
3265
|
-
* bbn.fn.link('https://nytimes.com');
|
|
3266
|
-
* // Will send an Ajax request
|
|
3267
|
-
* bbn.fn.link('my/page');
|
|
3268
|
-
* // Will open your default email program
|
|
3269
|
-
* bbn.fn.link('mailto:postmaster@test.com');
|
|
3270
|
-
* ```
|
|
3271
|
-
*
|
|
3272
|
-
* @returns
|
|
3273
|
-
*/
|
|
3274
|
-
const link: (...args: any[]) => any;
|
|
3275
|
-
export { link };
|
|
3276
|
-
}
|
|
3277
|
-
declare module "fn/ajax/post" {
|
|
3278
|
-
/**
|
|
3279
|
-
* Creates a POST XHR through bbn.fn.ajax then launches bbn.fn.callback with the result.
|
|
3280
|
-
*
|
|
3281
|
-
* URL is the only mandatory argument (see treatAjaxArguments for the arguments).
|
|
3282
|
-
*
|
|
3283
|
-
* @method post
|
|
3284
|
-
* @global
|
|
3285
|
-
* @memberof bbn.fn
|
|
3286
|
-
*
|
|
3287
|
-
* @example
|
|
3288
|
-
* ```javascript
|
|
3289
|
-
* bbn.fn.post('logout').then(() => {
|
|
3290
|
-
* document.location.reload();
|
|
3291
|
-
* });
|
|
3292
|
-
* // With data
|
|
3293
|
-
* bbn.fn.post('login', {user: 'tn', pass: 'xxx'}).then((d) => {
|
|
3294
|
-
* if (d && d.success) {
|
|
3295
|
-
* alert('Welcome!');
|
|
3296
|
-
* }
|
|
3297
|
-
* });
|
|
3298
|
-
* // With the callback as argument
|
|
3299
|
-
* bbn.fn.post('login', {user: 'tn', pass: 'xxx'}, (d) => {
|
|
3300
|
-
* if (d && d.success) {
|
|
3301
|
-
* alert('Welcome!');
|
|
3302
|
-
* }
|
|
3303
|
-
* }, (err) => {
|
|
3304
|
-
* bbn.fn.log(err);
|
|
3305
|
-
* mySpecialErrorFunction(err);
|
|
3306
|
-
* });
|
|
3307
|
-
* ```
|
|
3308
|
-
*
|
|
3309
|
-
* @returns {undefined|Promise}
|
|
3310
|
-
*/
|
|
3311
|
-
const post: (...args: any[]) => any;
|
|
3312
|
-
export { post };
|
|
3313
|
-
}
|
|
3314
|
-
declare module "fn/form/submit" {
|
|
3315
|
-
/**
|
|
3316
|
-
* Submit a form's data through an Ajax request.
|
|
3317
|
-
*
|
|
3318
|
-
* It will also prevent the event if given, and execute the given callback,
|
|
3319
|
-
* or look for one in the data-script attribute.
|
|
3320
|
-
*
|
|
3321
|
-
* @method submit
|
|
3322
|
-
* @global
|
|
3323
|
-
* @memberof bbn.fn
|
|
3324
|
-
* @fires {*}
|
|
3325
|
-
* @fires {*}
|
|
3326
|
-
*
|
|
3327
|
-
* @param {HTMLElement} form The form to submit
|
|
3328
|
-
* @param {Event} e The optional submit event - which will be prevented
|
|
3329
|
-
* @param {Function} fn An optional callback function
|
|
3330
|
-
*
|
|
3331
|
-
* @returns {*}
|
|
3332
|
-
*/
|
|
3333
|
-
const submit: (form: HTMLFormElement, e?: Event, fn?: Function) => void;
|
|
3334
|
-
export { submit };
|
|
3335
|
-
}
|
|
3336
|
-
declare module "fn/style/resize" {
|
|
3337
|
-
const resize: () => void;
|
|
3338
|
-
export { resize };
|
|
3339
|
-
}
|
|
3340
|
-
declare module "fn/browser/isMobileDevice" {
|
|
3341
|
-
const isMobileDevice: () => boolean;
|
|
3342
|
-
export { isMobileDevice };
|
|
3343
|
-
}
|
|
3344
|
-
declare module "fn/browser/isTabletDevice" {
|
|
3345
|
-
/**
|
|
3346
|
-
* Returns true if the current device type is a tablet.
|
|
3347
|
-
* @method isTabletDevice
|
|
3348
|
-
* @global
|
|
3349
|
-
* @example
|
|
3350
|
-
* ``` javascript
|
|
3351
|
-
* bbn.fn.isTabletDevice();
|
|
3352
|
-
* // false
|
|
3353
|
-
* ```
|
|
3354
|
-
* @memberof bbn.fn
|
|
3355
|
-
* @returns {Boolean}
|
|
3356
|
-
*/
|
|
3357
|
-
const isTabletDevice: () => boolean;
|
|
3358
|
-
export { isTabletDevice };
|
|
3359
|
-
}
|
|
3360
|
-
declare module "fn/browser/isMobile" {
|
|
3361
|
-
/**
|
|
3362
|
-
* Returns true if the current browser is on a mobile device (smartphone or tablet).
|
|
3363
|
-
* @method isMobile
|
|
3364
|
-
* @global
|
|
3365
|
-
* @example
|
|
3366
|
-
* ``` javascript
|
|
3367
|
-
* bbn.fn.isMobile();
|
|
3368
|
-
* // false
|
|
3369
|
-
* ```
|
|
3370
|
-
* @memberof bbn.fn
|
|
3371
|
-
* @returns {Boolean}
|
|
3372
|
-
*/
|
|
3373
|
-
const isMobile: () => boolean;
|
|
3374
|
-
export { isMobile };
|
|
3375
|
-
}
|
|
3376
|
-
declare module "fn/init" {
|
|
3377
|
-
/**
|
|
3378
|
-
* Initializes the library bbn basing on the given configuration object.
|
|
3379
|
-
* - Gives to the environment the dimension of the window.innerWidth and window.innerHeight
|
|
3380
|
-
* - Defines the server's path (difference between the host and the current dir)
|
|
3381
|
-
* - Adds the colors contained in bbn.var.colors to define the css classes for background and colors.
|
|
3382
|
-
* - Adds the event listener to the document
|
|
3383
|
-
* - Activates the history
|
|
3384
|
-
* @method init
|
|
3385
|
-
* @global
|
|
3386
|
-
* @memberof bbn.fn
|
|
3387
|
-
* @param {Object} cfg
|
|
3388
|
-
* @returns
|
|
3389
|
-
*/
|
|
3390
|
-
const init: (cfg: any, force: any) => void;
|
|
3391
|
-
export { init };
|
|
3392
|
-
}
|
|
3393
|
-
declare module "fn/browser/isActiveInterface" {
|
|
3394
|
-
/**
|
|
3395
|
-
* Tells if the interface is beeing active for the past x seconds.
|
|
3396
|
-
* @method isActiveInterface
|
|
3397
|
-
* @global
|
|
3398
|
-
* @example
|
|
3399
|
-
* // true
|
|
3400
|
-
* ``` javascript
|
|
3401
|
-
* bbn.fn.isActiveInterface(54764654);
|
|
3402
|
-
* ```
|
|
3403
|
-
* @memberof bbn.fn
|
|
3404
|
-
* @returns {Boolean}
|
|
3405
|
-
*/
|
|
3406
|
-
const isActiveInterface: (secs?: number) => boolean;
|
|
3407
|
-
export { isActiveInterface };
|
|
3408
|
-
}
|
|
3409
|
-
declare module "fn/type/isBoolean" {
|
|
3410
|
-
/**
|
|
3411
|
-
* Returns true if the given argument is a boolean
|
|
3412
|
-
* @method isBoolean
|
|
3413
|
-
* @global
|
|
3414
|
-
* @example
|
|
3415
|
-
* ```javascript
|
|
3416
|
-
* const sb = true;
|
|
3417
|
-
* bbn.fn.isBoolean(sb); // true
|
|
3418
|
-
* const sb = 1;
|
|
3419
|
-
* bbn.fn.isBoolean(sb); // false
|
|
3420
|
-
* ```
|
|
3421
|
-
* @memberof bbn.fn
|
|
3422
|
-
* @returns {Boolean}
|
|
3423
|
-
*/
|
|
3424
|
-
const isBoolean: (...args: any[]) => boolean;
|
|
3425
|
-
export { isBoolean };
|
|
3426
|
-
}
|
|
3427
|
-
declare module "fn/type/isColor" {
|
|
3428
|
-
/**
|
|
3429
|
-
* Intended to check if the argument provided is a color.
|
|
3430
|
-
*
|
|
3431
|
-
* It is possible to pass as argument a string with hexadecimal value in rgb or the name of the color.
|
|
3432
|
-
*
|
|
3433
|
-
* @method isColor
|
|
3434
|
-
* @global
|
|
3435
|
-
*
|
|
3436
|
-
* @example
|
|
3437
|
-
* ```javascript
|
|
3438
|
-
* bbn.fn.isColor("#FF0000")
|
|
3439
|
-
* //true
|
|
3440
|
-
* ```
|
|
3441
|
-
*
|
|
3442
|
-
* @example
|
|
3443
|
-
* ```javascript
|
|
3444
|
-
* bbn.fn.isColor("rgb 255, 0, 0");
|
|
3445
|
-
* //true
|
|
3446
|
-
* ```
|
|
3447
|
-
*
|
|
3448
|
-
* @example
|
|
3449
|
-
* ```javascript
|
|
3450
|
-
* bbn.fn.isColor("red");
|
|
3451
|
-
* //true
|
|
3452
|
-
* ```
|
|
3453
|
-
* @memberof bbn.fn
|
|
3454
|
-
* @param {String} st
|
|
3455
|
-
* @returns {Boolean}
|
|
3456
|
-
*/
|
|
3457
|
-
const isColor: (...args: any[]) => boolean;
|
|
3458
|
-
export { isColor };
|
|
3459
|
-
}
|
|
3460
|
-
declare module "fn/type/isComment" {
|
|
3461
|
-
/**
|
|
3462
|
-
* Returns true if the given argument is a dom comment;
|
|
3463
|
-
* @method isComment
|
|
3464
|
-
* @example
|
|
3465
|
-
* ```javascript
|
|
3466
|
-
* bbn.fn.isComment(node.childNodes[0]);
|
|
3467
|
-
* //true
|
|
3468
|
-
* ```
|
|
3469
|
-
* @global
|
|
3470
|
-
* @memberof bbn.fn
|
|
3471
|
-
* @returns {Boolean}
|
|
3472
|
-
*/
|
|
3473
|
-
const isComment: (...args: any[]) => boolean;
|
|
3474
|
-
export { isComment };
|
|
3475
|
-
}
|
|
3476
|
-
declare module "fn/browser/isDesktopDevice" {
|
|
3477
|
-
/**
|
|
3478
|
-
* Returns true if the current device type is a desktop.
|
|
3479
|
-
* @method isDesktopDevice
|
|
3480
|
-
* @global
|
|
3481
|
-
* @example
|
|
3482
|
-
* ``` javascript
|
|
3483
|
-
* bbn.fn.isDesktopDevice();
|
|
3484
|
-
* // true
|
|
3485
|
-
* ```
|
|
3486
|
-
* @memberof bbn.fn
|
|
3487
|
-
* @returns {Boolean}
|
|
3488
|
-
*/
|
|
3489
|
-
const isDesktopDevice: () => boolean;
|
|
3490
|
-
export { isDesktopDevice };
|
|
3491
|
-
}
|
|
3492
|
-
declare module "fn/type/isValidDimension" {
|
|
3493
|
-
/**
|
|
3494
|
-
* Returns true if the given value is a valid CSS dimension string, false otherwise.
|
|
3495
|
-
*
|
|
3496
|
-
* @method isValidDimension
|
|
3497
|
-
* @global
|
|
3498
|
-
* @memberof bbn.fn
|
|
3499
|
-
* @param {String} st
|
|
3500
|
-
* @returns
|
|
3501
|
-
*/
|
|
3502
|
-
const isValidDimension: (st: any) => boolean;
|
|
3503
|
-
export { isValidDimension };
|
|
3504
|
-
}
|
|
3505
|
-
declare module "fn/type/isDimension" {
|
|
3506
|
-
/**
|
|
3507
|
-
* Returns true if the given value is a valid CSS dimension string or a number, false otherwise.
|
|
3508
|
-
*
|
|
3509
|
-
* @method isDimension
|
|
3510
|
-
* @global
|
|
3511
|
-
* @memberof bbn.fn
|
|
3512
|
-
* @param {String} st
|
|
3513
|
-
* @returns
|
|
3514
|
-
*/
|
|
3515
|
-
const isDimension: (...args: any[]) => boolean;
|
|
3516
|
-
export { isDimension };
|
|
3517
|
-
}
|
|
3518
|
-
declare module "fn/type/isEmail" {
|
|
3519
|
-
/**
|
|
3520
|
-
* Intended to check if the argument provided is an e-mail address written correctly
|
|
3521
|
-
*
|
|
3522
|
-
* @method isEmail
|
|
3523
|
-
* @global
|
|
3524
|
-
*
|
|
3525
|
-
* @example
|
|
3526
|
-
* ```javascript
|
|
3527
|
-
* bbn.fn.isEmail('test@testorg');
|
|
3528
|
-
* //false
|
|
3529
|
-
* ```
|
|
3530
|
-
*
|
|
3531
|
-
* @example
|
|
3532
|
-
* ```javascript
|
|
3533
|
-
* bbn.fn.isEmail('test@test.org');
|
|
3534
|
-
* //true
|
|
3535
|
-
* ```
|
|
3536
|
-
* @memberof bbn.fn
|
|
3537
|
-
* @param {String} st
|
|
3538
|
-
* @returns {Boolean}
|
|
3539
|
-
*/
|
|
3540
|
-
const isEmail: (...args: any[]) => boolean;
|
|
3541
|
-
export { isEmail };
|
|
3542
|
-
}
|
|
3543
|
-
declare module "fn/type/isEvent" {
|
|
3544
|
-
/**
|
|
3545
|
-
* Returns true if the given argument is an event.
|
|
3546
|
-
* @method isEvent
|
|
3547
|
-
* @global
|
|
3548
|
-
* @memberof bbn.fn
|
|
3549
|
-
* @returns {Boolean}
|
|
3550
|
-
*/
|
|
3551
|
-
const isEvent: (...args: any[]) => boolean;
|
|
3552
|
-
export { isEvent };
|
|
3553
|
-
}
|
|
3554
|
-
declare module "fn/browser/isFocused" {
|
|
3555
|
-
/**
|
|
3556
|
-
* Checks whether the given elemet is focused or not.
|
|
3557
|
-
*
|
|
3558
|
-
* @method isFocused
|
|
3559
|
-
* @global
|
|
3560
|
-
* @example
|
|
3561
|
-
* ``` javascript
|
|
3562
|
-
* bbn.fn.isFocused(document.getElementById('input_name'));
|
|
3563
|
-
* // false
|
|
3564
|
-
* bbn.fn.isFocused(bbn.sel('.container'));
|
|
3565
|
-
* // true
|
|
3566
|
-
* ```
|
|
3567
|
-
* @memberof bbn.fn
|
|
3568
|
-
*
|
|
3569
|
-
* @param {Element} ele The element to be checked for focus
|
|
3570
|
-
* @param {Boolean} contain If true will check if the focused element is contained in the given element
|
|
3571
|
-
*
|
|
3572
|
-
* @returns {Boolean} True if focused
|
|
3573
|
-
*/
|
|
3574
|
-
const isFocused: (ele: any, contain?: boolean) => boolean;
|
|
3575
|
-
export { isFocused };
|
|
3576
|
-
}
|
|
3577
|
-
declare module "fn/type/isIP" {
|
|
3578
|
-
const isIP: (...args: any[]) => boolean;
|
|
3579
|
-
export { isIP };
|
|
3580
|
-
}
|
|
3581
|
-
declare module "fn/type/isHostname" {
|
|
3582
|
-
const isHostname: (...args: any[]) => boolean;
|
|
3583
|
-
export { isHostname };
|
|
3584
|
-
}
|
|
3585
|
-
declare module "fn/html/isInside" {
|
|
3586
|
-
const isInside: (ele: any, ancestor: any) => boolean;
|
|
3587
|
-
export { isInside };
|
|
3588
|
-
}
|
|
3589
|
-
declare module "fn/type/isPercent" {
|
|
3590
|
-
/**
|
|
3591
|
-
* Returns true if the given argument is a percentage.
|
|
3592
|
-
* @method isPercent
|
|
3593
|
-
* @global
|
|
3594
|
-
* @example
|
|
3595
|
-
* ```javascript
|
|
3596
|
-
* bbn.fn.isPercent('5%');
|
|
3597
|
-
* //true
|
|
3598
|
-
* ```
|
|
3599
|
-
* @memberof bbn.fn
|
|
3600
|
-
* @returns {Boolean}
|
|
3601
|
-
*/
|
|
3602
|
-
const isPercent: (...args: any[]) => boolean;
|
|
3603
|
-
export { isPercent };
|
|
3604
|
-
}
|
|
3605
|
-
declare module "fn/type/isPrimitive" {
|
|
3606
|
-
/**
|
|
3607
|
-
* Returns true if the given arguments are primitive;
|
|
3608
|
-
* @method isPrimitive
|
|
3609
|
-
* @global
|
|
3610
|
-
* @example
|
|
3611
|
-
* ```javascript
|
|
3612
|
-
* bbn.fn.isPrimitive('myString', 6, true);
|
|
3613
|
-
* //true
|
|
3614
|
-
* bbn.fn.isPrimitive([80,10,22]);
|
|
3615
|
-
* //false
|
|
3616
|
-
* bbn.fn.isPrimitive({});
|
|
3617
|
-
* //false
|
|
3618
|
-
* ```
|
|
3619
|
-
* @memberof bbn.fn
|
|
3620
|
-
* @returns {Boolean}
|
|
3621
|
-
*/
|
|
3622
|
-
const isPrimitive: (...args: any[]) => boolean;
|
|
3623
|
-
export { isPrimitive };
|
|
3624
|
-
}
|
|
3625
|
-
declare module "fn/type/isPromise" {
|
|
3626
|
-
/**
|
|
3627
|
-
* Returns true if the given argument is a promise.
|
|
3628
|
-
* @global
|
|
3629
|
-
* @example
|
|
3630
|
-
* ```javascript
|
|
3631
|
-
* bbn.fn.isPromise(bbn.fn.post('myUrl'));
|
|
3632
|
-
* // true
|
|
3633
|
-
* bbn.fn.isPromise(setTimeout(() => {}))
|
|
3634
|
-
* // false
|
|
3635
|
-
* bbn.fn.isPromise(myVueObject.$nextTick());
|
|
3636
|
-
* // true
|
|
3637
|
-
* ```
|
|
3638
|
-
* @method isFunction
|
|
3639
|
-
* @memberof bbn.fn
|
|
3640
|
-
* @returns {Boolean}
|
|
3641
|
-
*/
|
|
3642
|
-
const isPromise: (...args: any[]) => boolean;
|
|
3643
|
-
export { isPromise };
|
|
3644
|
-
}
|
|
3645
|
-
declare module "fn/type/isPropSize" {
|
|
3646
|
-
const isPropSize: (name: any) => boolean;
|
|
3647
|
-
export { isPropSize };
|
|
3648
|
-
}
|
|
3649
|
-
declare module "fn/type/isSQLDate" {
|
|
3650
|
-
/**
|
|
3651
|
-
* @ignore
|
|
3652
|
-
* @method isSQLDate
|
|
3653
|
-
* @todo Add method description for isSQLDate
|
|
3654
|
-
* @global
|
|
3655
|
-
* @memberof bbn.fn
|
|
3656
|
-
* @returns {Boolean}
|
|
3657
|
-
*/
|
|
3658
|
-
const isSQLDate: (...args: any[]) => boolean;
|
|
3659
|
-
export { isSQLDate };
|
|
3660
|
-
}
|
|
3661
|
-
declare module "fn/type/isSymbol" {
|
|
3662
|
-
/**
|
|
3663
|
-
* Returns true if the given argument is a symbol;
|
|
3664
|
-
* @method isSymbol
|
|
3665
|
-
* @global
|
|
3666
|
-
* @example
|
|
3667
|
-
* ```javascript
|
|
3668
|
-
* const sb = Symbol();
|
|
3669
|
-
* bbn.fn.isSymbol(sb);
|
|
3670
|
-
* //true
|
|
3671
|
-
* ```
|
|
3672
|
-
* @memberof bbn.fn
|
|
3673
|
-
* @returns {Boolean}
|
|
3674
|
-
*/
|
|
3675
|
-
const isSymbol: (...args: any[]) => boolean;
|
|
3676
|
-
export { isSymbol };
|
|
3677
|
-
}
|
|
3678
|
-
declare module "fn/type/isURL" {
|
|
3679
|
-
const isURL: (...args: any[]) => boolean;
|
|
3680
|
-
export { isURL };
|
|
3681
|
-
}
|
|
3682
|
-
declare module "fn/type/isValidName" {
|
|
3683
|
-
/**
|
|
3684
|
-
* Returns true if the given value is a valid name for a function without checking in reserved words, false otherwise
|
|
3685
|
-
* @method isValidName
|
|
3686
|
-
* @global
|
|
3687
|
-
* @example
|
|
3688
|
-
* ```javascript
|
|
3689
|
-
* bbn.fn.isValidName('$myFunc_tion')
|
|
3690
|
-
* // true
|
|
3691
|
-
* ```
|
|
3692
|
-
* @example
|
|
3693
|
-
* ```javascript
|
|
3694
|
-
* bbn.fn.isValidName('7Y')
|
|
3695
|
-
* // false
|
|
3696
|
-
* ```
|
|
3697
|
-
*
|
|
3698
|
-
* @example
|
|
3699
|
-
* ```javascript
|
|
3700
|
-
* bbn.fn.isValidName('function')
|
|
3701
|
-
* // true
|
|
3702
|
-
* ```
|
|
3703
|
-
*
|
|
3704
|
-
* @memberof bbn.fn
|
|
3705
|
-
* @param {String} st
|
|
3706
|
-
* @returns {Boolean}
|
|
3707
|
-
*/
|
|
3708
|
-
const isValidName: (...args: any[]) => boolean;
|
|
3709
|
-
export { isValidName };
|
|
3710
|
-
}
|
|
3711
|
-
declare module "fn/type/isVue" {
|
|
3712
|
-
/**
|
|
3713
|
-
* Returns true if the given argumen is a VueJS object.
|
|
3714
|
-
*
|
|
3715
|
-
* @method isVue
|
|
3716
|
-
* @global
|
|
3717
|
-
* @example
|
|
3718
|
-
* ```javascript
|
|
3719
|
-
* let myObj = new Vue({});
|
|
3720
|
-
* bbn.fn.isVue(myObj);
|
|
3721
|
-
* //true
|
|
3722
|
-
* ```
|
|
3723
|
-
* @memberof bbn.fn
|
|
3724
|
-
* @returns {Boolean}
|
|
3725
|
-
*/
|
|
3726
|
-
const isVue: (...args: any[]) => boolean;
|
|
3727
|
-
export { isVue };
|
|
3728
|
-
}
|
|
3729
|
-
declare module "fn/style/lightenDarkenHex" {
|
|
3730
|
-
/**
|
|
3731
|
-
* Takes color in hex format and lightens or darkens it with the given value.
|
|
3732
|
-
* @method lightenDarkenHex
|
|
3733
|
-
* @global
|
|
3734
|
-
* @example
|
|
3735
|
-
* ```javascript
|
|
3736
|
-
* //"#eccb28"
|
|
3737
|
-
* bbn.fn.lightenDarkenHex('#c4a300', 40);
|
|
3738
|
-
* ```
|
|
3739
|
-
*
|
|
3740
|
-
* @example
|
|
3741
|
-
* ```javascript
|
|
3742
|
-
* //"#9c7b00"
|
|
3743
|
-
* bbn.fn.lightenDarkenHex(#c4a300', -40);
|
|
3744
|
-
* ```
|
|
3745
|
-
* @memberof bbn.fn
|
|
3746
|
-
* @returns {String}
|
|
3747
|
-
*/
|
|
3748
|
-
const lightenDarkenHex: (hex: any, amt: any) => string;
|
|
3749
|
-
export { lightenDarkenHex };
|
|
3750
|
-
}
|
|
3751
|
-
declare module "fn/browser/warning" {
|
|
3752
|
-
/**
|
|
3753
|
-
* Logs the given argument in the browser's console highlighting it with a yellow background and red color.
|
|
3754
|
-
* @method warning
|
|
3755
|
-
* @global
|
|
3756
|
-
* @example
|
|
3757
|
-
* ```javascript
|
|
3758
|
-
* bbn.fn.warning('whatever you want to log as a warning');
|
|
3759
|
-
* ```
|
|
3760
|
-
* @memberof bbn.fn
|
|
3761
|
-
* @param {...any} args
|
|
3762
|
-
* @returns
|
|
3763
|
-
*/
|
|
3764
|
-
const warning: (message: any) => void;
|
|
3765
|
-
export { warning };
|
|
3766
|
-
}
|
|
3767
|
-
declare module "fn/html/makeReactive" {
|
|
3768
|
-
const makeReactive: (obj: any, onSet: any, parent: any, parentProp: any) => any;
|
|
3769
|
-
export { makeReactive };
|
|
3770
|
-
}
|
|
3771
|
-
declare module "fn/object/map" {
|
|
3772
|
-
/**
|
|
3773
|
-
* Returns a new array generated by the execution of a function for each item of the given array.
|
|
3774
|
-
*
|
|
3775
|
-
* The deepProp argument is the name of property which should contain a nested array on which
|
|
3776
|
-
* the function should also be applied recursively.
|
|
3777
|
-
*
|
|
3778
|
-
* @method map
|
|
3779
|
-
* @global
|
|
3780
|
-
* @example
|
|
3781
|
-
* ```javascript
|
|
3782
|
-
* bbn.fn.map([1, 2, 3, 4], a => {
|
|
3783
|
-
* return a + 1;
|
|
3784
|
-
* });
|
|
3785
|
-
* // [2, 3, 4, 5]
|
|
3786
|
-
* ```
|
|
3787
|
-
* @example
|
|
3788
|
-
* ```javascript
|
|
3789
|
-
* bbn.fn.map(
|
|
3790
|
-
* [{
|
|
3791
|
-
* name: "tools",
|
|
3792
|
-
* items: [
|
|
3793
|
-
* {
|
|
3794
|
-
* name: "hammers"
|
|
3795
|
-
* }, {
|
|
3796
|
-
* name: "screwdrivers",
|
|
3797
|
-
* items: [
|
|
3798
|
-
* {name: "flat screwdrivers"},
|
|
3799
|
-
* {name: "slotted screwdrivers"},
|
|
3800
|
-
* {name: "Hex screwdrivers"},
|
|
3801
|
-
* ]
|
|
3802
|
-
* }
|
|
3803
|
-
* ]
|
|
3804
|
-
* }, {
|
|
3805
|
-
* name: "Kitchenware"
|
|
3806
|
-
* }],
|
|
3807
|
-
* d => {
|
|
3808
|
-
* d.warranty = d.name === "Hex screwdrivers" ? "10 years" : "1 year";
|
|
3809
|
-
* return d;
|
|
3810
|
-
* },
|
|
3811
|
-
* "items"
|
|
3812
|
-
* );
|
|
3813
|
-
* // [
|
|
3814
|
-
* // {
|
|
3815
|
-
* // name: "tools",
|
|
3816
|
-
* // warranty: "1 year",
|
|
3817
|
-
* // items: [
|
|
3818
|
-
* // {
|
|
3819
|
-
* // name: "hammers",
|
|
3820
|
-
* // warranty: "1 year",
|
|
3821
|
-
* // }, {
|
|
3822
|
-
* // name: "screwdrivers",
|
|
3823
|
-
* // warranty: "1 year",
|
|
3824
|
-
* // items: [
|
|
3825
|
-
* // {name: "flat screwdrivers", warranty: "1 year"},
|
|
3826
|
-
* // {name: "slotted screwdrivers", warranty: "1 year"},
|
|
3827
|
-
* // {name: "Hex screwdrivers", warranty: "10 year"},
|
|
3828
|
-
* // ]
|
|
3829
|
-
* // }
|
|
3830
|
-
* // ]
|
|
3831
|
-
* // }, {
|
|
3832
|
-
* // name: "Kitchenware",
|
|
3833
|
-
* // warranty: "1 year"
|
|
3834
|
-
* // }
|
|
3835
|
-
* // ]
|
|
3836
|
-
* ```
|
|
3837
|
-
* @memberof bbn.fn
|
|
3838
|
-
* @param {Array} arr
|
|
3839
|
-
* @param {Function} fn
|
|
3840
|
-
* @param {Boolean} deepProp
|
|
3841
|
-
* @param {Number} level
|
|
3842
|
-
* @returns {Array}
|
|
3843
|
-
*/
|
|
3844
|
-
const map: (arr: any, fn: any, deepProp: any, level?: number) => any;
|
|
3845
|
-
export { map };
|
|
3846
|
-
}
|
|
3847
|
-
declare module "fn/misc/money" {
|
|
3848
|
-
/**
|
|
3849
|
-
* Returns the given value to money format basing on the given configuration.
|
|
3850
|
-
*
|
|
3851
|
-
* @method money
|
|
3852
|
-
* @global
|
|
3853
|
-
*
|
|
3854
|
-
* @example
|
|
3855
|
-
* ``` javascript
|
|
3856
|
-
* // "5 856.0 $"
|
|
3857
|
-
* bbn.fn.money(5856, false, '$', false, '.' ,false, 1);
|
|
3858
|
-
* ```
|
|
3859
|
-
*
|
|
3860
|
-
* @memberof bbn.fn
|
|
3861
|
-
* @param {String|Number} val The value.
|
|
3862
|
-
* @param {Boolean} kilo If the value has to be rendered in kilo.
|
|
3863
|
-
* @param {String} currency The currency.
|
|
3864
|
-
* @param {String} novalue The string to return if no valid value is given.
|
|
3865
|
-
* @param {String} decimal The character to use separate decimals.
|
|
3866
|
-
* @param {String} thousands The character to use to separate thounsands.
|
|
3867
|
-
* @param {Number} precision The number of decimals places.
|
|
3868
|
-
*/
|
|
3869
|
-
const money: (val: number, kilo?: boolean, currency?: string, novalue?: string | false, decimal?: string, thousands?: string, precision?: number) => string;
|
|
3870
|
-
export { money };
|
|
3871
|
-
}
|
|
3872
|
-
declare module "fn/object/move" {
|
|
3873
|
-
/**
|
|
3874
|
-
* Moves an element to a different position within the given array.
|
|
3875
|
-
*
|
|
3876
|
-
* The same array is returned, with its elements reordered according to the executed movement.
|
|
3877
|
-
*
|
|
3878
|
-
* @method move
|
|
3879
|
-
* @global
|
|
3880
|
-
* @todo Finish doc
|
|
3881
|
-
* @example
|
|
3882
|
-
* ```javascript
|
|
3883
|
-
* bbbn.fn.move([
|
|
3884
|
-
* {movie: "Brazil", year: 1985},
|
|
3885
|
-
* {movie: "Donnie Darko", year: 2001},
|
|
3886
|
-
* {movie: "Out of Africa", year: 1985}
|
|
3887
|
-
* ], 1, 2);
|
|
3888
|
-
* // [
|
|
3889
|
-
* // {movie: "Brazil", year: 1985},
|
|
3890
|
-
* // {movie: "Out of Africa", year: 1985},
|
|
3891
|
-
* // {movie: "Donnie Darko", year: 2001}
|
|
3892
|
-
* // ]
|
|
3893
|
-
* ```
|
|
3894
|
-
* @example
|
|
3895
|
-
* ```javascript
|
|
3896
|
-
* bbn.fn.move([1, 2, 3, 4], 3, 0);
|
|
3897
|
-
* // [4, 1, 2, 3]
|
|
3898
|
-
* ```
|
|
3899
|
-
* @memberof bbn.fn
|
|
3900
|
-
* @param {Array} arr The array
|
|
3901
|
-
* @param {Number} fromIndex The index of the element to move
|
|
3902
|
-
* @param {Number} toIndex The future index of the element
|
|
3903
|
-
* @returns {Array} The same array, with elements repositionned.
|
|
3904
|
-
*/
|
|
3905
|
-
const move: (arr: any[], fromIndex: number, toIndex: number) => any[];
|
|
3906
|
-
export { move };
|
|
3907
|
-
}
|
|
3908
|
-
declare module "fn/object/multiorder" {
|
|
3909
|
-
/**
|
|
3910
|
-
* Sorts an array of objects based on a set of properties.
|
|
3911
|
-
*
|
|
3912
|
-
* The resulting array is the same object, the order is based on _compareValues function
|
|
3913
|
-
* applied for each given properties in orders argument.
|
|
3914
|
-
*
|
|
3915
|
-
* @method multiorder
|
|
3916
|
-
* @global
|
|
3917
|
-
* @example
|
|
3918
|
-
* ```javascript
|
|
3919
|
-
* let ar = [
|
|
3920
|
-
* {movie: "Brazil", year: 1985},
|
|
3921
|
-
* {movie: "Donnie Darko", year: 2001},
|
|
3922
|
-
* {movie: "Out of Africa", year: 1985},
|
|
3923
|
-
* {movie: "Ran", year: 1985},
|
|
3924
|
-
* {movie: "Back to the future", year: 1985},
|
|
3925
|
-
* {movie: "Barry Lindon", year: 1976}
|
|
3926
|
-
* ];
|
|
3927
|
-
* bbn.fn.multiorder(ar, [
|
|
3928
|
-
* {field: "year", dir: "desc"},
|
|
3929
|
-
* {field: "movie", dir: "asc"}
|
|
3930
|
-
* ]);
|
|
3931
|
-
* // [
|
|
3932
|
-
* // {movie: "Donnie Darko", year: 2001},
|
|
3933
|
-
* // {movie: "Back to the future", year: 1985},
|
|
3934
|
-
* // {movie: "Brazil", year: 1985},
|
|
3935
|
-
* // {movie: "Out of Africa", year: 1985},
|
|
3936
|
-
* // {movie: "Ran", year: 1985},
|
|
3937
|
-
* // {movie: "Barry Lindon", year: 1976}
|
|
3938
|
-
* // ]
|
|
3939
|
-
* bbn.fn.multiorder(ar, {year: "desc", movie: "asc"});
|
|
3940
|
-
* // Same result with object shortcut
|
|
3941
|
-
* ```
|
|
3942
|
-
* @memberof bbn.fn
|
|
3943
|
-
* @param {Array} arr The array to order
|
|
3944
|
-
* @param {Array|Object} orders The properties and directions (asc, desc) to order by
|
|
3945
|
-
* @returns {Array} The same array (arr), ordered differently
|
|
3946
|
-
*/
|
|
3947
|
-
const multiorder: (arr: object[], orders: any) => object[];
|
|
3948
|
-
export { multiorder };
|
|
3949
|
-
}
|
|
3950
|
-
declare module "fn/string/nl2br" {
|
|
3951
|
-
/**
|
|
3952
|
-
* Replaces all new line characters '\ n' with html tag '<br>'.
|
|
3953
|
-
*
|
|
3954
|
-
* @method nl2br
|
|
3955
|
-
* @global
|
|
3956
|
-
*
|
|
3957
|
-
* @example
|
|
3958
|
-
* ```javascript
|
|
3959
|
-
* bbn.fn.nl2br('hello \n world!');
|
|
3960
|
-
* //"hello <br> world!"
|
|
3961
|
-
* ```
|
|
3962
|
-
* @memberof bbn.fn
|
|
3963
|
-
* @param {String} st
|
|
3964
|
-
* @returns {String}
|
|
3965
|
-
*/
|
|
3966
|
-
const nl2br: (st: any, keepNl: any) => string;
|
|
3967
|
-
export { nl2br };
|
|
3968
|
-
}
|
|
3969
|
-
declare module "fn/form/objectToFormData" {
|
|
3970
|
-
/**
|
|
3971
|
-
* @method objectToFormData
|
|
3972
|
-
* @todo Add method description for objectToFormData
|
|
3973
|
-
* @global
|
|
3974
|
-
* @memberof bbn.fn
|
|
3975
|
-
* @param {Object|Array|File} obj
|
|
3976
|
-
* @param {String} key
|
|
3977
|
-
* @param {Array} ignoreList
|
|
3978
|
-
* @returns
|
|
3979
|
-
*/
|
|
3980
|
-
const objectToFormData: (obj: any, key?: string, ignoreList?: any) => FormData;
|
|
3981
|
-
export { objectToFormData };
|
|
3982
|
-
}
|
|
3983
|
-
declare module "fn/object/order" {
|
|
3984
|
-
/**
|
|
3985
|
-
* Sorts an array of objects based on the given property.
|
|
3986
|
-
*
|
|
3987
|
-
* The resulting array is the same object, the order is based on _compareValues function.
|
|
3988
|
-
*
|
|
3989
|
-
* @method order
|
|
3990
|
-
* @global
|
|
3991
|
-
* @example
|
|
3992
|
-
* ```javascript
|
|
3993
|
-
* bbn.fn.order([
|
|
3994
|
-
* {movie: "Brazil", year: 1985},
|
|
3995
|
-
* {movie: "Donnie Darko", year: 2001},
|
|
3996
|
-
* {movie: "Barry Lindon", year: 1976}
|
|
3997
|
-
* ], 'year', 'DESC')
|
|
3998
|
-
* // [
|
|
3999
|
-
* // {movie: "Donnie Darko", year: 2001},
|
|
4000
|
-
* // {movie: "Brazil", year: 1985},
|
|
4001
|
-
* // {movie: "Barry Lindon", year: 1976}
|
|
4002
|
-
* // ]
|
|
4003
|
-
* ```
|
|
4004
|
-
* @memberof bbn.fn
|
|
4005
|
-
* @param {Array} arr The array to order
|
|
4006
|
-
* @param {String} prop The property on which the order is based
|
|
4007
|
-
* @param {String} [dir=asc] The direction of the order (desc or asc by default)
|
|
4008
|
-
* @returns {Array}
|
|
4009
|
-
*/
|
|
4010
|
-
const order: (arr: any, prop: any, dir?: string) => any;
|
|
4011
|
-
export { order };
|
|
4012
|
-
}
|
|
4013
|
-
declare module "fn/html/selector" {
|
|
4014
|
-
/**
|
|
4015
|
-
* @ignore
|
|
4016
|
-
* @method selector
|
|
4017
|
-
* @todo Add method description for selector
|
|
4018
|
-
* @global
|
|
4019
|
-
* @memberof bbn.fn
|
|
4020
|
-
* @returns {HTMLElement | undefined}
|
|
4021
|
-
*/
|
|
4022
|
-
const selector: (ele: any) => any;
|
|
4023
|
-
export { selector };
|
|
4024
|
-
}
|
|
4025
|
-
declare module "fn/style/outerHeight" {
|
|
4026
|
-
/**
|
|
4027
|
-
*
|
|
4028
|
-
* @ignore
|
|
4029
|
-
* @method outerHeight
|
|
4030
|
-
* @todo Add method description for outerHeight
|
|
4031
|
-
* @global
|
|
4032
|
-
* @memberof bbn.fn
|
|
4033
|
-
* @returns {*}
|
|
4034
|
-
*/
|
|
4035
|
-
const outerHeight: (ele: HTMLElement) => number | false;
|
|
4036
|
-
export { outerHeight };
|
|
4037
|
-
}
|
|
4038
|
-
declare module "fn/style/outerWidth" {
|
|
4039
|
-
/**
|
|
4040
|
-
* @ignore
|
|
4041
|
-
* @method outerWidth
|
|
4042
|
-
* @todo Add method description for outerWidth
|
|
4043
|
-
* @global
|
|
4044
|
-
* @memberof bbn.fn
|
|
4045
|
-
* @returns {*}
|
|
4046
|
-
*/
|
|
4047
|
-
const outerWidth: (ele: HTMLElement) => number | false;
|
|
4048
|
-
export { outerWidth };
|
|
4049
|
-
}
|
|
4050
|
-
declare module "fn/misc/percent" {
|
|
4051
|
-
/**
|
|
4052
|
-
* Returns the value of the proportion giving the percentage and the total from where to be calculated.
|
|
4053
|
-
* @method percent
|
|
4054
|
-
* @global
|
|
4055
|
-
*
|
|
4056
|
-
* @example
|
|
4057
|
-
* ```javascript
|
|
4058
|
-
* //150
|
|
4059
|
-
* bbn.fn.percent('15',1000);
|
|
4060
|
-
* ```
|
|
4061
|
-
*
|
|
4062
|
-
* @example
|
|
4063
|
-
* ```javascript
|
|
4064
|
-
* //75
|
|
4065
|
-
* bbn.fn.percent(15,500);
|
|
4066
|
-
* ```
|
|
4067
|
-
* @memberof bbn.fn
|
|
4068
|
-
* @param {Number|String} percent
|
|
4069
|
-
* @param {Number|String} cent
|
|
4070
|
-
* @returns {Number}
|
|
4071
|
-
*/
|
|
4072
|
-
const percent: (percent: any, cent: any) => number;
|
|
4073
|
-
export { percent };
|
|
4074
|
-
}
|
|
4075
|
-
declare module "fn/object/pickValue" {
|
|
4076
|
-
const pickValue: (arr: any[]) => any;
|
|
4077
|
-
export { pickValue };
|
|
4078
|
-
}
|
|
4079
|
-
declare module "fn/object/setProperty" {
|
|
4080
|
-
/**
|
|
4081
|
-
* Returns the value of the given property from the given object.
|
|
4082
|
-
*
|
|
4083
|
-
* Looks for the given property in the given object, accepting dot (.) separator
|
|
4084
|
-
* for deep property access, and returns its value if found and undefined otherwise.
|
|
4085
|
-
*
|
|
4086
|
-
* @method getProperty
|
|
4087
|
-
* @global
|
|
4088
|
-
* @example
|
|
4089
|
-
* ```javascript
|
|
4090
|
-
* bbn.fn.getProperty({a: 1, b: 2}, 'b');
|
|
4091
|
-
* // 2
|
|
4092
|
-
* ```
|
|
4093
|
-
* @example
|
|
4094
|
-
* ```javascript
|
|
4095
|
-
* bbn.fn.getProperty({a: 1, b: {o: {a: 33, h: 5}}}, 'b.o.a');
|
|
4096
|
-
* // 33
|
|
4097
|
-
* ```
|
|
4098
|
-
* @example
|
|
4099
|
-
* ```javascript
|
|
4100
|
-
* bbn.fn.getProperty({a: 1, b: {o: {a: 33, h: 5}}}, 'b.h.a');
|
|
4101
|
-
* // undefined
|
|
4102
|
-
* ```
|
|
4103
|
-
* @memberof bbn.fn
|
|
4104
|
-
* @param {Object} obj
|
|
4105
|
-
* @param {String} prop
|
|
4106
|
-
* @returns {*} The property's value or undefined
|
|
4107
|
-
*/
|
|
4108
|
-
const setProperty: (obj: object, prop: string, value: any, force?: boolean) => void;
|
|
4109
|
-
export { setProperty };
|
|
4110
|
-
}
|
|
4111
|
-
declare module "fn/ajax/postOut" {
|
|
4112
|
-
/**
|
|
4113
|
-
* Posts a request in a new window.
|
|
4114
|
-
*
|
|
4115
|
-
* @method postOut
|
|
4116
|
-
* @global
|
|
4117
|
-
* @memberof bbn.fn
|
|
4118
|
-
*
|
|
4119
|
-
* @example
|
|
4120
|
-
* ```javascript
|
|
4121
|
-
* bbn.fn.postOut('https://external-service.com/download/account-2019-06.pdf', {clientId: 547912, token: xxx});
|
|
4122
|
-
* ```
|
|
4123
|
-
*
|
|
4124
|
-
* @param {String} url The url to which the request should be sent
|
|
4125
|
-
* @param {Object} data The data to be sent
|
|
4126
|
-
* @param {Function} success A function to execute in case of success
|
|
4127
|
-
* @param {String} target The target attribute of the form
|
|
4128
|
-
*
|
|
4129
|
-
* @returns {void}
|
|
4130
|
-
*/
|
|
4131
|
-
const postOut: (url: any, data: any, success?: any, target?: string) => void;
|
|
4132
|
-
export { postOut };
|
|
4133
|
-
}
|
|
4134
|
-
declare module "fn/string/printf" {
|
|
4135
|
-
/**
|
|
4136
|
-
* @method printf
|
|
4137
|
-
* @todo Add method description for printf
|
|
4138
|
-
* @global
|
|
4139
|
-
* @memberof bbn.fn
|
|
4140
|
-
* @param String format
|
|
4141
|
-
* @returns {*}
|
|
4142
|
-
*/
|
|
4143
|
-
const printf: (format: any) => any;
|
|
4144
|
-
export { printf };
|
|
4145
|
-
}
|
|
4146
|
-
declare module "fn/string/quotes2html" {
|
|
4147
|
-
/**
|
|
4148
|
-
* Replace quotes in ASCII code
|
|
4149
|
-
*
|
|
4150
|
-
* @method quotes2html
|
|
4151
|
-
* @global
|
|
4152
|
-
*
|
|
4153
|
-
* @example
|
|
4154
|
-
* ```javascript
|
|
4155
|
-
* bbn.fn.quotes2html("hello 'world'!", 's');
|
|
4156
|
-
* // hello 'world'!
|
|
4157
|
-
* ```
|
|
4158
|
-
*
|
|
4159
|
-
* @example
|
|
4160
|
-
* ```javascript
|
|
4161
|
-
* bbn.fn.quotes2html('hello "world\'s"!', 'd');
|
|
4162
|
-
* // hello "world'sd"!
|
|
4163
|
-
* ```
|
|
4164
|
-
*
|
|
4165
|
-
* @example
|
|
4166
|
-
* ```javascript
|
|
4167
|
-
* bbn.fn.quotes2html('hello "world\'s"!');
|
|
4168
|
-
* // hello "world'sd"!
|
|
4169
|
-
* ```
|
|
4170
|
-
*
|
|
4171
|
-
* @memberof bbn.fn
|
|
4172
|
-
* @param {String} st
|
|
4173
|
-
* @returns {String}
|
|
4174
|
-
*/
|
|
4175
|
-
const quotes2html: (st: string, type?: string) => string;
|
|
4176
|
-
export { quotes2html };
|
|
4177
|
-
}
|
|
4178
|
-
declare module "fn/misc/randomInt" {
|
|
4179
|
-
/**
|
|
4180
|
-
* Returns a random integer.
|
|
4181
|
-
*
|
|
4182
|
-
* Generates and returns a random number in a range of numbers defined
|
|
4183
|
-
* by passed arguments a minimum and a maximum.
|
|
4184
|
-
*
|
|
4185
|
-
* @method randomInt
|
|
4186
|
-
* @global
|
|
4187
|
-
*
|
|
4188
|
-
* @example
|
|
4189
|
-
* ```javascript
|
|
4190
|
-
* //56
|
|
4191
|
-
* bbn.fn.randomInt(1,100);
|
|
4192
|
-
* ```
|
|
4193
|
-
*
|
|
4194
|
-
* @memberof bbn.fn
|
|
4195
|
-
* @param {Number} min
|
|
4196
|
-
* @param {Number} max
|
|
4197
|
-
* @returns {Number}
|
|
4198
|
-
*/
|
|
4199
|
-
const randomInt: (min: number, max: number) => number;
|
|
4200
|
-
export { randomInt };
|
|
4201
|
-
}
|
|
4202
|
-
declare module "fn/string/randomString" {
|
|
4203
|
-
/**
|
|
4204
|
-
* Returns a random String with random lenght,
|
|
4205
|
-
*
|
|
4206
|
-
* Generates a random string from the length of the random number,
|
|
4207
|
-
* taken from a range of numbers providing either only the minimum or also the maximum as arguments.
|
|
4208
|
-
*
|
|
4209
|
-
* @method randomString
|
|
4210
|
-
* @global
|
|
4211
|
-
*
|
|
4212
|
-
* @example
|
|
4213
|
-
* ```javascript
|
|
4214
|
-
* //"U7xXO0Xb"
|
|
4215
|
-
* bbn.fn.randomString(3,10);
|
|
4216
|
-
* ```
|
|
4217
|
-
*
|
|
4218
|
-
* @example
|
|
4219
|
-
* ```javascript
|
|
4220
|
-
* //"H8F"
|
|
4221
|
-
* bbn.fn.randomString(3);
|
|
4222
|
-
* ```
|
|
4223
|
-
*
|
|
4224
|
-
* @memberof bbn.fn
|
|
4225
|
-
* @param {Number} length
|
|
4226
|
-
* @param {String} chars
|
|
4227
|
-
* @returns {String}
|
|
4228
|
-
*/
|
|
4229
|
-
const randomString: (min?: number, max?: string | number, types?: string) => string;
|
|
4230
|
-
export { randomString };
|
|
4231
|
-
}
|
|
4232
|
-
declare module "fn/object/removeEmpty" {
|
|
4233
|
-
/**
|
|
4234
|
-
* Returns a new array, having removed all elements deemed empty from the given array.
|
|
4235
|
-
*
|
|
4236
|
-
* Removes all the elements which are empty, i.e. false, 0, null, '', NaN, or undefined.
|
|
4237
|
-
*
|
|
4238
|
-
* @method removeEmpty
|
|
4239
|
-
* @global
|
|
4240
|
-
* @example
|
|
4241
|
-
* ```javascript
|
|
4242
|
-
* bbn.fn.removeEmpty([{prop1: 10, prop2: 20}, '', {}, null, 1, undefined, 0, false, 25]);
|
|
4243
|
-
* // [{prop1: 10, prop2: 20}, 1, 25]
|
|
4244
|
-
* ```
|
|
4245
|
-
* @memberof bbn.fn
|
|
4246
|
-
* @param {Array} arr
|
|
4247
|
-
* @returns {Array}
|
|
4248
|
-
*/
|
|
4249
|
-
const removeEmpty: (arr: any[]) => any[];
|
|
4250
|
-
export { removeEmpty };
|
|
4251
|
-
}
|
|
4252
|
-
declare module "fn/string/removeExtraSpaces" {
|
|
4253
|
-
/**
|
|
4254
|
-
* Removes all group of spaces by one single space.
|
|
4255
|
-
* @param {String} str
|
|
4256
|
-
* @returns
|
|
4257
|
-
*/
|
|
4258
|
-
const removeExtraSpaces: (str: string) => string;
|
|
4259
|
-
export { removeExtraSpaces };
|
|
4260
|
-
}
|
|
4261
|
-
declare module "fn/string/removeTrailingChars" {
|
|
4262
|
-
/**
|
|
4263
|
-
* @method removeTrailingChars
|
|
4264
|
-
* @todo Add method description for removeTrailingChars
|
|
4265
|
-
* @global
|
|
4266
|
-
* @memberof bbn.fn
|
|
4267
|
-
* @param {String} st
|
|
4268
|
-
* @param {String} char
|
|
4269
|
-
* @returns {*}
|
|
4270
|
-
*/
|
|
4271
|
-
const removeTrailingChars: (st: string, char?: string) => string;
|
|
4272
|
-
export { removeTrailingChars };
|
|
4273
|
-
}
|
|
4274
|
-
declare module "fn/string/repeat" {
|
|
4275
|
-
/**
|
|
4276
|
-
* Returns a string which is the repetition of the first argument for the number passed in the second argument.
|
|
4277
|
-
*
|
|
4278
|
-
* @method repeat
|
|
4279
|
-
* @global
|
|
4280
|
-
*
|
|
4281
|
-
* @example
|
|
4282
|
-
* ```javascript
|
|
4283
|
-
* //"HelloHelloHello"
|
|
4284
|
-
* bbn.fn.repeat('Hello', 3);
|
|
4285
|
-
* ```
|
|
4286
|
-
* @memberof bbn.fn
|
|
4287
|
-
* @returns {String}
|
|
4288
|
-
*/
|
|
4289
|
-
const repeat: (st: string, num: number) => string;
|
|
4290
|
-
export { repeat };
|
|
4291
|
-
}
|
|
4292
|
-
declare module "fn/browser/replaceSelection" {
|
|
4293
|
-
const replaceSelection: (html: any, selectInserted: any) => void;
|
|
4294
|
-
export { replaceSelection };
|
|
4295
|
-
}
|
|
4296
|
-
declare module "fn/convert/rgb2hex" {
|
|
4297
|
-
/**
|
|
4298
|
-
* Convert an RGB string to hexadecimal.
|
|
4299
|
-
*
|
|
4300
|
-
* Passing a string with the format that defines the rgb value as an argument,
|
|
4301
|
-
* it will return the corresponding string in hexadecimal format.
|
|
4302
|
-
*
|
|
4303
|
-
* @method rgb2hex
|
|
4304
|
-
* @global
|
|
4305
|
-
*
|
|
4306
|
-
* @example
|
|
4307
|
-
* ```javascript
|
|
4308
|
-
* //"#ff0000"
|
|
4309
|
-
* bbn.fn.rgb2hex("rgb(255, 0, 0)");
|
|
4310
|
-
* ```
|
|
4311
|
-
* @memberof bbn.fn
|
|
4312
|
-
* @param {String} rgb
|
|
4313
|
-
* @returns {String}
|
|
4314
|
-
*/
|
|
4315
|
-
const rgb2hex: (rgb: any) => string;
|
|
4316
|
-
export { rgb2hex };
|
|
4317
|
-
}
|
|
4318
|
-
declare module "fn/loop/riterate" {
|
|
4319
|
-
/**
|
|
4320
|
-
* Executes the provided function on each property of the given object.
|
|
4321
|
-
*
|
|
4322
|
-
* @method riterate
|
|
4323
|
-
* @global
|
|
4324
|
-
* @example
|
|
4325
|
-
* ```javascript
|
|
4326
|
-
* //["value1", 2]
|
|
4327
|
-
* let arr = [];
|
|
4328
|
-
* bbn.fn.iterate({field1: "value1", field2: 2}, (val, idx) => {
|
|
4329
|
-
* arr.push(value);
|
|
4330
|
-
* });
|
|
4331
|
-
* ```
|
|
4332
|
-
* @memberof bbn.fn
|
|
4333
|
-
* @param {(Object|Number)} obj The object to loop on
|
|
4334
|
-
* @param {Function} fn The function, gets the array's element and the index as arguments
|
|
4335
|
-
* @param {Boolean} noPrivate If set to true the _private_ properties won't be included
|
|
4336
|
-
* @returns {Object}
|
|
4337
|
-
*/
|
|
4338
|
-
const riterate: (obj: any, fn: any, noPrivate?: boolean) => any;
|
|
4339
|
-
export { riterate };
|
|
4340
|
-
}
|
|
4341
|
-
declare module "fn/misc/roundDecimal" {
|
|
4342
|
-
/**
|
|
4343
|
-
* @method roundDecimal
|
|
4344
|
-
* @todo Add method description for roundDecimal
|
|
4345
|
-
* @global
|
|
4346
|
-
* @memberof bbn.fn
|
|
4347
|
-
* @param {Number} value
|
|
4348
|
-
* @param {Number} decimals
|
|
4349
|
-
* @returns {}
|
|
4350
|
-
*/
|
|
4351
|
-
const roundDecimal: (value: number, decimals: number) => number;
|
|
4352
|
-
export { roundDecimal };
|
|
4353
|
-
}
|
|
4354
|
-
declare module "fn/string/trim" {
|
|
4355
|
-
const trim: (str: any, hair?: string) => any;
|
|
4356
|
-
export { trim };
|
|
4357
|
-
}
|
|
4358
|
-
declare module "fn/string/sanitize" {
|
|
4359
|
-
/**
|
|
4360
|
-
* Removes all unacceptable characters in a DOM node.
|
|
4361
|
-
*
|
|
4362
|
-
* @method sanitize
|
|
4363
|
-
* @global
|
|
4364
|
-
*
|
|
4365
|
-
* @example
|
|
4366
|
-
* ```javascript
|
|
4367
|
-
* //"this_is_a_test"
|
|
4368
|
-
* bbn.fn.sanitize("this&is_$a^test");
|
|
4369
|
-
* ```
|
|
4370
|
-
*
|
|
4371
|
-
* @memberof bbn.fn
|
|
4372
|
-
* @returns {String} str
|
|
4373
|
-
*/
|
|
4374
|
-
const sanitize: (str: any, separator?: string) => any;
|
|
4375
|
-
export { sanitize };
|
|
4376
|
-
}
|
|
4377
|
-
declare module "fn/browser/selectElementText" {
|
|
4378
|
-
/**
|
|
4379
|
-
* Selects the content of an element.
|
|
4380
|
-
*
|
|
4381
|
-
* @method selectElementText
|
|
4382
|
-
* @global
|
|
4383
|
-
* @example
|
|
4384
|
-
* ``` javascript
|
|
4385
|
-
* bbn.fn.selectElementText(document.getElementById('my_input_id'));
|
|
4386
|
-
* // false
|
|
4387
|
-
* bbn.fn.selectElementText(bbn.$('#my_span_id'));
|
|
4388
|
-
* // true
|
|
4389
|
-
* ```
|
|
4390
|
-
* @memberof bbn.fn
|
|
4391
|
-
*
|
|
4392
|
-
* @param {Element} ele The element in which the text should be selected
|
|
4393
|
-
* @param {Boolean} win The window object
|
|
4394
|
-
*
|
|
4395
|
-
* @returns {Boolean} True if focused
|
|
4396
|
-
*/
|
|
4397
|
-
const selectElementText: (ele: any, win?: any) => void;
|
|
4398
|
-
export { selectElementText };
|
|
4399
|
-
}
|
|
4400
|
-
declare module "fn/browser/setCookie" {
|
|
4401
|
-
/**
|
|
4402
|
-
* Creates a cookie and assigns it to document.cookie.
|
|
4403
|
-
* @method setCookie
|
|
4404
|
-
* @global
|
|
4405
|
-
* @example
|
|
4406
|
-
* ``` javascript
|
|
4407
|
-
* bbn.fn.setCookie('lang', 'en', 2);
|
|
4408
|
-
* ```
|
|
4409
|
-
* @memberof bbn.fn
|
|
4410
|
-
* @param {String} name The name of the cookie.
|
|
4411
|
-
* @param {String} value The value of the cookie.
|
|
4412
|
-
* @param {Number} days The days before expiration of the cookie.
|
|
4413
|
-
* @returns
|
|
4414
|
-
*/
|
|
4415
|
-
const setCookie: (name: any, value: any, days: any) => void;
|
|
4416
|
-
export { setCookie };
|
|
4417
|
-
}
|
|
4418
|
-
declare module "fn/style/setCssVar" {
|
|
4419
|
-
/**
|
|
4420
|
-
* Creates a CSS variable
|
|
4421
|
-
* @param {String*} varname
|
|
4422
|
-
* @param {String*} value
|
|
4423
|
-
* @returns
|
|
4424
|
-
*/
|
|
4425
|
-
const setCssVar: (varname: any, value: any) => void;
|
|
4426
|
-
export { setCssVar };
|
|
4427
|
-
}
|
|
4428
|
-
declare module "fn/object/setProp" {
|
|
4429
|
-
/**
|
|
4430
|
-
* Sets a given property on the given object
|
|
4431
|
-
*
|
|
4432
|
-
* @param {Object} obj
|
|
4433
|
-
* @param {String} prop
|
|
4434
|
-
* @param {*} value
|
|
4435
|
-
* @param {Boolean} writable
|
|
4436
|
-
* @param {Boolean} configurable
|
|
4437
|
-
*/
|
|
4438
|
-
const setProp: (obj: object, prop: string, value: any, writable?: boolean, configurable?: boolean) => void;
|
|
4439
|
-
export { setProp };
|
|
4440
|
-
}
|
|
4441
|
-
declare module "fn/string/shorten" {
|
|
4442
|
-
/**
|
|
4443
|
-
* Shortens the given string after *len* characters.
|
|
4444
|
-
*
|
|
4445
|
-
* Provides an abbreviation to the string passed as the first argument,
|
|
4446
|
-
* deciding through the second argument the number of characters to keep and the remainder replaced
|
|
4447
|
-
* by what is passed as the third argument and if not given a defalut it is: '...'
|
|
4448
|
-
*
|
|
4449
|
-
* @method shorten
|
|
4450
|
-
* @global
|
|
4451
|
-
*
|
|
4452
|
-
* @example
|
|
4453
|
-
* ```javascript
|
|
4454
|
-
* //"test***"
|
|
4455
|
-
* bbn.fn.shorten('testing', 4, '***');
|
|
4456
|
-
* ```
|
|
4457
|
-
* @example
|
|
4458
|
-
* ```javascript
|
|
4459
|
-
* //"test..."
|
|
4460
|
-
* bbn.fn.shorten('testing', 4);
|
|
4461
|
-
* ```
|
|
4462
|
-
* @memberof bbn.fn
|
|
4463
|
-
* @param {String} st
|
|
4464
|
-
* @param {Number} len
|
|
4465
|
-
* @returns {String}
|
|
4466
|
-
*/
|
|
4467
|
-
const shorten: (st: string, len?: number, adj?: string) => string;
|
|
4468
|
-
export { shorten };
|
|
4469
|
-
}
|
|
4470
|
-
declare module "fn/object/shortenObj" {
|
|
4471
|
-
/**
|
|
4472
|
-
* Shortens all the strings contained in the object properties or element in a array.
|
|
4473
|
-
*
|
|
4474
|
-
* Modifies directly the given object by cuttin all its too long strings, and adding ellipsis (...) in this case.
|
|
4475
|
-
*
|
|
4476
|
-
* @method shortenObj
|
|
4477
|
-
* @global
|
|
4478
|
-
* @example
|
|
4479
|
-
* ```javascript
|
|
4480
|
-
* bbn.fn.shortenObj({
|
|
4481
|
-
* title: "Once upon a time in the west",
|
|
4482
|
-
* synopsis: "There's a single piece of land around Flagstone with water on it, and rail baron Morton (Gabriele Ferzetti) aims to have it, knowing the new railroad will have to stop there. He sends his henchman Frank (Henry Fonda) to scare the land's owner, McBain (Frank Wolff), but Frank kills him instead and pins it on a known bandit, Cheyenne (Jason Robards). Meanwhile, a mysterious gunslinger with a score to settle (Charles Bronson) and McBain's new wife, Jill (Claudia Cardinale), arrive in town."
|
|
4483
|
-
* }, 50)
|
|
4484
|
-
* // {
|
|
4485
|
-
* // "title": "Once upon a time in the west",
|
|
4486
|
-
* // "synopsis": "There's a single piece of land around Flagstone wi..."
|
|
4487
|
-
* // }
|
|
4488
|
-
* ```
|
|
4489
|
-
* @memberof bbn.fn
|
|
4490
|
-
* @param {(Object|Array)} obj
|
|
4491
|
-
* @param {Number} [max=100]
|
|
4492
|
-
* @returns {(Object|Array)} The same object, modified
|
|
4493
|
-
*/
|
|
4494
|
-
const shortenObj: (obj: any, max?: number) => object;
|
|
4495
|
-
export { shortenObj };
|
|
4496
|
-
}
|
|
4497
|
-
declare module "fn/object/shuffle" {
|
|
4498
|
-
const shuffle: (array: any[]) => any[];
|
|
4499
|
-
export { shuffle };
|
|
4500
|
-
}
|
|
4501
|
-
declare module "fn/datetime/chrono" {
|
|
4502
|
-
/**
|
|
4503
|
-
* Starts a timer and gives it a name.
|
|
4504
|
-
* @method startChrono
|
|
4505
|
-
* @global
|
|
4506
|
-
* ``` javascript
|
|
4507
|
-
* bbn.fn.startChrono('myChrono');
|
|
4508
|
-
* ```
|
|
4509
|
-
* @memberof bbn.fn
|
|
4510
|
-
* @returns
|
|
4511
|
-
*/
|
|
4512
|
-
const startChrono: (name: any) => void;
|
|
4513
|
-
/**
|
|
4514
|
-
* @method stopChrono
|
|
4515
|
-
* @global
|
|
4516
|
-
* @example
|
|
4517
|
-
* ``` javascript
|
|
4518
|
-
* bbn.fn.stopChrono('myChrono');
|
|
4519
|
-
* // 20162
|
|
4520
|
-
* ```
|
|
4521
|
-
* @memberof bbn.fn
|
|
4522
|
-
* @param {String} name
|
|
4523
|
-
* @returns {Number}
|
|
4524
|
-
*/
|
|
4525
|
-
const stopChrono: (name: any) => number;
|
|
4526
|
-
export { startChrono, stopChrono };
|
|
4527
|
-
}
|
|
4528
|
-
declare module "fn/convert/string2ArrayBuffer" {
|
|
4529
|
-
const string2ArrayBuffer: (str: string) => ArrayBuffer;
|
|
4530
|
-
export { string2ArrayBuffer };
|
|
4531
|
-
}
|
|
4532
|
-
declare module "fn/object/sum" {
|
|
4533
|
-
/**
|
|
4534
|
-
* Returns the sum of the given property or function for the array's elements matching the filter.
|
|
4535
|
-
*
|
|
4536
|
-
* The filtering arguments follow the same scheme as bbn.fn.search.
|
|
4537
|
-
*
|
|
4538
|
-
* @method sum
|
|
4539
|
-
* @global
|
|
4540
|
-
* @example
|
|
4541
|
-
* ```javascript
|
|
4542
|
-
* let invited = [
|
|
4543
|
-
* {name: "Robert De Niro", attendees: 2, confirmed: true},
|
|
4544
|
-
* {name: "Al Pacino", attendees: 1, confirmed: false},
|
|
4545
|
-
* {name: "James Caan", attendees: 4, confirmed: false},
|
|
4546
|
-
* {name: "Harvey Keitel", attendees: 5, confirmed: true}
|
|
4547
|
-
* ];
|
|
4548
|
-
* // No filter
|
|
4549
|
-
* bbn.fn.sum(invited, "attendees");
|
|
4550
|
-
* // 12
|
|
4551
|
-
* // Filter
|
|
4552
|
-
* bbn.fn.sum(invited, "attendees", {confirmed: true});
|
|
4553
|
-
* // 7
|
|
4554
|
-
* ```
|
|
4555
|
-
* @example
|
|
4556
|
-
* ```javascript
|
|
4557
|
-
* let cart = [
|
|
4558
|
-
* {article: "Toothpaste", price: 2.50, quantity: 1},
|
|
4559
|
-
* {article: "Toothbrush", price: 6, quantity: 2},
|
|
4560
|
-
* {article: "Banana", price: 0.50, quantity: 3},
|
|
4561
|
-
* {article: "T-shirt", price: 14, quantity: 3}
|
|
4562
|
-
* ];
|
|
4563
|
-
* bbn.fn.sum(cart, a => a.price * a.quantity);
|
|
4564
|
-
* // 58
|
|
4565
|
-
* // Only the items with a quantity equal to 3
|
|
4566
|
-
* bbn.fn.sum(cart, a => a.price * a.quantity, {quantity: 3});
|
|
4567
|
-
* // 43.5
|
|
4568
|
-
* ```
|
|
4569
|
-
* @memberof bbn.fn
|
|
4570
|
-
* @param {Array} arr The subject array
|
|
4571
|
-
* @param {(String|Function)} numberProp The property's name for which the value should be added to the sum, or a function returning the number.
|
|
4572
|
-
* @param {(String|Object|Function)} prop A property's name or a filter object or function
|
|
4573
|
-
* @param {*} val The value with which comparing the given property
|
|
4574
|
-
* @param {String} operator The operator to use for comparison with the value as used in bbn.fn.compare
|
|
4575
|
-
* @returns {Number} The sum
|
|
4576
|
-
*/
|
|
4577
|
-
const sum: (arr: object[], numberProp: string | ((a: any) => any), prop: object | string, val?: any, operator?: string) => number;
|
|
4578
|
-
export { sum };
|
|
4579
|
-
}
|
|
4580
|
-
declare module "fn/datetime/timestamp" {
|
|
4581
|
-
/**
|
|
4582
|
-
* Returns the timestamp of the given seconds if an argument is given, else returns the timestamp of new Date().
|
|
4583
|
-
* @method timestamp
|
|
4584
|
-
* @global
|
|
4585
|
-
* @example
|
|
4586
|
-
* ```javascript
|
|
4587
|
-
* //1587031047918
|
|
4588
|
-
* bbn.fn.timestamp();
|
|
4589
|
-
* ```
|
|
4590
|
-
* @memberof bbn.fn
|
|
4591
|
-
* @param {Number} seconds
|
|
4592
|
-
* @returns {Boolean}
|
|
4593
|
-
*/
|
|
4594
|
-
const timestamp: (seconds?: boolean) => number;
|
|
4595
|
-
export { timestamp };
|
|
4596
|
-
}
|
|
4597
|
-
declare module "fn/convert/toCSV" {
|
|
4598
|
-
/**
|
|
4599
|
-
* Returns a CSV string from the given array of arrays or objects.
|
|
4600
|
-
*
|
|
4601
|
-
* @method toCSV
|
|
4602
|
-
* @global
|
|
4603
|
-
* @example
|
|
4604
|
-
* ```javascript
|
|
4605
|
-
* bbn.fn.toCSV([['a', 'b', 'c'], ['d', 'e', 'f']]);
|
|
4606
|
-
* // "a","b","c";
|
|
4607
|
-
* // "d","e","f"
|
|
4608
|
-
* ```
|
|
4609
|
-
* @example
|
|
4610
|
-
* ```javascript
|
|
4611
|
-
* bbn.fn.toCSV([{name: "Capuche", fname: "Marc-Antoine"}, {name: "Orfin", fname: "Louis"}]);
|
|
4612
|
-
* // "Capuche","Marc-Antoine";
|
|
4613
|
-
* // "Orfin","Louis"
|
|
4614
|
-
* ```
|
|
4615
|
-
* @memberof bbn.fn
|
|
4616
|
-
* @param {Array} arr The array to convert
|
|
4617
|
-
* @param {String} [valSep=,] The value separator character
|
|
4618
|
-
* @param {String} [rowSep=;] The row separator character
|
|
4619
|
-
* @param {String} [valEsc="] The string escaper character
|
|
4620
|
-
* @returns {String} A CSV string
|
|
4621
|
-
*/
|
|
4622
|
-
const toCSV: (arr: any, valSep?: string, rowSep?: string, valEsc?: string) => string;
|
|
4623
|
-
export { toCSV };
|
|
4624
|
-
}
|
|
4625
|
-
declare module "fn/browser/toggleFullScreen" {
|
|
4626
|
-
const toggleFullScreen: () => void;
|
|
4627
|
-
export { toggleFullScreen };
|
|
4628
|
-
}
|
|
4629
|
-
declare module "fn/misc/translate" {
|
|
4630
|
-
const translate: (o: object, namespace?: string) => void;
|
|
4631
|
-
export { translate };
|
|
4632
|
-
}
|
|
4633
|
-
declare module "fn/string/uniqString" {
|
|
4634
|
-
/**
|
|
4635
|
-
* Create a unique string in md5 format.
|
|
4636
|
-
*
|
|
4637
|
-
* Converts and return all the arguments inserted in a unique string in md5 format.
|
|
4638
|
-
*
|
|
4639
|
-
* @method uniqString
|
|
4640
|
-
* @global
|
|
4641
|
-
*
|
|
4642
|
-
* @example
|
|
4643
|
-
* ```javascript
|
|
4644
|
-
* //"6cb083da4d4987af9b4fa4ad8ca23bb1"
|
|
4645
|
-
* bbn.fn.uniqString('test',['test'],{id:1, test:2},4);
|
|
4646
|
-
* ```
|
|
4647
|
-
* @memberof bbn.fn
|
|
4648
|
-
* @returns {String} The unique string in md5 format
|
|
4649
|
-
*/
|
|
4650
|
-
const uniqString: (...args: any[]) => string;
|
|
4651
|
-
export { uniqString };
|
|
4652
|
-
}
|
|
4653
|
-
declare module "fn/ajax/upload" {
|
|
4654
|
-
/**
|
|
4655
|
-
* Uploads a file synchronously through an XHR indicating progress.
|
|
4656
|
-
*
|
|
4657
|
-
* @method upload
|
|
4658
|
-
* @todo examples
|
|
4659
|
-
* @global
|
|
4660
|
-
* @memberof bbn.fn
|
|
4661
|
-
*
|
|
4662
|
-
* @param {String} url The URL to which the file should be uploaded
|
|
4663
|
-
* @param {File} file A File object or an array of data
|
|
4664
|
-
* @param {Function} success A function to execute after success
|
|
4665
|
-
* @param {Function} failure A function to execute after failure
|
|
4666
|
-
* @param {Function} progress A function to execute during progress
|
|
4667
|
-
*
|
|
4668
|
-
* @returns {Promise}
|
|
4669
|
-
*/
|
|
4670
|
-
const upload: (url: any, file: any, success?: any, failure?: any, progress?: any) => any;
|
|
4671
|
-
export { upload };
|
|
4672
|
-
}
|
|
4673
|
-
declare module "fn" {
|
|
4674
|
-
const fn: {
|
|
4675
|
-
_addLoader: (requestId: any, prom: any, source: any) => number;
|
|
4676
|
-
_compareValues: (a: any, b: any, prop: any, dir?: string) => 0 | 1 | -1;
|
|
4677
|
-
_deleteLoader: (requestId: any, res?: any, isAbort?: boolean) => boolean;
|
|
4678
|
-
abort: (requestId: any) => void;
|
|
4679
|
-
abortURL: (url: any) => void;
|
|
4680
|
-
addColors: (colors: object) => void;
|
|
4681
|
-
addInputs: (form: any, params?: any, prefix?: string) => void;
|
|
4682
|
-
addStyle: (ele: any, o: any) => void;
|
|
4683
|
-
adjustHeight: () => void;
|
|
4684
|
-
adjustSize: (type: any, eles: any) => void;
|
|
4685
|
-
adjustWidth: () => void;
|
|
4686
|
-
ajax: (url: any, datatype?: any, data?: any, success?: any, failure?: any, abort?: any) => any;
|
|
4687
|
-
analyzeFunction: (fn: any) => {
|
|
4688
|
-
body: any;
|
|
4689
|
-
args: any[];
|
|
4690
|
-
argString: string;
|
|
4691
|
-
isArrow: boolean;
|
|
4692
|
-
hasFunction: boolean;
|
|
4693
|
-
name: any;
|
|
4694
|
-
isAsync: boolean;
|
|
4695
|
-
hash: string;
|
|
4696
|
-
};
|
|
4697
|
-
animateCss: (ele: any, animationName: any, callback: any) => void;
|
|
4698
|
-
arrayBuffer2String: (buf: any) => any;
|
|
4699
|
-
arrayFromProp: (arr: any, prop: any) => any[];
|
|
4700
|
-
autoExtend: (namespace: any, obj: any) => void;
|
|
4701
|
-
baseName: (path: string, suffix?: string) => string;
|
|
4702
|
-
br2nl: (st: any) => string;
|
|
4703
|
-
calendar: (d: any, wrong_result?: boolean) => any;
|
|
4704
|
-
callback: (url: any, res?: any, fn?: any, fn2?: any, ele?: any) => boolean;
|
|
4705
|
-
camelize: (str: any) => any;
|
|
4706
|
-
camelToCss: (str: any) => any;
|
|
4707
|
-
canvasToImage: (canvas: any) => HTMLImageElement;
|
|
4708
|
-
center: (ele: any) => any;
|
|
4709
|
-
checkProps: (obj: object, props: string | string[], checkEmpty?: boolean) => boolean;
|
|
4710
|
-
checkPropsDetails: (obj: object, props: string | string[], checkEmpty?: boolean) => BbnResError;
|
|
4711
|
-
checkPropsOrDie: (obj: object, props: string | string[], checkEmpty?: boolean) => boolean;
|
|
4712
|
-
checkType: (value: any, type: string | object, msg?: string, ...logs: any[]) => void;
|
|
4713
|
-
circularReplacer: () => (key: any, value: any) => any;
|
|
4714
|
-
clone: (obj: any) => any;
|
|
4715
|
-
colorToHex: (color: any) => string | CanvasGradient | CanvasPattern;
|
|
4716
|
-
compare: (v1: any, v2: any, operator: any) => boolean;
|
|
4717
|
-
compareConditions: (data: any, filter: any) => boolean;
|
|
4718
|
-
copy: (st: any) => Promise<unknown>;
|
|
4719
|
-
correctCase: (str: any) => any;
|
|
4720
|
-
count: (arr: any[], prop: string | object, val?: any, operator?: string) => number;
|
|
4721
|
-
crc32: (str: any) => number;
|
|
4722
|
-
createObject: (...args: any[]) => any;
|
|
4723
|
-
cssExists: (f: any) => boolean;
|
|
4724
|
-
date: (v: any) => any;
|
|
4725
|
-
dateSQL: (v: any, dayOnly: any) => any;
|
|
4726
|
-
daysInMonth: (v: any) => number | false;
|
|
4727
|
-
deepPath: (arr: any[], filter: object, deepProperty: string, res?: any[]) => false | any[];
|
|
4728
|
-
defaultAjaxAbortFunction: (message: any, url?: string) => void;
|
|
4729
|
-
defaultAjaxErrorFunction: (jqXHR: any, textStatus?: any, errorThrown?: any) => void;
|
|
4730
|
-
defaultAlertFunction: (msg: any, title?: any) => void;
|
|
4731
|
-
defaultConfirmFunction: (text: any, yesFn: any, noFn?: any) => void;
|
|
4732
|
-
defaultEndLoadingFunction: (url: any, timestamp: any, data?: any, res?: any) => boolean;
|
|
4733
|
-
defaultErrorFunction: (message: any) => void;
|
|
4734
|
-
defaultHistoryFunction: (obj: any) => boolean;
|
|
4735
|
-
defaultLinkFunction: (responseObj: any, ele: any) => boolean;
|
|
4736
|
-
defaultPostLinkFunction: (r: any, ele?: any) => boolean;
|
|
4737
|
-
defaultPreLinkFunction: (url: any, force?: boolean, ele?: any) => boolean;
|
|
4738
|
-
defaultResizeFunction: () => boolean;
|
|
4739
|
-
defaultStartLoadingFunction: (url: any, tst: any, data?: any, requestId?: any) => boolean;
|
|
4740
|
-
deleteProp: (obj: object, prop: string) => void;
|
|
4741
|
-
diffObj: (obj1: object, obj2: object, unchanged?: boolean, notRoot?: boolean) => any;
|
|
4742
|
-
dirName: (path: any) => string;
|
|
4743
|
-
download: (url: any, filename?: string, params?: any) => any;
|
|
4744
|
-
downloadContent: (filename: any, content: any, type?: any) => void;
|
|
4745
|
-
each: (arr: any, fn: any) => any;
|
|
4746
|
-
eraseCookie: (name: any) => void;
|
|
4747
|
-
error: (errorMsg: any) => never;
|
|
4748
|
-
escapeDquotes: (str: any) => any;
|
|
4749
|
-
escapeRegExp: (str: any) => any;
|
|
4750
|
-
escapeSquotes: (str: any) => any;
|
|
4751
|
-
escapeTicks: (str: any) => any;
|
|
4752
|
-
escapeUrl: (url: any, params: any) => string;
|
|
4753
|
-
extend: (...originalArgs: (boolean | object)[]) => any;
|
|
4754
|
-
extendOut: (...args: object[]) => any;
|
|
4755
|
-
fdate: (d: any, wrong_result?: boolean) => any;
|
|
4756
|
-
fdatetime: (d: any, wrong_result?: boolean) => any;
|
|
4757
|
-
fieldValue: (field: any) => any;
|
|
4758
|
-
fileExt: (filename: any) => any;
|
|
4759
|
-
filter: (arr: any[], prop: string | object | import("fn/object/filterToConditions").Filter | ((a: any, i: string | number | symbol) => boolean), val?: any, operator?: string) => any[];
|
|
4760
|
-
filterToConditions: (filter: any, operator?: string) => import("fn/object/filterToConditions").Filter;
|
|
4761
|
-
findAll: (arr: any, filter: any, deepProperty: any, res?: any[]) => any[];
|
|
4762
|
-
fori: (arr: any, fn: any, max?: number, min?: number) => void;
|
|
4763
|
-
forir: (arr: any, fn: any, max?: number, min?: number) => void;
|
|
4764
|
-
format: (str: any) => any;
|
|
4765
|
-
formatBytes: (bytes: any, decimals?: number) => string;
|
|
4766
|
-
formatDate: (date: any, format: any) => string;
|
|
4767
|
-
formatSize: (st: any, noValid: any) => any;
|
|
4768
|
-
formdata: (form: any) => {};
|
|
4769
|
-
fromXml: (xml: any, arrayTags: any) => {};
|
|
4770
|
-
ftime: (d: any, wrong_result: any) => any;
|
|
4771
|
-
getAllTags: () => any[];
|
|
4772
|
-
getAncestors: (ele: any, selector?: any) => any[];
|
|
4773
|
-
getAttributes: (ele: any) => any;
|
|
4774
|
-
getBrowserName: () => "Edge" | "Opera" | "Chrome" | "Internet Explorer" | "Firefox" | "Safari" | "Other";
|
|
4775
|
-
getBrowserVersion: () => string;
|
|
4776
|
-
getCookie: (name: any) => any;
|
|
4777
|
-
getCssVar: (varname: any) => string;
|
|
4778
|
-
getDay: (v: any) => number | false;
|
|
4779
|
-
getDeviceType: () => "mobile" | "tablet" | "desktop";
|
|
4780
|
-
getEventData: (e: any) => Promise<unknown>;
|
|
4781
|
-
getField: (arr: any[], field: string, prop?: string | object, val?: any, operator?: string) => any;
|
|
4782
|
-
getFieldValues: (arr: object[], field: string, prop: any, val: any, operator: any) => any[];
|
|
4783
|
-
getHtml: (ele: any, stripComments?: boolean) => any;
|
|
4784
|
-
getHTMLOfSelection: () => string;
|
|
4785
|
-
getLoader: (requestId: any) => BbnLoader;
|
|
4786
|
-
getPath: (element: any) => any;
|
|
4787
|
-
getProp: (obj: any, prop: any) => any;
|
|
4788
|
-
getProperty: (obj: any, prop: any) => any;
|
|
4789
|
-
getRequestId: (url: any, data: any, datatype: any) => string;
|
|
4790
|
-
getRow: (arr: any[], prop: string | object, val?: any, operator?: string) => any;
|
|
4791
|
-
getScrollBarSize: () => number;
|
|
4792
|
-
getText: (ele: any) => any;
|
|
4793
|
-
getTimeoff: () => number;
|
|
4794
|
-
happy: (...args: any[]) => any;
|
|
4795
|
-
hash: (obj: any) => string;
|
|
4796
|
-
hex2rgb: (hex: any) => {
|
|
4797
|
-
r: number;
|
|
4798
|
-
g: number;
|
|
4799
|
-
b: number;
|
|
4800
|
-
};
|
|
4801
|
-
history: () => false | History;
|
|
4802
|
-
html2text: (st: any) => any;
|
|
4803
|
-
imageToCanvas: (img: any) => HTMLCanvasElement;
|
|
4804
|
-
imgToBase64: (img: any, type?: string) => string;
|
|
4805
|
-
info: (...args: any[]) => any;
|
|
4806
|
-
init: (cfg: any, force: any) => void;
|
|
4807
|
-
isActiveInterface: (secs?: number) => boolean;
|
|
4808
|
-
isArray: (...args: any[]) => boolean;
|
|
4809
|
-
isBlob: (...args: any[]) => boolean;
|
|
4810
|
-
isBoolean: (...args: any[]) => boolean;
|
|
4811
|
-
isCanvas: (...args: any[]) => boolean;
|
|
4812
|
-
isColor: (...args: any[]) => boolean;
|
|
4813
|
-
isComment: (...args: any[]) => boolean;
|
|
4814
|
-
isCp: (...args: any[]) => boolean;
|
|
4815
|
-
isDate: (...args: any[]) => boolean;
|
|
4816
|
-
isDesktopDevice: () => boolean;
|
|
4817
|
-
isDimension: (...args: any[]) => boolean;
|
|
4818
|
-
isDom: (...args: any[]) => boolean;
|
|
4819
|
-
isEmail: (...args: any[]) => boolean;
|
|
4820
|
-
isEmpty: (obj: any) => boolean;
|
|
4821
|
-
isEvent: (...args: any[]) => boolean;
|
|
4822
|
-
isFocused: (ele: any, contain?: boolean) => boolean;
|
|
4823
|
-
isFunction: (...args: any[]) => boolean;
|
|
4824
|
-
isHostname: (...args: any[]) => boolean;
|
|
4825
|
-
isInside: (ele: any, ancestor: any) => boolean;
|
|
4826
|
-
isInt: (...args: any[]) => boolean;
|
|
4827
|
-
isIP: (...args: any[]) => boolean;
|
|
4828
|
-
isIterable: (...args: any[]) => boolean;
|
|
4829
|
-
isMobile: () => boolean;
|
|
4830
|
-
isMobileDevice: () => boolean;
|
|
4831
|
-
isNull: (...args: any[]) => boolean;
|
|
4832
|
-
isNumber: (...args: any[]) => boolean;
|
|
4833
|
-
isObject: (...args: any[]) => boolean;
|
|
4834
|
-
isPercent: (...args: any[]) => boolean;
|
|
4835
|
-
isPrimitive: (...args: any[]) => boolean;
|
|
4836
|
-
isPromise: (...args: any[]) => boolean;
|
|
4837
|
-
isPropSize: (name: any) => boolean;
|
|
4838
|
-
isSame: (obj1: any, obj2: any, done?: any[]) => boolean;
|
|
4839
|
-
isSQLDate: (...args: any[]) => boolean;
|
|
4840
|
-
isString: (...args: any[]) => boolean;
|
|
4841
|
-
isSymbol: (...args: any[]) => boolean;
|
|
4842
|
-
isTabletDevice: () => boolean;
|
|
4843
|
-
isURL: (...args: any[]) => boolean;
|
|
4844
|
-
isValidDimension: (st: any) => boolean;
|
|
4845
|
-
isValidName: (...args: any[]) => boolean;
|
|
4846
|
-
isValue: (...args: any[]) => boolean;
|
|
4847
|
-
isVue: (...args: any[]) => boolean;
|
|
4848
|
-
iterate: (obj: any, fn: any, noPrivate?: boolean, reverse?: boolean) => any;
|
|
4849
|
-
lightenDarkenHex: (hex: any, amt: any) => string;
|
|
4850
|
-
link: (...args: any[]) => any;
|
|
4851
|
-
log: (...args: any[]) => any;
|
|
4852
|
-
makeReactive: (obj: any, onSet: any, parent: any, parentProp: any) => any;
|
|
4853
|
-
map: (arr: any, fn: any, deepProp: any, level?: number) => any;
|
|
4854
|
-
md5: (st: any) => string;
|
|
4855
|
-
money: (val: number, kilo?: boolean, currency?: string, novalue?: string | false, decimal?: string, thousands?: string, precision?: number) => string;
|
|
4856
|
-
move: (arr: any[], fromIndex: number, toIndex: number) => any[];
|
|
4857
|
-
multiorder: (arr: object[], orders: any) => object[];
|
|
4858
|
-
nl2br: (st: any, keepNl: any) => string;
|
|
4859
|
-
numProperties: (obj: object) => number;
|
|
4860
|
-
objectToFormData: (obj: any, key?: string, ignoreList?: any) => FormData;
|
|
4861
|
-
order: (arr: any, prop: any, dir?: string) => any;
|
|
4862
|
-
outerHeight: (ele: HTMLElement) => number | false;
|
|
4863
|
-
outerWidth: (ele: HTMLElement) => number | false;
|
|
4864
|
-
percent: (percent: any, cent: any) => number;
|
|
4865
|
-
pickValue: (arr: any[]) => any;
|
|
4866
|
-
post: (...args: any[]) => any;
|
|
4867
|
-
postOut: (url: any, data: any, success?: any, target?: string) => void;
|
|
4868
|
-
printf: (format: any) => any;
|
|
4869
|
-
quotes2html: (st: string, type?: string) => string;
|
|
4870
|
-
randomInt: (min: number, max: number) => number;
|
|
4871
|
-
randomString: (min?: number, max?: string | number, types?: string) => string;
|
|
4872
|
-
removeAccents: (st: string) => string;
|
|
4873
|
-
removeEmpty: (arr: any[]) => any[];
|
|
4874
|
-
removeExtraSpaces: (str: string) => string;
|
|
4875
|
-
removeHtmlComments: (str: string) => string;
|
|
4876
|
-
removePrivateProp: (obj: object, deep?: boolean) => any;
|
|
4877
|
-
removeTrailingChars: (st: string, char?: string) => string;
|
|
4878
|
-
repeat: (st: string, num: number) => string;
|
|
4879
|
-
replaceAll: (find: string, replace: string, str: string, flags?: string) => string;
|
|
4880
|
-
replaceSelection: (html: any, selectInserted: any) => void;
|
|
4881
|
-
resize: () => void;
|
|
4882
|
-
rgb2hex: (rgb: any) => string;
|
|
4883
|
-
riterate: (obj: any, fn: any, noPrivate?: boolean) => any;
|
|
4884
|
-
roundDecimal: (value: number, decimals: number) => number;
|
|
4885
|
-
sanitize: (str: any, separator?: string) => any;
|
|
4886
|
-
search: (arr: any[], prop: string | object | import("fn/object/filterToConditions").Filter | ((a: any, i: string | number | symbol) => boolean), val?: any, operator?: string | number, startFrom?: number) => number;
|
|
4887
|
-
selectElementText: (ele: any, win?: any) => void;
|
|
4888
|
-
selector: (ele: any) => any;
|
|
4889
|
-
setCookie: (name: any, value: any, days: any) => void;
|
|
4890
|
-
setCssVar: (varname: any, value: any) => void;
|
|
4891
|
-
setNavigationVars: (url: any, title: any, data?: any, repl?: boolean) => void;
|
|
4892
|
-
setProp: (obj: object, prop: string, value: any, writable?: boolean, configurable?: boolean) => void;
|
|
4893
|
-
setProperty: (obj: object, prop: string, value: any, force?: boolean) => void;
|
|
4894
|
-
shorten: (st: string, len?: number, adj?: string) => string;
|
|
4895
|
-
shortenObj: (obj: any, max?: number) => object;
|
|
4896
|
-
shuffle: (array: any[]) => any[];
|
|
4897
|
-
simpleHash: (str: any) => string;
|
|
4898
|
-
simpleHash1: (str: string) => number;
|
|
4899
|
-
simpleHash2: (str: string) => number;
|
|
4900
|
-
startChrono: (name: any) => void;
|
|
4901
|
-
stopChrono: (name: any) => number;
|
|
4902
|
-
string2ArrayBuffer: (str: string) => ArrayBuffer;
|
|
4903
|
-
submit: (form: HTMLFormElement, e?: Event, fn?: Function) => void;
|
|
4904
|
-
substr: (str: string, from: number, length?: number) => string;
|
|
4905
|
-
sum: (arr: object[], numberProp: string | ((a: any) => any), prop: string | object, val?: any, operator?: string) => number;
|
|
4906
|
-
timestamp: (seconds?: boolean) => number;
|
|
4907
|
-
toCSV: (arr: any, valSep?: string, rowSep?: string, valEsc?: string) => string;
|
|
4908
|
-
toggleFullScreen: () => void;
|
|
4909
|
-
translate: (o: object, namespace?: string) => void;
|
|
4910
|
-
treatAjaxArguments: (args: any) => any;
|
|
4911
|
-
trim: (str: any, hair?: string) => any;
|
|
4912
|
-
uniqString: (...args: any[]) => string;
|
|
4913
|
-
unique: (arr: any[]) => any[];
|
|
4914
|
-
upload: (url: any, file: any, success?: any, failure?: any, progress?: any) => any;
|
|
4915
|
-
warning: (message: any) => void;
|
|
4916
|
-
};
|
|
4917
|
-
export { fn };
|
|
4918
|
-
}
|
|
4919
|
-
declare module "index" {
|
|
4920
|
-
const bbn: Bbn;
|
|
4921
|
-
export { bbn };
|
|
4922
|
-
}
|