@bbn/bbn 1.0.59 → 1.0.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (463) hide show
  1. package/dist/_.js +1 -1
  2. package/dist/bundle.d.ts +3804 -242
  3. package/dist/bundle.js +4061 -502
  4. package/dist/db.js +3 -3
  5. package/dist/fn/ajax/_addLoader.d.ts +16 -0
  6. package/dist/fn/ajax/_addLoader.js +51 -0
  7. package/dist/fn/ajax/_deleteLoader.d.ts +16 -0
  8. package/dist/fn/ajax/_deleteLoader.js +39 -0
  9. package/dist/fn/ajax/abort.d.ts +24 -0
  10. package/dist/fn/ajax/abort.js +36 -0
  11. package/dist/fn/ajax/abortURL.d.ts +22 -0
  12. package/dist/fn/ajax/abortURL.js +33 -0
  13. package/dist/fn/ajax/ajax.d.ts +58 -0
  14. package/dist/fn/ajax/ajax.js +170 -0
  15. package/dist/fn/ajax/callback.d.ts +37 -0
  16. package/dist/fn/ajax/callback.js +117 -0
  17. package/dist/fn/ajax/download.d.ts +30 -0
  18. package/dist/fn/ajax/download.js +64 -0
  19. package/dist/fn/ajax/downloadContent.d.ts +28 -0
  20. package/dist/fn/ajax/downloadContent.js +74 -0
  21. package/dist/fn/ajax/getLoader.d.ts +37 -0
  22. package/dist/fn/ajax/getLoader.js +44 -0
  23. package/dist/fn/ajax/getRequestId.d.ts +50 -0
  24. package/dist/fn/ajax/getRequestId.js +62 -0
  25. package/dist/fn/ajax/link.d.ts +26 -0
  26. package/dist/fn/ajax/link.js +129 -0
  27. package/dist/fn/ajax/post.d.ts +35 -0
  28. package/dist/fn/ajax/post.js +45 -0
  29. package/dist/fn/ajax/postOut.d.ts +21 -0
  30. package/dist/fn/ajax/postOut.js +49 -0
  31. package/dist/fn/ajax/setNavigationVars.d.ts +25 -0
  32. package/dist/fn/ajax/setNavigationVars.js +80 -0
  33. package/dist/fn/ajax/treatAjaxArguments.d.ts +53 -0
  34. package/dist/fn/ajax/treatAjaxArguments.js +127 -0
  35. package/dist/fn/ajax/upload.d.ts +18 -0
  36. package/dist/fn/ajax/upload.js +52 -0
  37. package/dist/fn/browser/copy.d.ts +15 -0
  38. package/dist/fn/browser/copy.js +50 -0
  39. package/dist/fn/browser/eraseCookie.d.ts +15 -0
  40. package/dist/fn/browser/eraseCookie.js +17 -0
  41. package/dist/fn/browser/error.d.ts +14 -0
  42. package/dist/fn/browser/error.js +29 -0
  43. package/dist/fn/browser/getBrowserName.d.ts +9 -0
  44. package/dist/fn/browser/getBrowserName.js +28 -0
  45. package/dist/fn/browser/getBrowserVersion.d.ts +9 -0
  46. package/dist/fn/browser/getBrowserVersion.js +29 -0
  47. package/dist/fn/browser/getCookie.d.ts +16 -0
  48. package/dist/fn/browser/getCookie.js +32 -0
  49. package/dist/fn/browser/getDeviceType.d.ts +14 -0
  50. package/dist/fn/browser/getDeviceType.js +23 -0
  51. package/dist/fn/browser/getEventData.d.ts +16 -0
  52. package/dist/fn/browser/getEventData.js +116 -0
  53. package/dist/fn/browser/happy.d.ts +14 -0
  54. package/dist/fn/browser/happy.js +22 -0
  55. package/dist/fn/browser/history.d.ts +2 -0
  56. package/dist/fn/browser/history.js +4 -0
  57. package/dist/fn/browser/info.d.ts +10 -0
  58. package/dist/fn/browser/info.js +19 -0
  59. package/dist/fn/browser/isActiveInterface.d.ts +14 -0
  60. package/dist/fn/browser/isActiveInterface.js +20 -0
  61. package/dist/fn/browser/isDesktopDevice.d.ts +14 -0
  62. package/dist/fn/browser/isDesktopDevice.js +17 -0
  63. package/dist/fn/browser/isFocused.d.ts +21 -0
  64. package/dist/fn/browser/isFocused.js +23 -0
  65. package/dist/fn/browser/isMobile.d.ts +14 -0
  66. package/dist/fn/browser/isMobile.js +18 -0
  67. package/dist/fn/browser/isMobileDevice.d.ts +2 -0
  68. package/dist/fn/browser/isMobileDevice.js +5 -0
  69. package/dist/fn/browser/isTabletDevice.d.ts +14 -0
  70. package/dist/fn/browser/isTabletDevice.js +17 -0
  71. package/dist/fn/browser/log.d.ts +15 -0
  72. package/dist/fn/browser/log.js +46 -0
  73. package/dist/fn/browser/replaceSelection.d.ts +2 -0
  74. package/dist/fn/browser/replaceSelection.js +42 -0
  75. package/dist/fn/browser/selectElementText.d.ts +21 -0
  76. package/dist/fn/browser/selectElementText.js +42 -0
  77. package/dist/fn/browser/setCookie.d.ts +16 -0
  78. package/dist/fn/browser/setCookie.js +25 -0
  79. package/dist/fn/browser/toggleFullScreen.d.ts +2 -0
  80. package/dist/fn/browser/toggleFullScreen.js +39 -0
  81. package/dist/fn/browser/warning.d.ts +14 -0
  82. package/dist/fn/browser/warning.js +24 -0
  83. package/dist/fn/convert/arrayBuffer2String.d.ts +2 -0
  84. package/dist/fn/convert/arrayBuffer2String.js +4 -0
  85. package/dist/fn/convert/canvasToImage.d.ts +16 -0
  86. package/dist/fn/convert/canvasToImage.js +20 -0
  87. package/dist/fn/convert/colorToHex.d.ts +20 -0
  88. package/dist/fn/convert/colorToHex.js +24 -0
  89. package/dist/fn/convert/fromXml.d.ts +12 -0
  90. package/dist/fn/convert/fromXml.js +54 -0
  91. package/dist/fn/convert/hex2rgb.d.ts +24 -0
  92. package/dist/fn/convert/hex2rgb.js +29 -0
  93. package/dist/fn/convert/imageToCanvas.d.ts +15 -0
  94. package/dist/fn/convert/imageToCanvas.js +21 -0
  95. package/dist/fn/convert/imgToBase64.d.ts +2 -0
  96. package/dist/fn/convert/imgToBase64.js +7 -0
  97. package/dist/fn/convert/rgb2hex.d.ts +20 -0
  98. package/dist/fn/convert/rgb2hex.js +28 -0
  99. package/dist/fn/convert/string2ArrayBuffer.d.ts +2 -0
  100. package/dist/fn/convert/string2ArrayBuffer.js +9 -0
  101. package/dist/fn/convert/toCSV.d.ts +26 -0
  102. package/dist/fn/convert/toCSV.js +64 -0
  103. package/dist/fn/datetime/calendar.d.ts +2 -0
  104. package/dist/fn/datetime/calendar.js +23 -0
  105. package/dist/fn/datetime/chrono.d.ts +25 -0
  106. package/dist/fn/datetime/chrono.js +45 -0
  107. package/dist/fn/datetime/date.d.ts +18 -0
  108. package/dist/fn/datetime/date.js +44 -0
  109. package/dist/fn/datetime/dateSQL.d.ts +20 -0
  110. package/dist/fn/datetime/dateSQL.js +26 -0
  111. package/dist/fn/datetime/daysInMonth.d.ts +17 -0
  112. package/dist/fn/datetime/daysInMonth.js +24 -0
  113. package/dist/fn/datetime/fdate.d.ts +11 -0
  114. package/dist/fn/datetime/fdate.js +28 -0
  115. package/dist/fn/datetime/fdatetime.d.ts +9 -0
  116. package/dist/fn/datetime/fdatetime.js +30 -0
  117. package/dist/fn/datetime/formatDate.d.ts +2 -0
  118. package/dist/fn/datetime/formatDate.js +4 -0
  119. package/dist/fn/datetime/ftime.d.ts +9 -0
  120. package/dist/fn/datetime/ftime.js +21 -0
  121. package/dist/fn/datetime/getDay.d.ts +11 -0
  122. package/dist/fn/datetime/getDay.js +26 -0
  123. package/dist/fn/datetime/timestamp.d.ts +15 -0
  124. package/dist/fn/datetime/timestamp.js +18 -0
  125. package/dist/fn/default/defaultAjaxAbortFunction.d.ts +2 -0
  126. package/dist/fn/default/defaultAjaxAbortFunction.js +5 -0
  127. package/dist/fn/default/defaultAjaxErrorFunction.d.ts +2 -0
  128. package/dist/fn/default/defaultAjaxErrorFunction.js +4 -0
  129. package/dist/fn/default/defaultAlertFunction.d.ts +2 -0
  130. package/dist/fn/default/defaultAlertFunction.js +5 -0
  131. package/dist/fn/default/defaultConfirmFunction.d.ts +2 -0
  132. package/dist/fn/default/defaultConfirmFunction.js +14 -0
  133. package/dist/fn/default/defaultEndLoadingFunction.d.ts +2 -0
  134. package/dist/fn/default/defaultEndLoadingFunction.js +4 -0
  135. package/dist/fn/default/defaultErrorFunction.d.ts +2 -0
  136. package/dist/fn/default/defaultErrorFunction.js +5 -0
  137. package/dist/fn/default/defaultHistoryFunction.d.ts +2 -0
  138. package/dist/fn/default/defaultHistoryFunction.js +4 -0
  139. package/dist/fn/default/defaultLinkFunction.d.ts +2 -0
  140. package/dist/fn/default/defaultLinkFunction.js +4 -0
  141. package/dist/fn/default/defaultPostLinkFunction.d.ts +2 -0
  142. package/dist/fn/default/defaultPostLinkFunction.js +4 -0
  143. package/dist/fn/default/defaultPreLinkFunction.d.ts +2 -0
  144. package/dist/fn/default/defaultPreLinkFunction.js +4 -0
  145. package/dist/fn/default/defaultResizeFunction.d.ts +2 -0
  146. package/dist/fn/default/defaultResizeFunction.js +4 -0
  147. package/dist/fn/default/defaultStartLoadingFunction.d.ts +2 -0
  148. package/dist/fn/default/defaultStartLoadingFunction.js +4 -0
  149. package/dist/fn/form/addInputs.d.ts +43 -0
  150. package/dist/fn/form/addInputs.js +81 -0
  151. package/dist/fn/form/fieldValue.d.ts +12 -0
  152. package/dist/fn/form/fieldValue.js +34 -0
  153. package/dist/fn/form/formdata.d.ts +45 -0
  154. package/dist/fn/form/formdata.js +95 -0
  155. package/dist/fn/form/objectToFormData.d.ts +12 -0
  156. package/dist/fn/form/objectToFormData.js +45 -0
  157. package/dist/fn/form/submit.d.ts +20 -0
  158. package/dist/fn/form/submit.js +51 -0
  159. package/dist/fn/html/adjustHeight.d.ts +2 -0
  160. package/dist/fn/html/adjustHeight.js +10 -0
  161. package/dist/fn/html/adjustSize.d.ts +2 -0
  162. package/dist/fn/html/adjustSize.js +21 -0
  163. package/dist/fn/html/adjustWidth.d.ts +2 -0
  164. package/dist/fn/html/adjustWidth.js +10 -0
  165. package/dist/fn/html/getAllTags.d.ts +6 -0
  166. package/dist/fn/html/getAllTags.js +9 -0
  167. package/dist/fn/html/getAncestors.d.ts +2 -0
  168. package/dist/fn/html/getAncestors.js +25 -0
  169. package/dist/fn/html/getAttributes.d.ts +6 -0
  170. package/dist/fn/html/getAttributes.js +16 -0
  171. package/dist/fn/html/getHTMLOfSelection.d.ts +2 -0
  172. package/dist/fn/html/getHTMLOfSelection.js +18 -0
  173. package/dist/fn/html/getHtml.d.ts +2 -0
  174. package/dist/fn/html/getHtml.js +9 -0
  175. package/dist/fn/html/getPath.d.ts +10 -0
  176. package/dist/fn/html/getPath.js +50 -0
  177. package/dist/fn/html/getText.d.ts +2 -0
  178. package/dist/fn/html/getText.js +4 -0
  179. package/dist/fn/html/html2text.d.ts +17 -0
  180. package/dist/fn/html/html2text.js +22 -0
  181. package/dist/fn/html/isInside.d.ts +2 -0
  182. package/dist/fn/html/isInside.js +23 -0
  183. package/dist/fn/html/makeReactive.d.ts +2 -0
  184. package/dist/fn/html/makeReactive.js +185 -0
  185. package/dist/fn/html/selector.d.ts +10 -0
  186. package/dist/fn/html/selector.js +12 -0
  187. package/dist/fn/init.d.ts +13 -0
  188. package/dist/fn/init.js +25 -12
  189. package/dist/fn/loop/each.d.ts +33 -0
  190. package/dist/fn/loop/each.js +54 -0
  191. package/dist/fn/loop/fori.d.ts +36 -0
  192. package/dist/fn/loop/fori.js +53 -0
  193. package/dist/fn/loop/forir.d.ts +36 -0
  194. package/dist/fn/loop/forir.js +53 -0
  195. package/dist/fn/loop/iterate.d.ts +22 -0
  196. package/dist/fn/loop/iterate.js +36 -0
  197. package/dist/fn/loop/riterate.d.ts +21 -0
  198. package/dist/fn/loop/riterate.js +24 -0
  199. package/dist/fn/misc/analyzeFunction.d.ts +11 -0
  200. package/dist/fn/misc/analyzeFunction.js +141 -0
  201. package/dist/fn/misc/getTimeoff.d.ts +14 -0
  202. package/dist/fn/misc/getTimeoff.js +19 -0
  203. package/dist/fn/misc/money.d.ts +23 -0
  204. package/dist/fn/misc/money.js +122 -0
  205. package/dist/fn/misc/percent.d.ts +23 -0
  206. package/dist/fn/misc/percent.js +25 -0
  207. package/dist/fn/misc/randomInt.d.ts +22 -0
  208. package/dist/fn/misc/randomInt.js +24 -0
  209. package/dist/fn/misc/roundDecimal.d.ts +11 -0
  210. package/dist/fn/misc/roundDecimal.js +13 -0
  211. package/dist/fn/misc/translate.d.ts +2 -0
  212. package/dist/fn/misc/translate.js +8 -0
  213. package/dist/fn/object/_compareValues.d.ts +40 -0
  214. package/dist/fn/object/_compareValues.js +78 -0
  215. package/dist/fn/object/arrayFromProp.d.ts +33 -0
  216. package/dist/fn/object/arrayFromProp.js +41 -0
  217. package/dist/fn/object/autoExtend.d.ts +33 -0
  218. package/dist/fn/object/autoExtend.js +44 -0
  219. package/dist/fn/object/checkProps.d.ts +2 -0
  220. package/dist/fn/object/checkProps.js +5 -0
  221. package/dist/fn/object/checkPropsDetails.d.ts +2 -0
  222. package/dist/fn/object/checkPropsDetails.js +53 -0
  223. package/dist/fn/object/checkPropsOrDie.d.ts +2 -0
  224. package/dist/fn/object/checkPropsOrDie.js +9 -0
  225. package/dist/fn/object/circularReplacer.d.ts +7 -0
  226. package/dist/fn/object/circularReplacer.js +39 -0
  227. package/dist/fn/object/clone.d.ts +19 -0
  228. package/dist/fn/object/clone.js +33 -0
  229. package/dist/fn/object/compare.d.ts +53 -0
  230. package/dist/fn/object/compare.js +150 -0
  231. package/dist/fn/object/compareConditions.d.ts +46 -0
  232. package/dist/fn/object/compareConditions.js +86 -0
  233. package/dist/fn/object/count.d.ts +56 -0
  234. package/dist/fn/object/count.js +59 -0
  235. package/dist/fn/object/createObject.d.ts +2 -0
  236. package/dist/fn/object/createObject.js +9 -0
  237. package/dist/fn/object/deepPath.d.ts +57 -0
  238. package/dist/fn/object/deepPath.js +78 -0
  239. package/dist/fn/object/deleteProp.d.ts +8 -0
  240. package/dist/fn/object/deleteProp.js +13 -0
  241. package/dist/fn/object/diffObj.d.ts +79 -0
  242. package/dist/fn/object/diffObj.js +168 -0
  243. package/dist/fn/object/extend.d.ts +87 -0
  244. package/dist/fn/object/extend.js +158 -0
  245. package/dist/fn/object/extendOut.d.ts +18 -0
  246. package/dist/fn/object/extendOut.js +40 -0
  247. package/dist/fn/object/filter.d.ts +50 -0
  248. package/dist/fn/object/filter.js +94 -0
  249. package/dist/fn/object/filterToConditions.d.ts +48 -0
  250. package/dist/fn/object/filterToConditions.js +68 -0
  251. package/dist/fn/object/findAll.d.ts +57 -0
  252. package/dist/fn/object/findAll.js +73 -0
  253. package/dist/fn/object/getField.d.ts +30 -0
  254. package/dist/fn/object/getField.js +37 -0
  255. package/dist/fn/object/getFieldValues.d.ts +30 -0
  256. package/dist/fn/object/getFieldValues.js +41 -0
  257. package/dist/fn/object/getProp.d.ts +8 -0
  258. package/dist/fn/object/getProp.js +13 -0
  259. package/dist/fn/object/getProperty.d.ts +30 -0
  260. package/dist/fn/object/getProperty.js +39 -0
  261. package/dist/fn/object/getRow.d.ts +42 -0
  262. package/dist/fn/object/getRow.js +49 -0
  263. package/dist/fn/object/map.d.ts +74 -0
  264. package/dist/fn/object/map.js +83 -0
  265. package/dist/fn/object/move.d.ts +34 -0
  266. package/dist/fn/object/move.js +43 -0
  267. package/dist/fn/object/multiorder.d.ts +40 -0
  268. package/dist/fn/object/multiorder.js +60 -0
  269. package/dist/fn/object/numProperties.d.ts +31 -0
  270. package/dist/fn/object/numProperties.js +36 -0
  271. package/dist/fn/object/order.d.ts +28 -0
  272. package/dist/fn/object/order.js +36 -0
  273. package/dist/fn/object/pickValue.d.ts +2 -0
  274. package/dist/fn/object/pickValue.js +6 -0
  275. package/dist/fn/object/removeEmpty.d.ts +18 -0
  276. package/dist/fn/object/removeEmpty.js +47 -0
  277. package/dist/fn/object/removePrivateProp.d.ts +24 -0
  278. package/dist/fn/object/removePrivateProp.js +41 -0
  279. package/dist/fn/object/search.d.ts +101 -0
  280. package/dist/fn/object/search.js +177 -0
  281. package/dist/fn/object/setProp.d.ts +11 -0
  282. package/dist/fn/object/setProp.js +17 -0
  283. package/dist/fn/object/setProperty.d.ts +30 -0
  284. package/dist/fn/object/setProperty.js +50 -0
  285. package/dist/fn/object/shortenObj.d.ts +25 -0
  286. package/dist/fn/object/shortenObj.js +40 -0
  287. package/dist/fn/object/shuffle.d.ts +2 -0
  288. package/dist/fn/object/shuffle.js +13 -0
  289. package/dist/fn/object/stat.d.ts +2 -0
  290. package/dist/fn/object/stat.js +49 -0
  291. package/dist/fn/object/sum.d.ts +46 -0
  292. package/dist/fn/object/sum.js +57 -0
  293. package/dist/fn/object/unique.d.ts +18 -0
  294. package/dist/fn/object/unique.js +22 -0
  295. package/dist/fn/string/baseName.d.ts +24 -0
  296. package/dist/fn/string/baseName.js +39 -0
  297. package/dist/fn/string/br2nl.d.ts +19 -0
  298. package/dist/fn/string/br2nl.js +22 -0
  299. package/dist/fn/string/camelToCss.d.ts +18 -0
  300. package/dist/fn/string/camelToCss.js +26 -0
  301. package/dist/fn/string/camelize.d.ts +20 -0
  302. package/dist/fn/string/camelize.js +27 -0
  303. package/dist/fn/string/correctCase.d.ts +18 -0
  304. package/dist/fn/string/correctCase.js +20 -0
  305. package/dist/fn/string/crc32.d.ts +2 -0
  306. package/dist/fn/string/crc32.js +20 -0
  307. package/dist/fn/string/dirName.d.ts +17 -0
  308. package/dist/fn/string/dirName.js +33 -0
  309. package/dist/fn/string/escapeDquotes.d.ts +2 -0
  310. package/dist/fn/string/escapeDquotes.js +8 -0
  311. package/dist/fn/string/escapeRegExp.d.ts +19 -0
  312. package/dist/fn/string/escapeRegExp.js +21 -0
  313. package/dist/fn/string/escapeSquotes.d.ts +2 -0
  314. package/dist/fn/string/escapeSquotes.js +8 -0
  315. package/dist/fn/string/escapeTicks.d.ts +2 -0
  316. package/dist/fn/string/escapeTicks.js +8 -0
  317. package/dist/fn/string/escapeUrl.d.ts +9 -0
  318. package/dist/fn/string/escapeUrl.js +47 -0
  319. package/dist/fn/string/fileExt.d.ts +38 -0
  320. package/dist/fn/string/fileExt.js +47 -0
  321. package/dist/fn/string/format.d.ts +2 -0
  322. package/dist/fn/string/format.js +14 -0
  323. package/dist/fn/string/formatBytes.d.ts +14 -0
  324. package/dist/fn/string/formatBytes.js +20 -0
  325. package/dist/fn/string/formatSize.d.ts +2 -0
  326. package/dist/fn/string/formatSize.js +12 -0
  327. package/dist/fn/string/hash.d.ts +7 -0
  328. package/dist/fn/string/hash.js +42 -0
  329. package/dist/fn/string/md5.d.ts +22 -0
  330. package/dist/fn/string/md5.js +142 -0
  331. package/dist/fn/string/nl2br.d.ts +17 -0
  332. package/dist/fn/string/nl2br.js +20 -0
  333. package/dist/fn/string/printf.d.ts +10 -0
  334. package/dist/fn/string/printf.js +15 -0
  335. package/dist/fn/string/quotes2html.d.ts +30 -0
  336. package/dist/fn/string/quotes2html.js +39 -0
  337. package/dist/fn/string/randomString.d.ts +28 -0
  338. package/dist/fn/string/randomString.js +72 -0
  339. package/dist/fn/string/removeAccents.d.ts +17 -0
  340. package/dist/fn/string/removeAccents.js +30 -0
  341. package/dist/fn/string/removeExtraSpaces.d.ts +7 -0
  342. package/dist/fn/string/removeExtraSpaces.js +9 -0
  343. package/dist/fn/string/removeHtmlComments.d.ts +2 -0
  344. package/dist/fn/string/removeHtmlComments.js +8 -0
  345. package/dist/fn/string/removeTrailingChars.d.ts +11 -0
  346. package/dist/fn/string/removeTrailingChars.js +25 -0
  347. package/dist/fn/string/repeat.d.ts +16 -0
  348. package/dist/fn/string/repeat.js +18 -0
  349. package/dist/fn/string/replaceAll.d.ts +23 -0
  350. package/dist/fn/string/replaceAll.js +29 -0
  351. package/dist/fn/string/sanitize.d.ts +17 -0
  352. package/dist/fn/string/sanitize.js +34 -0
  353. package/dist/fn/string/shorten.d.ts +27 -0
  354. package/dist/fn/string/shorten.js +42 -0
  355. package/dist/fn/string/simpleHash.d.ts +2 -0
  356. package/dist/fn/string/simpleHash.js +8 -0
  357. package/dist/fn/string/simpleHash1.d.ts +2 -0
  358. package/dist/fn/string/simpleHash1.js +10 -0
  359. package/dist/fn/string/simpleHash2.d.ts +2 -0
  360. package/dist/fn/string/simpleHash2.js +10 -0
  361. package/dist/fn/string/substr.d.ts +23 -0
  362. package/dist/fn/string/substr.js +38 -0
  363. package/dist/fn/string/trim.d.ts +2 -0
  364. package/dist/fn/string/trim.js +20 -0
  365. package/dist/fn/string/uniqString.d.ts +18 -0
  366. package/dist/fn/string/uniqString.js +49 -0
  367. package/dist/fn/style/addColors.d.ts +17 -0
  368. package/dist/fn/style/addColors.js +76 -0
  369. package/dist/fn/style/addStyle.d.ts +12 -0
  370. package/dist/fn/style/addStyle.js +20 -0
  371. package/dist/fn/style/animateCss.d.ts +13 -0
  372. package/dist/fn/style/animateCss.js +31 -0
  373. package/dist/fn/style/center.d.ts +16 -0
  374. package/dist/fn/style/center.js +40 -0
  375. package/dist/fn/style/cssExists.d.ts +12 -0
  376. package/dist/fn/style/cssExists.js +40 -0
  377. package/dist/fn/style/getCssVar.d.ts +7 -0
  378. package/dist/fn/style/getCssVar.js +12 -0
  379. package/dist/fn/style/getScrollBarSize.d.ts +2 -0
  380. package/dist/fn/style/getScrollBarSize.js +25 -0
  381. package/dist/fn/style/lightenDarkenHex.d.ts +20 -0
  382. package/dist/fn/style/lightenDarkenHex.js +45 -0
  383. package/dist/fn/style/outerHeight.d.ts +11 -0
  384. package/dist/fn/style/outerHeight.js +19 -0
  385. package/dist/fn/style/outerWidth.d.ts +10 -0
  386. package/dist/fn/style/outerWidth.js +16 -0
  387. package/dist/fn/style/resize.d.ts +2 -0
  388. package/dist/fn/style/resize.js +39 -0
  389. package/dist/fn/style/setCssVar.d.ts +8 -0
  390. package/dist/fn/style/setCssVar.js +14 -0
  391. package/dist/fn/type/checkType.d.ts +2 -0
  392. package/dist/fn/type/checkType.js +59 -0
  393. package/dist/fn/type/isArray.d.ts +14 -0
  394. package/dist/fn/type/isArray.js +23 -0
  395. package/dist/fn/type/isBlob.d.ts +9 -0
  396. package/dist/fn/type/isBlob.js +18 -0
  397. package/dist/fn/type/isBoolean.d.ts +16 -0
  398. package/dist/fn/type/isBoolean.js +25 -0
  399. package/dist/fn/type/isCanvas.d.ts +16 -0
  400. package/dist/fn/type/isCanvas.js +25 -0
  401. package/dist/fn/type/isColor.d.ts +31 -0
  402. package/dist/fn/type/isColor.js +45 -0
  403. package/dist/fn/type/isComment.d.ts +14 -0
  404. package/dist/fn/type/isComment.js +23 -0
  405. package/dist/fn/type/isCp.d.ts +2 -0
  406. package/dist/fn/type/isCp.js +17 -0
  407. package/dist/fn/type/isDate.d.ts +20 -0
  408. package/dist/fn/type/isDate.js +29 -0
  409. package/dist/fn/type/isDimension.d.ts +11 -0
  410. package/dist/fn/type/isDimension.js +24 -0
  411. package/dist/fn/type/isDom.d.ts +14 -0
  412. package/dist/fn/type/isDom.js +23 -0
  413. package/dist/fn/type/isEmail.d.ts +23 -0
  414. package/dist/fn/type/isEmail.js +37 -0
  415. package/dist/fn/type/isEmpty.d.ts +41 -0
  416. package/dist/fn/type/isEmpty.js +57 -0
  417. package/dist/fn/type/isEvent.d.ts +9 -0
  418. package/dist/fn/type/isEvent.js +18 -0
  419. package/dist/fn/type/isFunction.d.ts +16 -0
  420. package/dist/fn/type/isFunction.js +25 -0
  421. package/dist/fn/type/isHostname.d.ts +2 -0
  422. package/dist/fn/type/isHostname.js +16 -0
  423. package/dist/fn/type/isIP.d.ts +2 -0
  424. package/dist/fn/type/isIP.js +12 -0
  425. package/dist/fn/type/isInt.d.ts +18 -0
  426. package/dist/fn/type/isInt.js +27 -0
  427. package/dist/fn/type/isIterable.d.ts +27 -0
  428. package/dist/fn/type/isIterable.js +37 -0
  429. package/dist/fn/type/isNull.d.ts +14 -0
  430. package/dist/fn/type/isNull.js +23 -0
  431. package/dist/fn/type/isNumber.d.ts +19 -0
  432. package/dist/fn/type/isNumber.js +30 -0
  433. package/dist/fn/type/isObject.d.ts +19 -0
  434. package/dist/fn/type/isObject.js +28 -0
  435. package/dist/fn/type/isPercent.d.ts +14 -0
  436. package/dist/fn/type/isPercent.js +23 -0
  437. package/dist/fn/type/isPrimitive.d.ts +18 -0
  438. package/dist/fn/type/isPrimitive.js +27 -0
  439. package/dist/fn/type/isPromise.d.ts +18 -0
  440. package/dist/fn/type/isPromise.js +27 -0
  441. package/dist/fn/type/isPropSize.d.ts +2 -0
  442. package/dist/fn/type/isPropSize.js +12 -0
  443. package/dist/fn/type/isSQLDate.d.ts +10 -0
  444. package/dist/fn/type/isSQLDate.js +20 -0
  445. package/dist/fn/type/isSame.d.ts +41 -0
  446. package/dist/fn/type/isSame.js +72 -0
  447. package/dist/fn/type/isString.d.ts +14 -0
  448. package/dist/fn/type/isString.js +23 -0
  449. package/dist/fn/type/isSymbol.d.ts +15 -0
  450. package/dist/fn/type/isSymbol.js +24 -0
  451. package/dist/fn/type/isURL.d.ts +2 -0
  452. package/dist/fn/type/isURL.js +11 -0
  453. package/dist/fn/type/isValidDimension.d.ts +11 -0
  454. package/dist/fn/type/isValidDimension.js +24 -0
  455. package/dist/fn/type/isValidName.d.ts +27 -0
  456. package/dist/fn/type/isValidName.js +38 -0
  457. package/dist/fn/type/isValue.d.ts +26 -0
  458. package/dist/fn/type/isValue.js +36 -0
  459. package/dist/fn/type/isVue.d.ts +16 -0
  460. package/dist/fn/type/isVue.js +42 -0
  461. package/dist/fn.d.ts +4 -5
  462. package/dist/fn.js +226 -228
  463. package/package.json +1 -1
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Takes color in hex format and lightens or darkens it with the given value.
3
+ * @method lightenDarkenHex
4
+ * @global
5
+ * @example
6
+ * ```javascript
7
+ * //"#eccb28"
8
+ * bbn.fn.lightenDarkenHex('#c4a300', 40);
9
+ * ```
10
+ *
11
+ * @example
12
+ * ```javascript
13
+ * //"#9c7b00"
14
+ * bbn.fn.lightenDarkenHex(#c4a300', -40);
15
+ * ```
16
+ * @memberof bbn.fn
17
+ * @returns {String}
18
+ */
19
+ declare const lightenDarkenHex: (hex: any, amt: any) => string;
20
+ export { lightenDarkenHex };
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Takes color in hex format and lightens or darkens it with the given value.
3
+ * @method lightenDarkenHex
4
+ * @global
5
+ * @example
6
+ * ```javascript
7
+ * //"#eccb28"
8
+ * bbn.fn.lightenDarkenHex('#c4a300', 40);
9
+ * ```
10
+ *
11
+ * @example
12
+ * ```javascript
13
+ * //"#9c7b00"
14
+ * bbn.fn.lightenDarkenHex(#c4a300', -40);
15
+ * ```
16
+ * @memberof bbn.fn
17
+ * @returns {String}
18
+ */
19
+ const lightenDarkenHex = function (hex, amt) {
20
+ if (hex && amt) {
21
+ let ht = hex[0] === "#";
22
+ hex = ht ? hex.slice(1) : hex;
23
+ let num = parseInt(hex, 16), r = (num >> 16) + amt, b = ((num >> 8) & 0x00ff) + amt, g = (num & 0x0000ff) + amt;
24
+ if (r > 255) {
25
+ r = 255;
26
+ }
27
+ else if (r < 0) {
28
+ r = 0;
29
+ }
30
+ if (b > 255) {
31
+ b = 255;
32
+ }
33
+ else if (b < 0) {
34
+ b = 0;
35
+ }
36
+ if (g > 255) {
37
+ g = 255;
38
+ }
39
+ else if (g < 0) {
40
+ g = 0;
41
+ }
42
+ return (ht ? "#" : "") + (g | (b << 8) | (r << 16)).toString(16);
43
+ }
44
+ };
45
+ export { lightenDarkenHex };
@@ -0,0 +1,11 @@
1
+ /**
2
+ *
3
+ * @ignore
4
+ * @method outerHeight
5
+ * @todo Add method description for outerHeight
6
+ * @global
7
+ * @memberof bbn.fn
8
+ * @returns {*}
9
+ */
10
+ declare const outerHeight: (ele: HTMLElement) => number | false;
11
+ export { outerHeight };
@@ -0,0 +1,19 @@
1
+ import { selector } from "../html/selector";
2
+ /**
3
+ *
4
+ * @ignore
5
+ * @method outerHeight
6
+ * @todo Add method description for outerHeight
7
+ * @global
8
+ * @memberof bbn.fn
9
+ * @returns {*}
10
+ */
11
+ const outerHeight = function (ele) {
12
+ ele = selector(ele);
13
+ if (ele && "offsetHeight" in ele) {
14
+ let styles = window.getComputedStyle(ele);
15
+ let margin = parseFloat(styles["marginTop"]) + parseFloat(styles["marginBottom"]);
16
+ return Math.ceil(ele.offsetHeight + margin);
17
+ }
18
+ };
19
+ export { outerHeight };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @ignore
3
+ * @method outerWidth
4
+ * @todo Add method description for outerWidth
5
+ * @global
6
+ * @memberof bbn.fn
7
+ * @returns {*}
8
+ */
9
+ declare const outerWidth: (ele: HTMLElement) => number | false;
10
+ export { outerWidth };
@@ -0,0 +1,16 @@
1
+ import { selector } from "../html/selector";
2
+ /**
3
+ * @ignore
4
+ * @method outerWidth
5
+ * @todo Add method description for outerWidth
6
+ * @global
7
+ * @memberof bbn.fn
8
+ * @returns {*}
9
+ */
10
+ const outerWidth = function (ele) {
11
+ ele = selector(ele);
12
+ let styles = window.getComputedStyle(ele);
13
+ let margin = parseFloat(styles["marginLeft"]) + parseFloat(styles["marginRight"]);
14
+ return Math.ceil(ele.offsetWidth + margin);
15
+ };
16
+ export { outerWidth };
@@ -0,0 +1,2 @@
1
+ declare const resize: () => void;
2
+ export { resize };
@@ -0,0 +1,39 @@
1
+ import { getCssVar } from './getCssVar';
2
+ import { each } from '../loop/each';
3
+ import { defaultResizeFunction } from '../default/defaultResizeFunction';
4
+ const resize = function () {
5
+ let diffW = bbn.env.width !== window.innerWidth;
6
+ let diffH = bbn.env.height !== window.innerHeight;
7
+ if (diffW || diffH) {
8
+ if (diffW) {
9
+ bbn.env.width =
10
+ window.innerWidth || window.document.documentElement.clientWidth || window.document.body.clientWidth;
11
+ document.documentElement.style.setProperty('--vw', bbn.env.width * 0.01 + 'px');
12
+ }
13
+ if (diffH) {
14
+ bbn.env.height =
15
+ window.innerHeight || window.document.documentElement.clientHeight || window.document.body.clientHeight;
16
+ document.documentElement.style.setProperty('--vh', bbn.env.height * 0.01 + 'px');
17
+ }
18
+ let smallWidth = parseInt(getCssVar('mobile-limit')) || 650;
19
+ let newCls = 'bbn-screen-' + (bbn.env.width < smallWidth ? 'small' : 'regular');
20
+ let classes = (document.body.className || '').split(' ');
21
+ let done = false;
22
+ each(classes, (cls, idx) => {
23
+ let bits = cls.split('-');
24
+ if (bits.length === 3 && cls.indexOf('bbn-screen-') === 0) {
25
+ done = true;
26
+ if (cls !== newCls) {
27
+ classes.splice(idx, 1, newCls);
28
+ }
29
+ return false;
30
+ }
31
+ });
32
+ if (!done) {
33
+ classes.push(newCls);
34
+ }
35
+ document.body.className = classes.join(' ');
36
+ defaultResizeFunction();
37
+ }
38
+ };
39
+ export { resize };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Creates a CSS variable
3
+ * @param {String*} varname
4
+ * @param {String*} value
5
+ * @returns
6
+ */
7
+ declare const setCssVar: (varname: any, value: any) => void;
8
+ export { setCssVar };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Creates a CSS variable
3
+ * @param {String*} varname
4
+ * @param {String*} value
5
+ * @returns
6
+ */
7
+ const setCssVar = function (varname, value) {
8
+ if (varname.indexOf("--") !== 0) {
9
+ varname = "--" + varname;
10
+ }
11
+ /** @todo To Fix */
12
+ document.documentElement.style.setProperty(varname, value);
13
+ };
14
+ export { setCssVar };
@@ -0,0 +1,2 @@
1
+ declare const checkType: (value: any, type: object | string, msg?: string, ...logs: any[]) => void;
2
+ export { checkType };
@@ -0,0 +1,59 @@
1
+ import { isArray } from './isArray';
2
+ import { each } from '../loop/each';
3
+ import { isFunction } from './isFunction';
4
+ import { isString } from './isString';
5
+ import { correctCase } from '../string/correctCase';
6
+ import { error } from '../browser/error';
7
+ import { log } from '../browser/log';
8
+ const checkType = function (value, type, msg, ...logs) {
9
+ let ok = false;
10
+ if (!isArray(type)) {
11
+ type = [type];
12
+ }
13
+ const typesList = [];
14
+ each(type, (t) => {
15
+ if (t === String) {
16
+ t = 'string';
17
+ }
18
+ else if (t === Number) {
19
+ t = 'number';
20
+ }
21
+ else if (t === Array) {
22
+ t = 'array';
23
+ }
24
+ else if (t === Boolean) {
25
+ t = 'boolean';
26
+ }
27
+ else if (t === Object) {
28
+ t = 'object';
29
+ }
30
+ else if (t === Function) {
31
+ t = 'function';
32
+ }
33
+ if (isFunction(t)) {
34
+ typesList.push(t.name || t.constructor?.name || t.toString());
35
+ if (value instanceof t) {
36
+ ok = true;
37
+ return false;
38
+ }
39
+ }
40
+ else if (!isString(t) || !isFunction(bbn.fn['is' + correctCase(t)])) {
41
+ error(`The type ${t} is not recognized`);
42
+ }
43
+ else if (bbn.fn['is' + correctCase(t)](value)) {
44
+ ok = true;
45
+ return false;
46
+ }
47
+ else {
48
+ typesList.push(t);
49
+ }
50
+ });
51
+ if (!ok) {
52
+ log(['Value given', value, 'type', typeof value, 'expected', typesList.join(' or ')]);
53
+ if (logs.length) {
54
+ log(logs);
55
+ }
56
+ throw new Error((msg ? msg + ' - ' : '') + bbn._('The value should be a %s', typesList.join(' ' + bbn._('or a') + ' ')));
57
+ }
58
+ };
59
+ export { checkType };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Returns true if the given argument is array.
3
+ * @method isArray
4
+ * @global
5
+ * @example
6
+ * ```javascript
7
+ * bbn.fn.isArray([5,2,6]);
8
+ * //true
9
+ * ```
10
+ * @memberof bbn.fn
11
+ * @returns {Boolean}
12
+ */
13
+ declare const isArray: (...args: any[]) => boolean;
14
+ export { isArray };
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Returns true if the given argument is array.
3
+ * @method isArray
4
+ * @global
5
+ * @example
6
+ * ```javascript
7
+ * bbn.fn.isArray([5,2,6]);
8
+ * //true
9
+ * ```
10
+ * @memberof bbn.fn
11
+ * @returns {Boolean}
12
+ */
13
+ const isArray = function (...args) {
14
+ if (!args.length)
15
+ return false;
16
+ for (let a of args) {
17
+ if (!Array.isArray(a)) {
18
+ return false;
19
+ }
20
+ }
21
+ return true;
22
+ };
23
+ export { isArray };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @method isBlob
3
+ * @todo Add method description for isFunction
4
+ * @global
5
+ * @memberof bbn.fn
6
+ * @returns {Boolean}
7
+ */
8
+ declare const isBlob: (...args: any[]) => boolean;
9
+ export { isBlob };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @method isBlob
3
+ * @todo Add method description for isFunction
4
+ * @global
5
+ * @memberof bbn.fn
6
+ * @returns {Boolean}
7
+ */
8
+ const isBlob = function (...args) {
9
+ if (!args.length)
10
+ return false;
11
+ for (let a of args) {
12
+ if ({}.toString.apply(a) !== "[object Blob]") {
13
+ return false;
14
+ }
15
+ }
16
+ return true;
17
+ };
18
+ export { isBlob };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Returns true if the given argument is a boolean
3
+ * @method isBoolean
4
+ * @global
5
+ * @example
6
+ * ```javascript
7
+ * const sb = true;
8
+ * bbn.fn.isBoolean(sb); // true
9
+ * const sb = 1;
10
+ * bbn.fn.isBoolean(sb); // false
11
+ * ```
12
+ * @memberof bbn.fn
13
+ * @returns {Boolean}
14
+ */
15
+ declare const isBoolean: (...args: any[]) => boolean;
16
+ export { isBoolean };
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Returns true if the given argument is a boolean
3
+ * @method isBoolean
4
+ * @global
5
+ * @example
6
+ * ```javascript
7
+ * const sb = true;
8
+ * bbn.fn.isBoolean(sb); // true
9
+ * const sb = 1;
10
+ * bbn.fn.isBoolean(sb); // false
11
+ * ```
12
+ * @memberof bbn.fn
13
+ * @returns {Boolean}
14
+ */
15
+ const isBoolean = function (...args) {
16
+ if (!args.length)
17
+ return false;
18
+ for (let a of args) {
19
+ if (![true, false].includes(a)) {
20
+ return false;
21
+ }
22
+ }
23
+ return true;
24
+ };
25
+ export { isBoolean };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Returns true if the given argumen is a Canvas.
3
+ *
4
+ * @method isCanvas
5
+ * @global
6
+ * @example
7
+ * ```javascript
8
+ * let myCanvas = document.createElement('canvas');
9
+ * bbn.fn.isCanvas(myCanvas);
10
+ * //true
11
+ * ```
12
+ * @memberof bbn.fn
13
+ * @returns {Boolean}
14
+ */
15
+ declare const isCanvas: (...args: any[]) => boolean;
16
+ export { isCanvas };
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Returns true if the given argumen is a Canvas.
3
+ *
4
+ * @method isCanvas
5
+ * @global
6
+ * @example
7
+ * ```javascript
8
+ * let myCanvas = document.createElement('canvas');
9
+ * bbn.fn.isCanvas(myCanvas);
10
+ * //true
11
+ * ```
12
+ * @memberof bbn.fn
13
+ * @returns {Boolean}
14
+ */
15
+ const isCanvas = function (...args) {
16
+ if (!args.length)
17
+ return false;
18
+ for (let a of args) {
19
+ if (!(a instanceof HTMLCanvasElement)) {
20
+ return false;
21
+ }
22
+ }
23
+ return true;
24
+ };
25
+ export { isCanvas };
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Intended to check if the argument provided is a color.
3
+ *
4
+ * It is possible to pass as argument a string with hexadecimal value in rgb or the name of the color.
5
+ *
6
+ * @method isColor
7
+ * @global
8
+ *
9
+ * @example
10
+ * ```javascript
11
+ * bbn.fn.isColor("#FF0000")
12
+ * //true
13
+ * ```
14
+ *
15
+ * @example
16
+ * ```javascript
17
+ * bbn.fn.isColor("rgb 255, 0, 0");
18
+ * //true
19
+ * ```
20
+ *
21
+ * @example
22
+ * ```javascript
23
+ * bbn.fn.isColor("red");
24
+ * //true
25
+ * ```
26
+ * @memberof bbn.fn
27
+ * @param {String} st
28
+ * @returns {Boolean}
29
+ */
30
+ declare const isColor: (...args: any[]) => boolean;
31
+ export { isColor };
@@ -0,0 +1,45 @@
1
+ import { isString } from "./isString";
2
+ /**
3
+ * Intended to check if the argument provided is a color.
4
+ *
5
+ * It is possible to pass as argument a string with hexadecimal value in rgb or the name of the color.
6
+ *
7
+ * @method isColor
8
+ * @global
9
+ *
10
+ * @example
11
+ * ```javascript
12
+ * bbn.fn.isColor("#FF0000")
13
+ * //true
14
+ * ```
15
+ *
16
+ * @example
17
+ * ```javascript
18
+ * bbn.fn.isColor("rgb 255, 0, 0");
19
+ * //true
20
+ * ```
21
+ *
22
+ * @example
23
+ * ```javascript
24
+ * bbn.fn.isColor("red");
25
+ * //true
26
+ * ```
27
+ * @memberof bbn.fn
28
+ * @param {String} st
29
+ * @returns {Boolean}
30
+ */
31
+ const isColor = function (...args) {
32
+ if (!args.length)
33
+ return false;
34
+ var reg = new RegExp("^(#[a-f0-9]{6}|#[a-f0-9]{3}|rgb *( *[0-9]{1,3}%? *, *[0-9]{1,3}%? *, *[0-9]{1,3}%? *)|rgba *( *[0-9]{1,3}%? *, *[0-9]{1,3}%? *, *[0-9]{1,3}%? *, *[0-9]{1,3}%? *)|black|green|silver|gray|olive|white|yellow|maroon|navy|red|blue|purple|teal|fuchsia|aqua)$", "i");
35
+ for (let st of args) {
36
+ if (!isString(st)) {
37
+ return false;
38
+ }
39
+ if (!reg.test(st)) {
40
+ return false;
41
+ }
42
+ }
43
+ return true;
44
+ };
45
+ export { isColor };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Returns true if the given argument is a dom comment;
3
+ * @method isComment
4
+ * @example
5
+ * ```javascript
6
+ * bbn.fn.isComment(node.childNodes[0]);
7
+ * //true
8
+ * ```
9
+ * @global
10
+ * @memberof bbn.fn
11
+ * @returns {Boolean}
12
+ */
13
+ declare const isComment: (...args: any[]) => boolean;
14
+ export { isComment };
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Returns true if the given argument is a dom comment;
3
+ * @method isComment
4
+ * @example
5
+ * ```javascript
6
+ * bbn.fn.isComment(node.childNodes[0]);
7
+ * //true
8
+ * ```
9
+ * @global
10
+ * @memberof bbn.fn
11
+ * @returns {Boolean}
12
+ */
13
+ const isComment = function (...args) {
14
+ if (!args.length)
15
+ return false;
16
+ for (let a of args) {
17
+ if (!(a instanceof Comment)) {
18
+ return false;
19
+ }
20
+ }
21
+ return true;
22
+ };
23
+ export { isComment };
@@ -0,0 +1,2 @@
1
+ declare const isCp: (...args: any[]) => boolean;
2
+ export { isCp };
@@ -0,0 +1,17 @@
1
+ import { isDom } from './isDom';
2
+ const isCp = function (...args) {
3
+ if (!args.length) {
4
+ return false;
5
+ }
6
+ if ('cp' in bbn && 'isComponent' in bbn['cp'] && (typeof bbn['cp'].isComponent === 'function')) {
7
+ for (let a of args) {
8
+ let res = bbn.cp.isComponent(a);
9
+ if (!res || isDom(res) || !res.$el) {
10
+ return false;
11
+ }
12
+ }
13
+ return false;
14
+ }
15
+ return true;
16
+ };
17
+ export { isCp };
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Returns true if the given argument is a date object.
3
+ * @method isDate
4
+ * @global
5
+ * @example
6
+ * ```javascript
7
+ * let date = new Date();
8
+ * bbn.fn.isDate(date);
9
+ * //true
10
+ * ```
11
+ * @example
12
+ * ```javascript
13
+ * bbn.fn.isDate('16/04/2020');
14
+ * //false
15
+ * ```
16
+ * @memberof bbn.fn
17
+ * @returns {Boolean}
18
+ */
19
+ declare const isDate: (...args: any[]) => boolean;
20
+ export { isDate };
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Returns true if the given argument is a date object.
3
+ * @method isDate
4
+ * @global
5
+ * @example
6
+ * ```javascript
7
+ * let date = new Date();
8
+ * bbn.fn.isDate(date);
9
+ * //true
10
+ * ```
11
+ * @example
12
+ * ```javascript
13
+ * bbn.fn.isDate('16/04/2020');
14
+ * //false
15
+ * ```
16
+ * @memberof bbn.fn
17
+ * @returns {Boolean}
18
+ */
19
+ const isDate = function (...args) {
20
+ if (!args.length)
21
+ return false;
22
+ for (let a of args) {
23
+ if ({}.toString.apply(a) !== "[object Date]") {
24
+ return false;
25
+ }
26
+ }
27
+ return true;
28
+ };
29
+ export { isDate };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Returns true if the given value is a valid CSS dimension string or a number, false otherwise.
3
+ *
4
+ * @method isDimension
5
+ * @global
6
+ * @memberof bbn.fn
7
+ * @param {String} st
8
+ * @returns
9
+ */
10
+ declare const isDimension: (...args: any[]) => boolean;
11
+ export { isDimension };
@@ -0,0 +1,24 @@
1
+ import { isValidDimension } from "./isValidDimension";
2
+ /**
3
+ * Returns true if the given value is a valid CSS dimension string or a number, false otherwise.
4
+ *
5
+ * @method isDimension
6
+ * @global
7
+ * @memberof bbn.fn
8
+ * @param {String} st
9
+ * @returns
10
+ */
11
+ const isDimension = function (...args) {
12
+ if (!args.length)
13
+ return false;
14
+ for (let st of args) {
15
+ if (typeof st !== "number" || st < 0) {
16
+ return false;
17
+ }
18
+ if (!isValidDimension(st)) {
19
+ return false;
20
+ }
21
+ }
22
+ return true;
23
+ };
24
+ export { isDimension };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Returns true if the given argument is a dom element;
3
+ * @method isDom
4
+ * @example
5
+ * ```javascript
6
+ * bbn.fn.isDom(document.body.childNodes[0]);
7
+ * //true
8
+ * ```
9
+ * @global
10
+ * @memberof bbn.fn
11
+ * @returns {Boolean}
12
+ */
13
+ declare const isDom: (...args: any[]) => boolean;
14
+ export { isDom };