@bitfiber/utils 1.1.0 → 1.1.2
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/CONTRIBUTING.md +26 -17
- package/LICENSE.txt +1 -1
- package/README.md +46 -36
- package/dist/cjs/arr/at/at.js +7 -7
- package/dist/cjs/arr/at/at.js.map +1 -1
- package/dist/cjs/arr/cnd/cnd.js +94 -94
- package/dist/cjs/arr/cnd/cnd.js.map +1 -1
- package/dist/cjs/arr/diff-arr/diff-arr.js +33 -33
- package/dist/cjs/arr/diff-arr/diff-arr.js.map +1 -1
- package/dist/cjs/arr/fill/fill.js +7 -7
- package/dist/cjs/arr/for-each-arr/for-each-arr.js +21 -21
- package/dist/cjs/arr/for-each-arr/for-each-arr.js.map +1 -1
- package/dist/cjs/arr/index-by/index-by.js +15 -15
- package/dist/cjs/arr/index-by/index-by.js.map +1 -1
- package/dist/cjs/arr/index.js +19 -19
- package/dist/cjs/arr/pluck/pluck.js +11 -11
- package/dist/cjs/arr/within/within.js +9 -9
- package/dist/cjs/common/copy/copy.js +83 -83
- package/dist/cjs/common/copy/copy.js.map +1 -1
- package/dist/cjs/common/equals/equals.js +119 -119
- package/dist/cjs/common/equals/equals.js.map +1 -1
- package/dist/cjs/common/error.js +13 -13
- package/dist/cjs/common/error.js.map +1 -1
- package/dist/cjs/common/for-each/for-each.js +36 -36
- package/dist/cjs/common/for-each/for-each.js.map +1 -1
- package/dist/cjs/common/get-unique-num-id/get-unique-num-id.js +8 -8
- package/dist/cjs/common/get-unique-str-id/get-unique-str-id.js +10 -10
- package/dist/cjs/common/get-unique-str-id/get-unique-str-id.js.map +1 -1
- package/dist/cjs/common/has-iterator/has-iterator.js +7 -7
- package/dist/cjs/common/index.js +61 -61
- package/dist/cjs/common/interrupt.js +4 -4
- package/dist/cjs/common/is/is.js +130 -128
- package/dist/cjs/common/is/is.js.map +1 -1
- package/dist/cjs/common/is-empty/is-empty.js +28 -28
- package/dist/cjs/common/is-empty/is-empty.js.map +1 -1
- package/dist/cjs/common/random/random.js +9 -8
- package/dist/cjs/common/random/random.js.map +1 -1
- package/dist/cjs/common/same/same.js +7 -7
- package/dist/cjs/common/stub/stub.js +7 -7
- package/dist/cjs/common/to-float/to-float.js +9 -9
- package/dist/cjs/common/to-int/to-int.js +9 -9
- package/dist/cjs/common/to-sorted-string/to-sorted-string.js +52 -52
- package/dist/cjs/common/to-sorted-string/to-sorted-string.js.map +1 -1
- package/dist/cjs/common/types.js +2 -2
- package/dist/cjs/dom/closest/closest.js +20 -24
- package/dist/cjs/dom/closest/closest.js.map +1 -1
- package/dist/cjs/dom/document/document.js +18 -18
- package/dist/cjs/dom/document/document.js.map +1 -1
- package/dist/cjs/dom/download-file/download-file.js +27 -29
- package/dist/cjs/dom/download-file/download-file.js.map +1 -1
- package/dist/cjs/dom/for-each-elements/for-each-elements.js +12 -12
- package/dist/cjs/dom/for-each-elements/for-each-elements.js.map +1 -1
- package/dist/cjs/dom/for-each-nodes/for-each-nodes.js +12 -12
- package/dist/cjs/dom/for-each-nodes/for-each-nodes.js.map +1 -1
- package/dist/cjs/dom/get-all-styles/get-all-styles.js +9 -9
- package/dist/cjs/dom/get-body/get-body.js +9 -9
- package/dist/cjs/dom/get-html/get-html.js +9 -9
- package/dist/cjs/dom/get-non-static-parent/get-non-static-parent.js +8 -8
- package/dist/cjs/dom/get-offset-from-doc/get-offset-from-doc.js +17 -17
- package/dist/cjs/dom/get-offset-from-parent/get-offset-from-parent.js +41 -41
- package/dist/cjs/dom/get-offset-from-parent/get-offset-from-parent.js.map +1 -1
- package/dist/cjs/dom/get-offset-from-win/get-offset-from-win.js +7 -7
- package/dist/cjs/dom/get-scroll-width/get-scroll-width.js +28 -27
- package/dist/cjs/dom/get-scroll-width/get-scroll-width.js.map +1 -1
- package/dist/cjs/dom/get-style/get-style.js +21 -21
- package/dist/cjs/dom/get-style/get-style.js.map +1 -1
- package/dist/cjs/dom/get-styles/get-styles.js +10 -10
- package/dist/cjs/dom/get-valid-style-name/get-valid-style-name.js +39 -39
- package/dist/cjs/dom/get-valid-style-name/get-valid-style-name.js.map +1 -1
- package/dist/cjs/dom/get-window/get-window.js +17 -17
- package/dist/cjs/dom/get-window/get-window.js.map +1 -1
- package/dist/cjs/dom/has-name/has-name.js +7 -7
- package/dist/cjs/dom/index.js +52 -52
- package/dist/cjs/dom/is-comment/is-comment.js +7 -7
- package/dist/cjs/dom/is-element/is-element.js +7 -7
- package/dist/cjs/dom/is-text/is-text.js +7 -7
- package/dist/cjs/dom/set-offset-from-parent/set-offset-from-parent.js +38 -38
- package/dist/cjs/dom/set-offset-from-parent/set-offset-from-parent.js.map +1 -1
- package/dist/cjs/dom/set-style/set-style.js +10 -10
- package/dist/cjs/dom/set-styles/set-styles.js +13 -13
- package/dist/cjs/dom/types.js +2 -2
- package/dist/cjs/env/get-browser/get-browser.js +54 -54
- package/dist/cjs/env/get-browser/get-browser.js.map +1 -1
- package/dist/cjs/env/get-engine/get-engine.js +18 -18
- package/dist/cjs/env/get-engine/get-engine.js.map +1 -1
- package/dist/cjs/env/get-os/get-os.js +32 -32
- package/dist/cjs/env/get-os/get-os.js.map +1 -1
- package/dist/cjs/env/get-platform/get-platform.js +32 -32
- package/dist/cjs/env/get-platform/get-platform.js.map +1 -1
- package/dist/cjs/env/index.js +44 -44
- package/dist/cjs/env/is-browser/is-browser.js +9 -9
- package/dist/cjs/env/is-chrome-like/is-chrome-like.js +9 -9
- package/dist/cjs/env/is-desktop/is-desktop.js +9 -9
- package/dist/cjs/env/is-engine/is-engine.js +9 -9
- package/dist/cjs/env/is-firefox-like/is-firefox-like.js +9 -9
- package/dist/cjs/env/is-mobile/is-mobile.js +9 -9
- package/dist/cjs/env/is-os/is-os.js +9 -9
- package/dist/cjs/env/is-portable/is-portable.js +8 -8
- package/dist/cjs/env/is-safari-like/is-safari-like.js +9 -9
- package/dist/cjs/env/is-stationary/is-stationary.js +8 -8
- package/dist/cjs/env/is-tablet/is-tablet.js +9 -9
- package/dist/cjs/env/is-tv/is-tv.js +9 -9
- package/dist/cjs/env/matches/matches.js +23 -23
- package/dist/cjs/env/matches/matches.js.map +1 -1
- package/dist/cjs/env/matches-with-browsers/matches-with-browsers.js +35 -35
- package/dist/cjs/env/matches-with-browsers/matches-with-browsers.js.map +1 -1
- package/dist/cjs/env/matches-with-version/matches-with-version.js +39 -39
- package/dist/cjs/env/matches-with-version/matches-with-version.js.map +1 -1
- package/dist/cjs/env/private/private.js +58 -58
- package/dist/cjs/env/private/private.js.map +1 -1
- package/dist/cjs/env/types.js +2 -2
- package/dist/cjs/env/user-agent/user-agent.js +24 -24
- package/dist/cjs/env/user-agent/user-agent.js.map +1 -1
- package/dist/cjs/index.js +10 -10
- package/dist/cjs/num/in-range/in-range.js +27 -25
- package/dist/cjs/num/in-range/in-range.js.map +1 -1
- package/dist/cjs/num/index.js +7 -7
- package/dist/cjs/num/round/round.js +8 -8
- package/dist/cjs/obj/constant/constant.js +7 -7
- package/dist/cjs/obj/deep-constant/deep-constant.js +22 -15
- package/dist/cjs/obj/deep-constant/deep-constant.js.map +1 -1
- package/dist/cjs/obj/diff-obj/diff-obj.js +45 -45
- package/dist/cjs/obj/diff-obj/diff-obj.js.map +1 -1
- package/dist/cjs/obj/exclude/exclude.js +15 -15
- package/dist/cjs/obj/exclude/exclude.js.map +1 -1
- package/dist/cjs/obj/extend/extend.js +44 -40
- package/dist/cjs/obj/extend/extend.js.map +1 -1
- package/dist/cjs/obj/for-each-obj/for-each-obj.js +13 -13
- package/dist/cjs/obj/for-each-obj/for-each-obj.js.map +1 -1
- package/dist/cjs/obj/has-own/has-own.js +7 -7
- package/dist/cjs/obj/has-own/has-own.js.map +1 -1
- package/dist/cjs/obj/include/include.js +15 -15
- package/dist/cjs/obj/include/include.js.map +1 -1
- package/dist/cjs/obj/index.js +28 -28
- package/dist/cjs/obj/keys/keys.js +7 -7
- package/dist/cjs/obj/map-obj/map-obj.js +10 -10
- package/dist/cjs/obj/map-obj-to-arr/map-obj-to-arr.js +10 -10
- package/dist/cjs/obj/values/values.js +10 -10
- package/dist/cjs/str/index.js +9 -9
- package/dist/cjs/str/to-camel-case/to-camel-case.js +16 -12
- package/dist/cjs/str/to-camel-case/to-camel-case.js.map +1 -1
- package/dist/cjs/str/to-hash/to-hash.js +17 -18
- package/dist/cjs/str/to-hash/to-hash.js.map +1 -1
- package/dist/cjs/str/with-capital/with-capital.js +7 -7
- package/dist/esm/arr/at/at.js +3 -3
- package/dist/esm/arr/at/at.js.map +1 -1
- package/dist/esm/arr/cnd/cnd.js +90 -90
- package/dist/esm/arr/cnd/cnd.js.map +1 -1
- package/dist/esm/arr/diff-arr/diff-arr.js +29 -29
- package/dist/esm/arr/diff-arr/diff-arr.js.map +1 -1
- package/dist/esm/arr/fill/fill.js +3 -3
- package/dist/esm/arr/for-each-arr/for-each-arr.js +17 -17
- package/dist/esm/arr/for-each-arr/for-each-arr.js.map +1 -1
- package/dist/esm/arr/index-by/index-by.js +11 -11
- package/dist/esm/arr/index-by/index-by.js.map +1 -1
- package/dist/esm/arr/index.js +8 -8
- package/dist/esm/arr/pluck/pluck.js +7 -7
- package/dist/esm/arr/within/within.js +5 -5
- package/dist/esm/common/copy/copy.js +79 -79
- package/dist/esm/common/copy/copy.js.map +1 -1
- package/dist/esm/common/equals/equals.js +115 -115
- package/dist/esm/common/equals/equals.js.map +1 -1
- package/dist/esm/common/error.js +9 -9
- package/dist/esm/common/error.js.map +1 -1
- package/dist/esm/common/for-each/for-each.js +32 -32
- package/dist/esm/common/for-each/for-each.js.map +1 -1
- package/dist/esm/common/get-unique-num-id/get-unique-num-id.js +4 -4
- package/dist/esm/common/get-unique-str-id/get-unique-str-id.js +6 -6
- package/dist/esm/common/get-unique-str-id/get-unique-str-id.js.map +1 -1
- package/dist/esm/common/has-iterator/has-iterator.js +3 -3
- package/dist/esm/common/index.js +16 -16
- package/dist/esm/common/interrupt.js +1 -1
- package/dist/esm/common/is/is.js +100 -98
- package/dist/esm/common/is/is.js.map +1 -1
- package/dist/esm/common/is-empty/is-empty.js +24 -24
- package/dist/esm/common/is-empty/is-empty.js.map +1 -1
- package/dist/esm/common/random/random.js +5 -4
- package/dist/esm/common/random/random.js.map +1 -1
- package/dist/esm/common/same/same.js +3 -3
- package/dist/esm/common/stub/stub.js +3 -3
- package/dist/esm/common/to-float/to-float.js +5 -5
- package/dist/esm/common/to-int/to-int.js +5 -5
- package/dist/esm/common/to-sorted-string/to-sorted-string.js +48 -48
- package/dist/esm/common/to-sorted-string/to-sorted-string.js.map +1 -1
- package/dist/esm/common/types.js +1 -1
- package/dist/esm/dom/closest/closest.js +16 -20
- package/dist/esm/dom/closest/closest.js.map +1 -1
- package/dist/esm/dom/document/document.js +13 -13
- package/dist/esm/dom/document/document.js.map +1 -1
- package/dist/esm/dom/download-file/download-file.js +23 -25
- package/dist/esm/dom/download-file/download-file.js.map +1 -1
- package/dist/esm/dom/for-each-elements/for-each-elements.js +8 -8
- package/dist/esm/dom/for-each-elements/for-each-elements.js.map +1 -1
- package/dist/esm/dom/for-each-nodes/for-each-nodes.js +8 -8
- package/dist/esm/dom/for-each-nodes/for-each-nodes.js.map +1 -1
- package/dist/esm/dom/get-all-styles/get-all-styles.js +5 -5
- package/dist/esm/dom/get-body/get-body.js +5 -5
- package/dist/esm/dom/get-html/get-html.js +5 -5
- package/dist/esm/dom/get-non-static-parent/get-non-static-parent.js +4 -4
- package/dist/esm/dom/get-offset-from-doc/get-offset-from-doc.js +13 -13
- package/dist/esm/dom/get-offset-from-parent/get-offset-from-parent.js +37 -37
- package/dist/esm/dom/get-offset-from-parent/get-offset-from-parent.js.map +1 -1
- package/dist/esm/dom/get-offset-from-win/get-offset-from-win.js +3 -3
- package/dist/esm/dom/get-scroll-width/get-scroll-width.js +24 -23
- package/dist/esm/dom/get-scroll-width/get-scroll-width.js.map +1 -1
- package/dist/esm/dom/get-style/get-style.js +17 -17
- package/dist/esm/dom/get-style/get-style.js.map +1 -1
- package/dist/esm/dom/get-styles/get-styles.js +6 -6
- package/dist/esm/dom/get-valid-style-name/get-valid-style-name.js +35 -35
- package/dist/esm/dom/get-valid-style-name/get-valid-style-name.js.map +1 -1
- package/dist/esm/dom/get-window/get-window.js +13 -13
- package/dist/esm/dom/get-window/get-window.js.map +1 -1
- package/dist/esm/dom/has-name/has-name.js +3 -3
- package/dist/esm/dom/index.js +24 -24
- package/dist/esm/dom/is-comment/is-comment.js +3 -3
- package/dist/esm/dom/is-element/is-element.js +3 -3
- package/dist/esm/dom/is-text/is-text.js +3 -3
- package/dist/esm/dom/set-offset-from-parent/set-offset-from-parent.js +34 -34
- package/dist/esm/dom/set-offset-from-parent/set-offset-from-parent.js.map +1 -1
- package/dist/esm/dom/set-style/set-style.js +6 -6
- package/dist/esm/dom/set-styles/set-styles.js +9 -9
- package/dist/esm/dom/types.js +1 -1
- package/dist/esm/env/get-browser/get-browser.js +49 -49
- package/dist/esm/env/get-browser/get-browser.js.map +1 -1
- package/dist/esm/env/get-engine/get-engine.js +13 -13
- package/dist/esm/env/get-engine/get-engine.js.map +1 -1
- package/dist/esm/env/get-os/get-os.js +27 -27
- package/dist/esm/env/get-os/get-os.js.map +1 -1
- package/dist/esm/env/get-platform/get-platform.js +27 -27
- package/dist/esm/env/get-platform/get-platform.js.map +1 -1
- package/dist/esm/env/index.js +20 -20
- package/dist/esm/env/is-browser/is-browser.js +5 -5
- package/dist/esm/env/is-chrome-like/is-chrome-like.js +5 -5
- package/dist/esm/env/is-desktop/is-desktop.js +5 -5
- package/dist/esm/env/is-engine/is-engine.js +5 -5
- package/dist/esm/env/is-firefox-like/is-firefox-like.js +5 -5
- package/dist/esm/env/is-mobile/is-mobile.js +5 -5
- package/dist/esm/env/is-os/is-os.js +5 -5
- package/dist/esm/env/is-portable/is-portable.js +4 -4
- package/dist/esm/env/is-safari-like/is-safari-like.js +5 -5
- package/dist/esm/env/is-stationary/is-stationary.js +4 -4
- package/dist/esm/env/is-tablet/is-tablet.js +5 -5
- package/dist/esm/env/is-tv/is-tv.js +5 -5
- package/dist/esm/env/matches/matches.js +19 -19
- package/dist/esm/env/matches/matches.js.map +1 -1
- package/dist/esm/env/matches-with-browsers/matches-with-browsers.js +31 -31
- package/dist/esm/env/matches-with-browsers/matches-with-browsers.js.map +1 -1
- package/dist/esm/env/matches-with-version/matches-with-version.js +35 -35
- package/dist/esm/env/matches-with-version/matches-with-version.js.map +1 -1
- package/dist/esm/env/private/private.js +52 -52
- package/dist/esm/env/private/private.js.map +1 -1
- package/dist/esm/env/types.js +1 -1
- package/dist/esm/env/user-agent/user-agent.js +19 -19
- package/dist/esm/env/user-agent/user-agent.js.map +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/num/in-range/in-range.js +23 -21
- package/dist/esm/num/in-range/in-range.js.map +1 -1
- package/dist/esm/num/index.js +2 -2
- package/dist/esm/num/round/round.js +4 -4
- package/dist/esm/obj/constant/constant.js +3 -3
- package/dist/esm/obj/deep-constant/deep-constant.js +18 -11
- package/dist/esm/obj/deep-constant/deep-constant.js.map +1 -1
- package/dist/esm/obj/diff-obj/diff-obj.js +41 -41
- package/dist/esm/obj/diff-obj/diff-obj.js.map +1 -1
- package/dist/esm/obj/exclude/exclude.js +11 -11
- package/dist/esm/obj/exclude/exclude.js.map +1 -1
- package/dist/esm/obj/extend/extend.js +39 -35
- package/dist/esm/obj/extend/extend.js.map +1 -1
- package/dist/esm/obj/for-each-obj/for-each-obj.js +9 -9
- package/dist/esm/obj/for-each-obj/for-each-obj.js.map +1 -1
- package/dist/esm/obj/has-own/has-own.js +3 -3
- package/dist/esm/obj/has-own/has-own.js.map +1 -1
- package/dist/esm/obj/include/include.js +11 -11
- package/dist/esm/obj/include/include.js.map +1 -1
- package/dist/esm/obj/index.js +12 -12
- package/dist/esm/obj/keys/keys.js +3 -3
- package/dist/esm/obj/map-obj/map-obj.js +6 -6
- package/dist/esm/obj/map-obj-to-arr/map-obj-to-arr.js +6 -6
- package/dist/esm/obj/values/values.js +6 -6
- package/dist/esm/str/index.js +3 -3
- package/dist/esm/str/to-camel-case/to-camel-case.js +12 -8
- package/dist/esm/str/to-camel-case/to-camel-case.js.map +1 -1
- package/dist/esm/str/to-hash/to-hash.js +13 -14
- package/dist/esm/str/to-hash/to-hash.js.map +1 -1
- package/dist/esm/str/with-capital/with-capital.js +3 -3
- package/dist/types/arr/at/at.d.ts +7 -7
- package/dist/types/arr/at/at.d.ts.map +1 -1
- package/dist/types/arr/cnd/cnd.d.ts +117 -117
- package/dist/types/arr/cnd/cnd.d.ts.map +1 -1
- package/dist/types/arr/diff-arr/diff-arr.d.ts +30 -30
- package/dist/types/arr/fill/fill.d.ts +8 -8
- package/dist/types/arr/for-each-arr/for-each-arr.d.ts +9 -9
- package/dist/types/arr/index-by/index-by.d.ts +9 -9
- package/dist/types/arr/index.d.ts +8 -8
- package/dist/types/arr/pluck/pluck.d.ts +7 -7
- package/dist/types/arr/within/within.d.ts +9 -9
- package/dist/types/common/copy/copy.d.ts +6 -6
- package/dist/types/common/equals/equals.d.ts +12 -12
- package/dist/types/common/error.d.ts +25 -25
- package/dist/types/common/for-each/for-each.d.ts +9 -9
- package/dist/types/common/get-unique-num-id/get-unique-num-id.d.ts +4 -4
- package/dist/types/common/get-unique-str-id/get-unique-str-id.d.ts +6 -4
- package/dist/types/common/get-unique-str-id/get-unique-str-id.d.ts.map +1 -1
- package/dist/types/common/has-iterator/has-iterator.d.ts +5 -5
- package/dist/types/common/index.d.ts +17 -17
- package/dist/types/common/index.d.ts.map +1 -1
- package/dist/types/common/interrupt.d.ts +4 -4
- package/dist/types/common/is/is.d.ts +136 -136
- package/dist/types/common/is-empty/is-empty.d.ts +6 -6
- package/dist/types/common/random/random.d.ts +7 -5
- package/dist/types/common/random/random.d.ts.map +1 -1
- package/dist/types/common/same/same.d.ts +6 -6
- package/dist/types/common/stub/stub.d.ts +4 -4
- package/dist/types/common/to-float/to-float.d.ts +6 -6
- package/dist/types/common/to-int/to-int.d.ts +6 -6
- package/dist/types/common/to-sorted-string/to-sorted-string.d.ts +7 -7
- package/dist/types/common/types.d.ts +64 -64
- package/dist/types/common/types.d.ts.map +1 -1
- package/dist/types/dom/closest/closest.d.ts +6 -6
- package/dist/types/dom/closest/closest.d.ts.map +1 -1
- package/dist/types/dom/document/document.d.ts +12 -12
- package/dist/types/dom/download-file/download-file.d.ts +7 -7
- package/dist/types/dom/download-file/download-file.d.ts.map +1 -1
- package/dist/types/dom/for-each-elements/for-each-elements.d.ts +8 -8
- package/dist/types/dom/for-each-nodes/for-each-nodes.d.ts +7 -7
- package/dist/types/dom/get-all-styles/get-all-styles.d.ts +5 -5
- package/dist/types/dom/get-body/get-body.d.ts +4 -4
- package/dist/types/dom/get-html/get-html.d.ts +4 -4
- package/dist/types/dom/get-non-static-parent/get-non-static-parent.d.ts +5 -5
- package/dist/types/dom/get-offset-from-doc/get-offset-from-doc.d.ts +6 -6
- package/dist/types/dom/get-offset-from-parent/get-offset-from-parent.d.ts +7 -7
- package/dist/types/dom/get-offset-from-win/get-offset-from-win.d.ts +6 -6
- package/dist/types/dom/get-scroll-width/get-scroll-width.d.ts +8 -8
- package/dist/types/dom/get-scroll-width/get-scroll-width.d.ts.map +1 -1
- package/dist/types/dom/get-style/get-style.d.ts +6 -6
- package/dist/types/dom/get-styles/get-styles.d.ts +9 -9
- package/dist/types/dom/get-valid-style-name/get-valid-style-name.d.ts +6 -6
- package/dist/types/dom/get-window/get-window.d.ts +4 -4
- package/dist/types/dom/has-name/has-name.d.ts +6 -6
- package/dist/types/dom/index.d.ts +25 -25
- package/dist/types/dom/is-comment/is-comment.d.ts +5 -5
- package/dist/types/dom/is-element/is-element.d.ts +5 -5
- package/dist/types/dom/is-text/is-text.d.ts +5 -5
- package/dist/types/dom/set-offset-from-parent/set-offset-from-parent.d.ts +8 -8
- package/dist/types/dom/set-style/set-style.d.ts +8 -8
- package/dist/types/dom/set-styles/set-styles.d.ts +8 -8
- package/dist/types/dom/types.d.ts +19 -19
- package/dist/types/env/get-browser/get-browser.d.ts +10 -10
- package/dist/types/env/get-engine/get-engine.d.ts +7 -7
- package/dist/types/env/get-os/get-os.d.ts +8 -8
- package/dist/types/env/get-platform/get-platform.d.ts +7 -7
- package/dist/types/env/index.d.ts +21 -21
- package/dist/types/env/is-browser/is-browser.d.ts +11 -11
- package/dist/types/env/is-chrome-like/is-chrome-like.d.ts +4 -4
- package/dist/types/env/is-desktop/is-desktop.d.ts +4 -4
- package/dist/types/env/is-engine/is-engine.d.ts +8 -8
- package/dist/types/env/is-firefox-like/is-firefox-like.d.ts +4 -4
- package/dist/types/env/is-mobile/is-mobile.d.ts +4 -4
- package/dist/types/env/is-os/is-os.d.ts +9 -9
- package/dist/types/env/is-portable/is-portable.d.ts +4 -4
- package/dist/types/env/is-safari-like/is-safari-like.d.ts +4 -4
- package/dist/types/env/is-stationary/is-stationary.d.ts +4 -4
- package/dist/types/env/is-tablet/is-tablet.d.ts +4 -4
- package/dist/types/env/is-tv/is-tv.d.ts +4 -4
- package/dist/types/env/matches/matches.d.ts +34 -34
- package/dist/types/env/matches-with-browsers/matches-with-browsers.d.ts +23 -23
- package/dist/types/env/matches-with-version/matches-with-version.d.ts +6 -6
- package/dist/types/env/private/private.d.ts +4 -4
- package/dist/types/env/types.d.ts +106 -106
- package/dist/types/env/types.d.ts.map +1 -1
- package/dist/types/env/user-agent/user-agent.d.ts +9 -9
- package/dist/types/index.d.ts +7 -7
- package/dist/types/num/in-range/in-range.d.ts +31 -31
- package/dist/types/num/in-range/in-range.d.ts.map +1 -1
- package/dist/types/num/index.d.ts +2 -2
- package/dist/types/num/round/round.d.ts +7 -7
- package/dist/types/obj/constant/constant.d.ts +6 -6
- package/dist/types/obj/deep-constant/deep-constant.d.ts +7 -6
- package/dist/types/obj/deep-constant/deep-constant.d.ts.map +1 -1
- package/dist/types/obj/diff-obj/diff-obj.d.ts +37 -37
- package/dist/types/obj/exclude/exclude.d.ts +7 -7
- package/dist/types/obj/extend/extend.d.ts +18 -16
- package/dist/types/obj/extend/extend.d.ts.map +1 -1
- package/dist/types/obj/for-each-obj/for-each-obj.d.ts +8 -8
- package/dist/types/obj/has-own/has-own.d.ts +8 -8
- package/dist/types/obj/has-own/has-own.d.ts.map +1 -1
- package/dist/types/obj/include/include.d.ts +7 -7
- package/dist/types/obj/index.d.ts +12 -12
- package/dist/types/obj/keys/keys.d.ts +6 -6
- package/dist/types/obj/map-obj/map-obj.d.ts +7 -7
- package/dist/types/obj/map-obj-to-arr/map-obj-to-arr.d.ts +7 -7
- package/dist/types/obj/values/values.d.ts +6 -6
- package/dist/types/str/index.d.ts +3 -3
- package/dist/types/str/to-camel-case/to-camel-case.d.ts +10 -10
- package/dist/types/str/to-camel-case/to-camel-case.d.ts.map +1 -1
- package/dist/types/str/to-hash/to-hash.d.ts +7 -7
- package/dist/types/str/to-hash/to-hash.d.ts.map +1 -1
- package/dist/types/str/with-capital/with-capital.d.ts +6 -6
- package/package.json +10 -10
- package/src/arr/at/at.ts +1 -2
- package/src/arr/diff-arr/diff-arr.ts +1 -1
- package/src/common/error.ts +2 -2
- package/src/common/get-unique-str-id/get-unique-str-id.ts +2 -0
- package/src/common/index.ts +1 -1
- package/src/common/is/is.ts +2 -2
- package/src/common/is-empty/is-empty.ts +1 -1
- package/src/common/random/random.ts +6 -3
- package/src/dom/closest/closest.ts +4 -5
- package/src/dom/download-file/download-file.ts +3 -2
- package/src/dom/get-offset-from-parent/get-offset-from-parent.ts +2 -2
- package/src/dom/get-scroll-width/get-scroll-width.ts +3 -2
- package/src/dom/get-style/get-style.ts +3 -3
- package/src/dom/set-offset-from-parent/set-offset-from-parent.ts +3 -3
- package/src/env/matches-with-browsers/matches-with-browsers.ts +1 -1
- package/src/num/in-range/in-range.ts +3 -1
- package/src/obj/deep-constant/deep-constant.ts +12 -4
- package/src/obj/extend/extend.ts +11 -3
- package/src/obj/has-own/has-own.ts +1 -2
- package/src/str/to-camel-case/to-camel-case.ts +7 -1
- package/src/str/to-hash/to-hash.ts +1 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Obj } from '../../common';
|
|
2
|
-
/**
|
|
3
|
-
* Returns an array with values, each of which corresponds to the value of a certain array item field
|
|
4
|
-
* @param arr - array of objects
|
|
5
|
-
* @param fieldName - name of the array item field from which the value is to be taken
|
|
6
|
-
*/
|
|
7
|
-
export declare function pluck<T extends Obj, F extends keyof T>(arr: T[], fieldName: F): (T[F])[];
|
|
1
|
+
import { Obj } from '../../common';
|
|
2
|
+
/**
|
|
3
|
+
* Returns an array with values, each of which corresponds to the value of a certain array item field
|
|
4
|
+
* @param arr - array of objects
|
|
5
|
+
* @param fieldName - name of the array item field from which the value is to be taken
|
|
6
|
+
*/
|
|
7
|
+
export declare function pluck<T extends Obj, F extends keyof T>(arr: T[], fieldName: F): (T[F])[];
|
|
8
8
|
//# sourceMappingURL=pluck.d.ts.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns an array item by index.
|
|
3
|
-
* If the index is greater than the array length,
|
|
4
|
-
* then the array item will be obtained like remainder of division the index by the array length.
|
|
5
|
-
* For negative indexes, returns items from the end
|
|
6
|
-
* @param arr - any array
|
|
7
|
-
* @param index - an array item index
|
|
8
|
-
*/
|
|
9
|
-
export declare function within<T>(arr: T[], index: number): T | undefined;
|
|
1
|
+
/**
|
|
2
|
+
* Returns an array item by index.
|
|
3
|
+
* If the index is greater than the array length,
|
|
4
|
+
* then the array item will be obtained like remainder of division the index by the array length.
|
|
5
|
+
* For negative indexes, returns items from the end
|
|
6
|
+
* @param arr - any array
|
|
7
|
+
* @param index - an array item index
|
|
8
|
+
*/
|
|
9
|
+
export declare function within<T>(arr: T[], index: number): T | undefined;
|
|
10
10
|
//# sourceMappingURL=within.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Creates a deep copy of a value of any type
|
|
3
|
-
* Objects, arrays, sets, maps etc. will be ignored if they have been visited to prevent looping
|
|
4
|
-
* @param value - anything
|
|
5
|
-
*/
|
|
6
|
-
export declare function copy<T>(value: T): T;
|
|
1
|
+
/**
|
|
2
|
+
* Creates a deep copy of a value of any type
|
|
3
|
+
* Objects, arrays, sets, maps etc. will be ignored if they have been visited to prevent looping
|
|
4
|
+
* @param value - anything
|
|
5
|
+
*/
|
|
6
|
+
export declare function copy<T>(value: T): T;
|
|
7
7
|
//# sourceMappingURL=copy.d.ts.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Determines whether two values are equal.
|
|
3
|
-
* The comparison is performed to the full depth of nesting.
|
|
4
|
-
* Objects are equal if they have the same fields with equal values.
|
|
5
|
-
* Arrays and sets are equal if they have the same length and equal values in the same order.
|
|
6
|
-
* Maps are equal if they have the same keys with equal values.
|
|
7
|
-
* Objects, arrays, sets, maps etc. will be ignored if they have been visited to prevent looping
|
|
8
|
-
* @param value1 - anything
|
|
9
|
-
* @param value2 - anything
|
|
10
|
-
* @param sortFn - if added, arrays and sets will be sorted before comparison
|
|
11
|
-
*/
|
|
12
|
-
export declare function equals(value1: any, value2: any, sortFn?: (a: any, b: any) => number): boolean;
|
|
1
|
+
/**
|
|
2
|
+
* Determines whether two values are equal.
|
|
3
|
+
* The comparison is performed to the full depth of nesting.
|
|
4
|
+
* Objects are equal if they have the same fields with equal values.
|
|
5
|
+
* Arrays and sets are equal if they have the same length and equal values in the same order.
|
|
6
|
+
* Maps are equal if they have the same keys with equal values.
|
|
7
|
+
* Objects, arrays, sets, maps etc. will be ignored if they have been visited to prevent looping
|
|
8
|
+
* @param value1 - anything
|
|
9
|
+
* @param value2 - anything
|
|
10
|
+
* @param sortFn - if added, arrays and sets will be sorted before comparison
|
|
11
|
+
*/
|
|
12
|
+
export declare function equals(value1: any, value2: any, sortFn?: (a: any, b: any) => number): boolean;
|
|
13
13
|
//# sourceMappingURL=equals.d.ts.map
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Represents additional error options the BfError class
|
|
3
|
-
*/
|
|
4
|
-
export interface BfErrorOptions {
|
|
5
|
-
code?: string;
|
|
6
|
-
data?: any;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Extends the Error class and adds additional parameters: date, code, data
|
|
10
|
-
*/
|
|
11
|
-
export declare class BfError extends Error {
|
|
12
|
-
/**
|
|
13
|
-
* Creation date
|
|
14
|
-
*/
|
|
15
|
-
readonly date: Date;
|
|
16
|
-
/**
|
|
17
|
-
* Unique error code
|
|
18
|
-
*/
|
|
19
|
-
readonly code?: string;
|
|
20
|
-
/**
|
|
21
|
-
* Any additional data for error handling
|
|
22
|
-
*/
|
|
23
|
-
readonly data?: any;
|
|
24
|
-
constructor(
|
|
25
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Represents additional error options the BfError class
|
|
3
|
+
*/
|
|
4
|
+
export interface BfErrorOptions {
|
|
5
|
+
code?: string;
|
|
6
|
+
data?: any;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Extends the Error class and adds additional parameters: date, code, data
|
|
10
|
+
*/
|
|
11
|
+
export declare class BfError extends Error {
|
|
12
|
+
/**
|
|
13
|
+
* Creation date
|
|
14
|
+
*/
|
|
15
|
+
readonly date: Date;
|
|
16
|
+
/**
|
|
17
|
+
* Unique error code
|
|
18
|
+
*/
|
|
19
|
+
readonly code?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Any additional data for error handling
|
|
22
|
+
*/
|
|
23
|
+
readonly data?: any;
|
|
24
|
+
constructor(message?: string, options?: BfErrorOptions);
|
|
25
|
+
}
|
|
26
26
|
//# sourceMappingURL=error.d.ts.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { NumStr } from '../';
|
|
2
|
-
/**
|
|
3
|
-
* Iterates through all the items of any iterable object and calls a handler for each item
|
|
4
|
-
* If the handler returns INTERRUPT, the loop will be interrupted
|
|
5
|
-
* @param obj - any iterable object
|
|
6
|
-
* @param handler - function called for each item
|
|
7
|
-
* @param reverse - iterates in reverse order if true
|
|
8
|
-
*/
|
|
9
|
-
export declare function forEach(obj: any, handler: (value: any, key: NumStr, obj: any) => any, reverse?: boolean): void;
|
|
1
|
+
import { NumStr } from '../';
|
|
2
|
+
/**
|
|
3
|
+
* Iterates through all the items of any iterable object and calls a handler for each item
|
|
4
|
+
* If the handler returns INTERRUPT, the loop will be interrupted
|
|
5
|
+
* @param obj - any iterable object
|
|
6
|
+
* @param handler - function called for each item
|
|
7
|
+
* @param reverse - iterates in reverse order if true
|
|
8
|
+
*/
|
|
9
|
+
export declare function forEach(obj: any, handler: (value: any, key: NumStr, obj: any) => any, reverse?: boolean): void;
|
|
10
10
|
//# sourceMappingURL=for-each.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns a unique number identifier for the current session
|
|
3
|
-
*/
|
|
4
|
-
export declare function getUniqueNumId(): number;
|
|
1
|
+
/**
|
|
2
|
+
* Returns a unique number identifier for the current session
|
|
3
|
+
*/
|
|
4
|
+
export declare function getUniqueNumId(): number;
|
|
5
5
|
//# sourceMappingURL=get-unique-num-id.d.ts.map
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns a unique string identifier for the current session
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Returns a unique string identifier for the current session
|
|
3
|
+
* @note Uses Math.random for salt generation which is NOT cryptographically secure.
|
|
4
|
+
* Do not use for security-sensitive purposes such as tokens or passwords
|
|
5
|
+
*/
|
|
6
|
+
export declare function getUniqueStrId(): string;
|
|
5
7
|
//# sourceMappingURL=get-unique-str-id.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-unique-str-id.d.ts","sourceRoot":"","sources":["../../../../src/common/get-unique-str-id/get-unique-str-id.ts"],"names":[],"mappings":"AAYA
|
|
1
|
+
{"version":3,"file":"get-unique-str-id.d.ts","sourceRoot":"","sources":["../../../../src/common/get-unique-str-id/get-unique-str-id.ts"],"names":[],"mappings":"AAYA;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns true if the value has an iterator, otherwise false
|
|
3
|
-
* @param value - anything
|
|
4
|
-
*/
|
|
5
|
-
export declare function hasIterator(value: any): boolean;
|
|
1
|
+
/**
|
|
2
|
+
* Returns true if the value has an iterator, otherwise false
|
|
3
|
+
* @param value - anything
|
|
4
|
+
*/
|
|
5
|
+
export declare function hasIterator(value: any): boolean;
|
|
6
6
|
//# sourceMappingURL=has-iterator.d.ts.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export { Nullish, NumStr, NumStrSym, Fn, Arr, TypedArr, Obj, Index, ArrObj, UnionToIntersection, ValueUnion, ValueIntersection, } from './types';
|
|
2
|
-
export { INTERRUPT } from './interrupt';
|
|
3
|
-
export { BfError, BfErrorOptions } from './error';
|
|
4
|
-
export { stub } from './stub/stub';
|
|
5
|
-
export { isNull, isUndefined, isDefined, isNullish, isNaN, isString, isNumber, isBigInt, isBoolean, isSymbol, isFunction, isObject, isArray, isSet, isMap, isDate, isRegExp, isFile, isBlob, isFormData, isArrayBuffer, isDocument, isWindow, isPromise, isObservable, isTypedArray, isUsualObject, } from './is/is';
|
|
6
|
-
export { isEmpty } from './is-empty/is-empty';
|
|
7
|
-
export { same } from './same/same';
|
|
8
|
-
export { random } from './random/random';
|
|
9
|
-
export { toInt } from './to-int/to-int';
|
|
10
|
-
export { toFloat } from './to-float/to-float';
|
|
11
|
-
export { hasIterator } from './has-iterator/has-iterator';
|
|
12
|
-
export { getUniqueStrId } from './get-unique-str-id/get-unique-str-id';
|
|
13
|
-
export { getUniqueNumId } from './get-unique-num-id/get-unique-num-id';
|
|
14
|
-
export { toSortedString } from './to-sorted-string/to-sorted-string';
|
|
15
|
-
export { forEach } from './for-each/for-each';
|
|
16
|
-
export { equals } from './equals/equals';
|
|
17
|
-
export { copy } from './copy/copy';
|
|
1
|
+
export { Nullish, NumStr, NumStrSym, Fn, Arr, TypedArr, Obj, Index, ArrObj, UnionToIntersection, ValueUnion, ValueIntersection, OmitType, PickType, } from './types';
|
|
2
|
+
export { INTERRUPT } from './interrupt';
|
|
3
|
+
export { BfError, BfErrorOptions } from './error';
|
|
4
|
+
export { stub } from './stub/stub';
|
|
5
|
+
export { isNull, isUndefined, isDefined, isNullish, isNaN, isString, isNumber, isBigInt, isBoolean, isSymbol, isFunction, isObject, isArray, isSet, isMap, isDate, isRegExp, isFile, isBlob, isFormData, isArrayBuffer, isDocument, isWindow, isPromise, isObservable, isTypedArray, isUsualObject, } from './is/is';
|
|
6
|
+
export { isEmpty } from './is-empty/is-empty';
|
|
7
|
+
export { same } from './same/same';
|
|
8
|
+
export { random } from './random/random';
|
|
9
|
+
export { toInt } from './to-int/to-int';
|
|
10
|
+
export { toFloat } from './to-float/to-float';
|
|
11
|
+
export { hasIterator } from './has-iterator/has-iterator';
|
|
12
|
+
export { getUniqueStrId } from './get-unique-str-id/get-unique-str-id';
|
|
13
|
+
export { getUniqueNumId } from './get-unique-num-id/get-unique-num-id';
|
|
14
|
+
export { toSortedString } from './to-sorted-string/to-sorted-string';
|
|
15
|
+
export { forEach } from './for-each/for-each';
|
|
16
|
+
export { equals } from './equals/equals';
|
|
17
|
+
export { copy } from './copy/copy';
|
|
18
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,mBAAmB,EACtF,UAAU,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,mBAAmB,EACtF,UAAU,EAAE,iBAAiB,EAAE,QAAQ,EAAE,QAAQ,GAClD,MAAM,SAAS,CAAC;AACjB,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,OAAO,EAAE,cAAc,EAAC,MAAM,SAAS,CAAC;AAChD,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EACL,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EACzF,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EACvF,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EACtF,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAC,OAAO,EAAC,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAC,MAAM,EAAC,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAC,KAAK,EAAC,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAC,OAAO,EAAC,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAC,WAAW,EAAC,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAC,cAAc,EAAC,MAAM,uCAAuC,CAAC;AACrE,OAAO,EAAC,cAAc,EAAC,MAAM,uCAAuC,CAAC;AACrE,OAAO,EAAC,cAAc,EAAC,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAC,OAAO,EAAC,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAC,MAAM,EAAC,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This symbol is used in forEach handlers to interrupt the loop
|
|
3
|
-
*/
|
|
4
|
-
export declare const INTERRUPT: unique symbol;
|
|
1
|
+
/**
|
|
2
|
+
* This symbol is used in forEach handlers to interrupt the loop
|
|
3
|
+
*/
|
|
4
|
+
export declare const INTERRUPT: unique symbol;
|
|
5
5
|
//# sourceMappingURL=interrupt.d.ts.map
|
|
@@ -1,137 +1,137 @@
|
|
|
1
|
-
import { Fn, TypedArr, Obj, Nullish } from '../';
|
|
2
|
-
/**
|
|
3
|
-
* Returns true if the value is null, otherwise false
|
|
4
|
-
* @param value - anything
|
|
5
|
-
*/
|
|
6
|
-
export declare function isNull(value: any): value is null;
|
|
7
|
-
/**
|
|
8
|
-
* Returns true if the value is undefined, otherwise false
|
|
9
|
-
* @param value - anything
|
|
10
|
-
*/
|
|
11
|
-
export declare function isUndefined(value: any): value is undefined;
|
|
12
|
-
/**
|
|
13
|
-
* Returns true if the value is defined, otherwise false
|
|
14
|
-
* @param value - anything
|
|
15
|
-
*/
|
|
16
|
-
export declare function isDefined(value: any): boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Returns true if the value is undefined or null, otherwise false
|
|
19
|
-
* @param value - anything
|
|
20
|
-
*/
|
|
21
|
-
export declare function isNullish(value: any): value is Nullish;
|
|
22
|
-
/**
|
|
23
|
-
* Returns true if the value is NaN, otherwise false
|
|
24
|
-
* @param value - anything
|
|
25
|
-
*/
|
|
26
|
-
export declare function isNaN(value: any): value is typeof NaN;
|
|
27
|
-
/**
|
|
28
|
-
* Returns true if the value is a string, otherwise false
|
|
29
|
-
* @param value - anything
|
|
30
|
-
*/
|
|
31
|
-
export declare function isString(value: any): value is string;
|
|
32
|
-
/**
|
|
33
|
-
* Returns true if the value is a number, otherwise false
|
|
34
|
-
* @param value - anything
|
|
35
|
-
*/
|
|
36
|
-
export declare function isNumber(value: any): value is number;
|
|
37
|
-
/**
|
|
38
|
-
* Returns true if the value is a big integer, otherwise false
|
|
39
|
-
* @param value - anything
|
|
40
|
-
*/
|
|
41
|
-
export declare function isBigInt(value: any): value is bigint;
|
|
42
|
-
/**
|
|
43
|
-
* Returns true if the value is a boolean, otherwise false
|
|
44
|
-
* @param value - anything
|
|
45
|
-
*/
|
|
46
|
-
export declare function isBoolean(value: any): value is boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Returns true if the value is a symbol, otherwise false
|
|
49
|
-
* @param value - anything
|
|
50
|
-
*/
|
|
51
|
-
export declare function isSymbol(value: any): value is symbol;
|
|
52
|
-
/**
|
|
53
|
-
* Returns true if the value is a function, otherwise false
|
|
54
|
-
* @param value - anything
|
|
55
|
-
*/
|
|
56
|
-
export declare function isFunction(value: any): value is Fn;
|
|
57
|
-
/**
|
|
58
|
-
* Returns true if the value is an object, otherwise false
|
|
59
|
-
* @param value - anything
|
|
60
|
-
*/
|
|
61
|
-
export declare function isObject(value: any): value is Obj;
|
|
62
|
-
/**
|
|
63
|
-
* Returns true if the value is an array, otherwise false
|
|
64
|
-
* @param value - anything
|
|
65
|
-
*/
|
|
66
|
-
export declare function isArray(value: any): value is Array<any>;
|
|
67
|
-
/**
|
|
68
|
-
* Returns true if the value is a set, otherwise false
|
|
69
|
-
* @param value - anything
|
|
70
|
-
*/
|
|
71
|
-
export declare function isSet(value: any): value is Set<any>;
|
|
72
|
-
/**
|
|
73
|
-
* Returns true if the value is a map, otherwise false
|
|
74
|
-
* @param value - anything
|
|
75
|
-
*/
|
|
76
|
-
export declare function isMap(value: any): value is Map<any, any>;
|
|
77
|
-
/**
|
|
78
|
-
* Returns true if the value is a date, otherwise false
|
|
79
|
-
* @param value - anything
|
|
80
|
-
*/
|
|
81
|
-
export declare function isDate(value: any): value is Date;
|
|
82
|
-
/**
|
|
83
|
-
* Returns true if the value is a regular expression, otherwise false
|
|
84
|
-
* @param value - anything
|
|
85
|
-
*/
|
|
86
|
-
export declare function isRegExp(value: any): value is RegExp;
|
|
87
|
-
/**
|
|
88
|
-
* Returns true if the value is a file, otherwise false
|
|
89
|
-
* @param value - anything
|
|
90
|
-
*/
|
|
91
|
-
export declare function isFile(value: any): value is File;
|
|
92
|
-
/**
|
|
93
|
-
* Returns true if the value is a blob, otherwise false
|
|
94
|
-
* @param value - anything
|
|
95
|
-
*/
|
|
96
|
-
export declare function isBlob(value: any): value is Blob;
|
|
97
|
-
/**
|
|
98
|
-
* Returns true if the value is form data, otherwise false
|
|
99
|
-
* @param value - anything
|
|
100
|
-
*/
|
|
101
|
-
export declare function isFormData(value: any): value is FormData;
|
|
102
|
-
/**
|
|
103
|
-
* Returns true if the value is an array buffer, otherwise false
|
|
104
|
-
* @param value - anything
|
|
105
|
-
*/
|
|
106
|
-
export declare function isArrayBuffer(value: any): value is ArrayBuffer;
|
|
107
|
-
/**
|
|
108
|
-
* Returns true if the value is a document, otherwise false
|
|
109
|
-
* @param value - anything
|
|
110
|
-
*/
|
|
111
|
-
export declare function isDocument(value: any): value is Document;
|
|
112
|
-
/**
|
|
113
|
-
* Returns true if the value is a window, otherwise false
|
|
114
|
-
* @param value - anything
|
|
115
|
-
*/
|
|
116
|
-
export declare function isWindow(value: any): value is Window;
|
|
117
|
-
/**
|
|
118
|
-
* Returns true if the value is a promise, otherwise false
|
|
119
|
-
* @param value - anything
|
|
120
|
-
*/
|
|
121
|
-
export declare function isPromise(value: any): value is Promise<any>;
|
|
122
|
-
/**
|
|
123
|
-
* Returns true if the value is an observable, otherwise false
|
|
124
|
-
* @param value - anything
|
|
125
|
-
*/
|
|
126
|
-
export declare function isObservable(value: any): boolean;
|
|
127
|
-
/**
|
|
128
|
-
* Returns true if the value is a typed array, otherwise false
|
|
129
|
-
* @param value - anything
|
|
130
|
-
*/
|
|
131
|
-
export declare function isTypedArray(value: any): value is TypedArr;
|
|
132
|
-
/**
|
|
133
|
-
* Returns true if the value is a usual object, otherwise false
|
|
134
|
-
* @param value - anything
|
|
135
|
-
*/
|
|
136
|
-
export declare function isUsualObject(value: any): value is Obj;
|
|
1
|
+
import { Fn, TypedArr, Obj, Nullish } from '../';
|
|
2
|
+
/**
|
|
3
|
+
* Returns true if the value is null, otherwise false
|
|
4
|
+
* @param value - anything
|
|
5
|
+
*/
|
|
6
|
+
export declare function isNull(value: any): value is null;
|
|
7
|
+
/**
|
|
8
|
+
* Returns true if the value is undefined, otherwise false
|
|
9
|
+
* @param value - anything
|
|
10
|
+
*/
|
|
11
|
+
export declare function isUndefined(value: any): value is undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Returns true if the value is defined, otherwise false
|
|
14
|
+
* @param value - anything
|
|
15
|
+
*/
|
|
16
|
+
export declare function isDefined(value: any): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Returns true if the value is undefined or null, otherwise false
|
|
19
|
+
* @param value - anything
|
|
20
|
+
*/
|
|
21
|
+
export declare function isNullish(value: any): value is Nullish;
|
|
22
|
+
/**
|
|
23
|
+
* Returns true if the value is NaN, otherwise false
|
|
24
|
+
* @param value - anything
|
|
25
|
+
*/
|
|
26
|
+
export declare function isNaN(value: any): value is typeof NaN;
|
|
27
|
+
/**
|
|
28
|
+
* Returns true if the value is a string, otherwise false
|
|
29
|
+
* @param value - anything
|
|
30
|
+
*/
|
|
31
|
+
export declare function isString(value: any): value is string;
|
|
32
|
+
/**
|
|
33
|
+
* Returns true if the value is a number, otherwise false
|
|
34
|
+
* @param value - anything
|
|
35
|
+
*/
|
|
36
|
+
export declare function isNumber(value: any): value is number;
|
|
37
|
+
/**
|
|
38
|
+
* Returns true if the value is a big integer, otherwise false
|
|
39
|
+
* @param value - anything
|
|
40
|
+
*/
|
|
41
|
+
export declare function isBigInt(value: any): value is bigint;
|
|
42
|
+
/**
|
|
43
|
+
* Returns true if the value is a boolean, otherwise false
|
|
44
|
+
* @param value - anything
|
|
45
|
+
*/
|
|
46
|
+
export declare function isBoolean(value: any): value is boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Returns true if the value is a symbol, otherwise false
|
|
49
|
+
* @param value - anything
|
|
50
|
+
*/
|
|
51
|
+
export declare function isSymbol(value: any): value is symbol;
|
|
52
|
+
/**
|
|
53
|
+
* Returns true if the value is a function, otherwise false
|
|
54
|
+
* @param value - anything
|
|
55
|
+
*/
|
|
56
|
+
export declare function isFunction(value: any): value is Fn;
|
|
57
|
+
/**
|
|
58
|
+
* Returns true if the value is an object, otherwise false
|
|
59
|
+
* @param value - anything
|
|
60
|
+
*/
|
|
61
|
+
export declare function isObject(value: any): value is Obj;
|
|
62
|
+
/**
|
|
63
|
+
* Returns true if the value is an array, otherwise false
|
|
64
|
+
* @param value - anything
|
|
65
|
+
*/
|
|
66
|
+
export declare function isArray(value: any): value is Array<any>;
|
|
67
|
+
/**
|
|
68
|
+
* Returns true if the value is a set, otherwise false
|
|
69
|
+
* @param value - anything
|
|
70
|
+
*/
|
|
71
|
+
export declare function isSet(value: any): value is Set<any>;
|
|
72
|
+
/**
|
|
73
|
+
* Returns true if the value is a map, otherwise false
|
|
74
|
+
* @param value - anything
|
|
75
|
+
*/
|
|
76
|
+
export declare function isMap(value: any): value is Map<any, any>;
|
|
77
|
+
/**
|
|
78
|
+
* Returns true if the value is a date, otherwise false
|
|
79
|
+
* @param value - anything
|
|
80
|
+
*/
|
|
81
|
+
export declare function isDate(value: any): value is Date;
|
|
82
|
+
/**
|
|
83
|
+
* Returns true if the value is a regular expression, otherwise false
|
|
84
|
+
* @param value - anything
|
|
85
|
+
*/
|
|
86
|
+
export declare function isRegExp(value: any): value is RegExp;
|
|
87
|
+
/**
|
|
88
|
+
* Returns true if the value is a file, otherwise false
|
|
89
|
+
* @param value - anything
|
|
90
|
+
*/
|
|
91
|
+
export declare function isFile(value: any): value is File;
|
|
92
|
+
/**
|
|
93
|
+
* Returns true if the value is a blob, otherwise false
|
|
94
|
+
* @param value - anything
|
|
95
|
+
*/
|
|
96
|
+
export declare function isBlob(value: any): value is Blob;
|
|
97
|
+
/**
|
|
98
|
+
* Returns true if the value is form data, otherwise false
|
|
99
|
+
* @param value - anything
|
|
100
|
+
*/
|
|
101
|
+
export declare function isFormData(value: any): value is FormData;
|
|
102
|
+
/**
|
|
103
|
+
* Returns true if the value is an array buffer, otherwise false
|
|
104
|
+
* @param value - anything
|
|
105
|
+
*/
|
|
106
|
+
export declare function isArrayBuffer(value: any): value is ArrayBuffer;
|
|
107
|
+
/**
|
|
108
|
+
* Returns true if the value is a document, otherwise false
|
|
109
|
+
* @param value - anything
|
|
110
|
+
*/
|
|
111
|
+
export declare function isDocument(value: any): value is Document;
|
|
112
|
+
/**
|
|
113
|
+
* Returns true if the value is a window, otherwise false
|
|
114
|
+
* @param value - anything
|
|
115
|
+
*/
|
|
116
|
+
export declare function isWindow(value: any): value is Window;
|
|
117
|
+
/**
|
|
118
|
+
* Returns true if the value is a promise, otherwise false
|
|
119
|
+
* @param value - anything
|
|
120
|
+
*/
|
|
121
|
+
export declare function isPromise(value: any): value is Promise<any>;
|
|
122
|
+
/**
|
|
123
|
+
* Returns true if the value is an observable, otherwise false
|
|
124
|
+
* @param value - anything
|
|
125
|
+
*/
|
|
126
|
+
export declare function isObservable(value: any): boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Returns true if the value is a typed array, otherwise false
|
|
129
|
+
* @param value - anything
|
|
130
|
+
*/
|
|
131
|
+
export declare function isTypedArray(value: any): value is TypedArr;
|
|
132
|
+
/**
|
|
133
|
+
* Returns true if the value is a usual object, otherwise false
|
|
134
|
+
* @param value - anything
|
|
135
|
+
*/
|
|
136
|
+
export declare function isUsualObject(value: any): value is Obj;
|
|
137
137
|
//# sourceMappingURL=is.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns true if the value is empty (null, undefined,
|
|
3
|
-
* otherwise false
|
|
4
|
-
* @param value - anything
|
|
5
|
-
*/
|
|
6
|
-
export declare function isEmpty(value: any): boolean;
|
|
1
|
+
/**
|
|
2
|
+
* Returns true if the value is empty (null, undefined, '', {}, [], Int32Array(), Set(), Map()),
|
|
3
|
+
* otherwise false
|
|
4
|
+
* @param value - anything
|
|
5
|
+
*/
|
|
6
|
+
export declare function isEmpty(value: any): boolean;
|
|
7
7
|
//# sourceMappingURL=is-empty.d.ts.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns a random integer between 0 and
|
|
3
|
-
* @
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Returns a random integer between 0 and 10^numberOfDigits - 1
|
|
3
|
+
* @note Uses Math.random which is NOT cryptographically secure.
|
|
4
|
+
* Do not use for security-sensitive purposes such as tokens or passwords
|
|
5
|
+
* @param numberOfDigits - number of digits (default: 7, maximum: 15)
|
|
6
|
+
*/
|
|
7
|
+
export declare function random(numberOfDigits?: number): number;
|
|
6
8
|
//# sourceMappingURL=random.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"random.d.ts","sourceRoot":"","sources":["../../../../src/common/random/random.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"random.d.ts","sourceRoot":"","sources":["../../../../src/common/random/random.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,cAAc,SAAI,GAAG,MAAM,CAIjD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Determines whether two values are the same value
|
|
3
|
-
* @param value1 - anything
|
|
4
|
-
* @param value2 - anything
|
|
5
|
-
*/
|
|
6
|
-
export declare function same(value1: any, value2: any): boolean;
|
|
1
|
+
/**
|
|
2
|
+
* Determines whether two values are the same value
|
|
3
|
+
* @param value1 - anything
|
|
4
|
+
* @param value2 - anything
|
|
5
|
+
*/
|
|
6
|
+
export declare function same(value1: any, value2: any): boolean;
|
|
7
7
|
//# sourceMappingURL=same.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Can replace any required function,
|
|
3
|
-
* takes any arguments and returns anything
|
|
4
|
-
*/ export declare function stub(...args: any[]): any;
|
|
1
|
+
/**
|
|
2
|
+
* Can replace any required function,
|
|
3
|
+
* takes any arguments and returns anything
|
|
4
|
+
*/ export declare function stub(...args: any[]): any;
|
|
5
5
|
//# sourceMappingURL=stub.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { NumStr } from '../';
|
|
2
|
-
/**
|
|
3
|
-
* Converts a string to a float and replaces NaN and Infinity with 0
|
|
4
|
-
* @param value - a string or number
|
|
5
|
-
*/
|
|
6
|
-
export declare function toFloat(value: NumStr): number;
|
|
1
|
+
import { NumStr } from '../';
|
|
2
|
+
/**
|
|
3
|
+
* Converts a string to a float and replaces NaN and Infinity with 0
|
|
4
|
+
* @param value - a string or number
|
|
5
|
+
*/
|
|
6
|
+
export declare function toFloat(value: NumStr): number;
|
|
7
7
|
//# sourceMappingURL=to-float.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { NumStr } from '../';
|
|
2
|
-
/**
|
|
3
|
-
* Converts a string to an integer and replaces NaN and Infinity with 0
|
|
4
|
-
* @param value - a string or number
|
|
5
|
-
*/
|
|
6
|
-
export declare function toInt(value: NumStr): number;
|
|
1
|
+
import { NumStr } from '../';
|
|
2
|
+
/**
|
|
3
|
+
* Converts a string to an integer and replaces NaN and Infinity with 0
|
|
4
|
+
* @param value - a string or number
|
|
5
|
+
*/
|
|
6
|
+
export declare function toInt(value: NumStr): number;
|
|
7
7
|
//# sourceMappingURL=to-int.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Converts any value to a sorted string.
|
|
3
|
-
* Sorts arrays, maps and sets by value and sorts objects by field name before adding them to a string.
|
|
4
|
-
* Objects, arrays, sets, maps etc. will be ignored if they have been visited to prevent looping
|
|
5
|
-
* @param value - anything
|
|
6
|
-
*/
|
|
7
|
-
export declare function toSortedString(value: any): string;
|
|
1
|
+
/**
|
|
2
|
+
* Converts any value to a sorted string.
|
|
3
|
+
* Sorts arrays, maps and sets by value and sorts objects by field name before adding them to a string.
|
|
4
|
+
* Objects, arrays, sets, maps etc. will be ignored if they have been visited to prevent looping
|
|
5
|
+
* @param value - anything
|
|
6
|
+
*/
|
|
7
|
+
export declare function toSortedString(value: any): string;
|
|
8
8
|
//# sourceMappingURL=to-sorted-string.d.ts.map
|