@bitfiber/utils 1.1.1 → 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/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/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,107 +1,107 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Represents supported bot names
|
|
3
|
-
*/
|
|
4
|
-
export
|
|
5
|
-
/**
|
|
6
|
-
* Represents supported platform names
|
|
7
|
-
*/
|
|
8
|
-
export
|
|
9
|
-
/**
|
|
10
|
-
* Represents supported OS names
|
|
11
|
-
*/
|
|
12
|
-
export
|
|
13
|
-
/**
|
|
14
|
-
* Represents supported engine names
|
|
15
|
-
*/
|
|
16
|
-
export
|
|
17
|
-
/**
|
|
18
|
-
* Represents supported browser names
|
|
19
|
-
*/
|
|
20
|
-
export
|
|
21
|
-
/**
|
|
22
|
-
* Represents a version data
|
|
23
|
-
*/
|
|
24
|
-
export interface VersionData {
|
|
25
|
-
/**
|
|
26
|
-
* Full version
|
|
27
|
-
*/
|
|
28
|
-
version: string;
|
|
29
|
-
/**
|
|
30
|
-
* Major version (first number)
|
|
31
|
-
*/
|
|
32
|
-
major: string;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Represents the returned data by the getOS function
|
|
36
|
-
*/
|
|
37
|
-
export interface OSData extends VersionData {
|
|
38
|
-
/**
|
|
39
|
-
* Unique name of the OS
|
|
40
|
-
*/
|
|
41
|
-
name: OSNames;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Represents the returned data by the getEngine function
|
|
45
|
-
*/
|
|
46
|
-
export interface EngineData extends VersionData {
|
|
47
|
-
/**
|
|
48
|
-
* Unique name of the browser engine
|
|
49
|
-
*/
|
|
50
|
-
name: EngineNames;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Represents the returned data by the getBrowser function
|
|
54
|
-
*/
|
|
55
|
-
export interface BrowserData extends VersionData {
|
|
56
|
-
/**
|
|
57
|
-
* Unique name of the browser
|
|
58
|
-
*/
|
|
59
|
-
name: BrowserNames;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Represents an object that have keys corresponding to engine names and values corresponding to engine versions
|
|
63
|
-
*/
|
|
64
|
-
export
|
|
65
|
-
[key in EngineNames]?: string;
|
|
66
|
-
};
|
|
67
|
-
/**
|
|
68
|
-
* Represents an object that have keys corresponding to browser names and values corresponding to browser versions,
|
|
69
|
-
* and may have an engine property with the engines condition
|
|
70
|
-
*/
|
|
71
|
-
export
|
|
72
|
-
[key in BrowserNames]?: string;
|
|
73
|
-
} & {
|
|
74
|
-
engines?: EngineNames | EnginesCondition;
|
|
75
|
-
};
|
|
76
|
-
/**
|
|
77
|
-
* Represents the browsers condition with an optional osVersion property
|
|
78
|
-
*/
|
|
79
|
-
export
|
|
80
|
-
osVersion?: string;
|
|
81
|
-
};
|
|
82
|
-
/**
|
|
83
|
-
* Represents an object that have keys corresponding to OS names and values corresponding to the OS browsers conditions
|
|
84
|
-
*/
|
|
85
|
-
export
|
|
86
|
-
[key in OSNames]?: OSBrowsersCondition;
|
|
87
|
-
} & {
|
|
88
|
-
anyOS?: OSBrowsersCondition;
|
|
89
|
-
};
|
|
90
|
-
/**
|
|
91
|
-
* Represents an object that have keys corresponding to platform names and values corresponding to the OS conditions
|
|
92
|
-
*/
|
|
93
|
-
export
|
|
94
|
-
[key in PlatformNames]?: OSCondition;
|
|
95
|
-
} & {
|
|
96
|
-
anyPlatform?: OSCondition;
|
|
97
|
-
};
|
|
98
|
-
export interface BotData extends VersionData {
|
|
99
|
-
name: BotNames;
|
|
100
|
-
}
|
|
101
|
-
export interface EnvData extends VersionData {
|
|
102
|
-
name: PlatformNames | OSNames | EngineNames | BrowserNames;
|
|
103
|
-
}
|
|
104
|
-
export
|
|
105
|
-
export
|
|
106
|
-
export
|
|
1
|
+
/**
|
|
2
|
+
* Represents supported bot names
|
|
3
|
+
*/
|
|
4
|
+
export type BotNames = 'googlebot' | 'bingbot' | 'yandexbot' | 'slurp' | 'unknown';
|
|
5
|
+
/**
|
|
6
|
+
* Represents supported platform names
|
|
7
|
+
*/
|
|
8
|
+
export type PlatformNames = 'tv' | 'desktop' | 'tablet' | 'mobile' | BotNames;
|
|
9
|
+
/**
|
|
10
|
+
* Represents supported OS names
|
|
11
|
+
*/
|
|
12
|
+
export type OSNames = 'xbox' | 'windows' | 'ios' | 'macOS' | 'webOS' | 'tizen' | 'appleTV' | 'roku' | 'chromeOS' | 'playstation4' | 'playstation5' | 'nintendoSwitch' | 'likeAndroid' | 'android' | 'linux' | BotNames;
|
|
13
|
+
/**
|
|
14
|
+
* Represents supported engine names
|
|
15
|
+
*/
|
|
16
|
+
export type EngineNames = 'blink' | 'webkit' | 'gecko' | BotNames;
|
|
17
|
+
/**
|
|
18
|
+
* Represents supported browser names
|
|
19
|
+
*/
|
|
20
|
+
export type BrowserNames = 'opera' | 'operaCoast' | 'operaTouch' | 'samsung' | 'mz' | 'yandex' | 'uc' | 'maxthon' | 'kmeleon' | 'wechat' | 'qqLite' | 'qq' | 'edge' | 'sailfish' | 'webOS' | 'tizen' | 'miui' | 'silk' | 'phantomjs' | 'slimerjs' | 'qupzilla' | 'electron' | 'whale' | 'focus' | 'swing' | 'epiphany' | 'puffin' | 'sleipnir' | 'vivaldi' | 'seamonkey' | 'playstation4' | 'playstation5' | 'googleSearch' | 'firefox' | 'chrome' | 'android' | 'safari' | BotNames;
|
|
21
|
+
/**
|
|
22
|
+
* Represents a version data
|
|
23
|
+
*/
|
|
24
|
+
export interface VersionData {
|
|
25
|
+
/**
|
|
26
|
+
* Full version
|
|
27
|
+
*/
|
|
28
|
+
version: string;
|
|
29
|
+
/**
|
|
30
|
+
* Major version (first number)
|
|
31
|
+
*/
|
|
32
|
+
major: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Represents the returned data by the getOS function
|
|
36
|
+
*/
|
|
37
|
+
export interface OSData extends VersionData {
|
|
38
|
+
/**
|
|
39
|
+
* Unique name of the OS
|
|
40
|
+
*/
|
|
41
|
+
name: OSNames;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Represents the returned data by the getEngine function
|
|
45
|
+
*/
|
|
46
|
+
export interface EngineData extends VersionData {
|
|
47
|
+
/**
|
|
48
|
+
* Unique name of the browser engine
|
|
49
|
+
*/
|
|
50
|
+
name: EngineNames;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Represents the returned data by the getBrowser function
|
|
54
|
+
*/
|
|
55
|
+
export interface BrowserData extends VersionData {
|
|
56
|
+
/**
|
|
57
|
+
* Unique name of the browser
|
|
58
|
+
*/
|
|
59
|
+
name: BrowserNames;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Represents an object that have keys corresponding to engine names and values corresponding to engine versions
|
|
63
|
+
*/
|
|
64
|
+
export type EnginesCondition = {
|
|
65
|
+
[key in EngineNames]?: string;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Represents an object that have keys corresponding to browser names and values corresponding to browser versions,
|
|
69
|
+
* and may have an engine property with the engines condition
|
|
70
|
+
*/
|
|
71
|
+
export type BrowsersCondition = {
|
|
72
|
+
[key in BrowserNames]?: string;
|
|
73
|
+
} & {
|
|
74
|
+
engines?: EngineNames | EnginesCondition;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Represents the browsers condition with an optional osVersion property
|
|
78
|
+
*/
|
|
79
|
+
export type OSBrowsersCondition = BrowsersCondition & {
|
|
80
|
+
osVersion?: string;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Represents an object that have keys corresponding to OS names and values corresponding to the OS browsers conditions
|
|
84
|
+
*/
|
|
85
|
+
export type OSCondition = {
|
|
86
|
+
[key in OSNames]?: OSBrowsersCondition;
|
|
87
|
+
} & {
|
|
88
|
+
anyOS?: OSBrowsersCondition;
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Represents an object that have keys corresponding to platform names and values corresponding to the OS conditions
|
|
92
|
+
*/
|
|
93
|
+
export type PlatformsCondition = {
|
|
94
|
+
[key in PlatformNames]?: OSCondition;
|
|
95
|
+
} & {
|
|
96
|
+
anyPlatform?: OSCondition;
|
|
97
|
+
};
|
|
98
|
+
export interface BotData extends VersionData {
|
|
99
|
+
name: BotNames;
|
|
100
|
+
}
|
|
101
|
+
export interface EnvData extends VersionData {
|
|
102
|
+
name: PlatformNames | OSNames | EngineNames | BrowserNames;
|
|
103
|
+
}
|
|
104
|
+
export type EnvTest = string | RegExp | (() => boolean);
|
|
105
|
+
export type EnvTestGroup = EnvTest | EnvTest[];
|
|
106
|
+
export type EnvCondition = string | [string, EnvTestGroup] | [string, EnvTestGroup, string | RegExp];
|
|
107
107
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/env/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/env/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns user agent
|
|
3
|
-
*/
|
|
4
|
-
export declare function getUserAgent(): string;
|
|
5
|
-
/**
|
|
6
|
-
* If the global object is not a window, you can use this function to set up a stub user agent
|
|
7
|
-
* @param userAgent - any string with user agent data
|
|
8
|
-
*/
|
|
9
|
-
export declare function setUserAgent(userAgent: string): void;
|
|
1
|
+
/**
|
|
2
|
+
* Returns user agent
|
|
3
|
+
*/
|
|
4
|
+
export declare function getUserAgent(): string;
|
|
5
|
+
/**
|
|
6
|
+
* If the global object is not a window, you can use this function to set up a stub user agent
|
|
7
|
+
* @param userAgent - any string with user agent data
|
|
8
|
+
*/
|
|
9
|
+
export declare function setUserAgent(userAgent: string): void;
|
|
10
10
|
//# sourceMappingURL=user-agent.d.ts.map
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from './common/index';
|
|
2
|
-
export * from './num/index';
|
|
3
|
-
export * from './str/index';
|
|
4
|
-
export * from './obj/index';
|
|
5
|
-
export * from './arr/index';
|
|
6
|
-
export * from './dom/index';
|
|
7
|
-
export * from './env/index';
|
|
1
|
+
export * from './common/index';
|
|
2
|
+
export * from './num/index';
|
|
3
|
+
export * from './str/index';
|
|
4
|
+
export * from './obj/index';
|
|
5
|
+
export * from './arr/index';
|
|
6
|
+
export * from './dom/index';
|
|
7
|
+
export * from './env/index';
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { Nullish } from '../../common';
|
|
2
|
-
/**
|
|
3
|
-
* Represents options type for the inRange function
|
|
4
|
-
*/
|
|
5
|
-
export interface InRangeOptions {
|
|
6
|
-
/**
|
|
7
|
-
* If the minimum is specified and the value is less than the minimum,
|
|
8
|
-
* the value will be replaced with the minimum
|
|
9
|
-
*/
|
|
10
|
-
min?: number;
|
|
11
|
-
/**
|
|
12
|
-
* If the maximum is specified and the value is greater than the maximum,
|
|
13
|
-
* the value will be replaced with the maximum
|
|
14
|
-
*/
|
|
15
|
-
max?: number;
|
|
16
|
-
/**
|
|
17
|
-
* If the precision is specified, the value will be rounded to the number of decimal places
|
|
18
|
-
*/
|
|
19
|
-
precision?: number;
|
|
20
|
-
/**
|
|
21
|
-
* If true, the empty value will be replaced with
|
|
22
|
-
* either the defined minimum or defined maximum if the maximum is less than 0 or 0
|
|
23
|
-
*/
|
|
24
|
-
required?: boolean;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Converts the numeric value to a new number according to the options
|
|
28
|
-
* @param value - numeric value
|
|
29
|
-
* @param options - options for converting the numeric value
|
|
30
|
-
*/
|
|
31
|
-
export declare function inRange(value: number | Nullish, options?: InRangeOptions): number | null;
|
|
1
|
+
import { Nullish } from '../../common';
|
|
2
|
+
/**
|
|
3
|
+
* Represents options type for the inRange function
|
|
4
|
+
*/
|
|
5
|
+
export interface InRangeOptions {
|
|
6
|
+
/**
|
|
7
|
+
* If the minimum is specified and the value is less than the minimum,
|
|
8
|
+
* the value will be replaced with the minimum
|
|
9
|
+
*/
|
|
10
|
+
min?: number;
|
|
11
|
+
/**
|
|
12
|
+
* If the maximum is specified and the value is greater than the maximum,
|
|
13
|
+
* the value will be replaced with the maximum
|
|
14
|
+
*/
|
|
15
|
+
max?: number;
|
|
16
|
+
/**
|
|
17
|
+
* If the precision is specified, the value will be rounded to the number of decimal places
|
|
18
|
+
*/
|
|
19
|
+
precision?: number;
|
|
20
|
+
/**
|
|
21
|
+
* If true, the empty value will be replaced with
|
|
22
|
+
* either the defined minimum or defined maximum if the maximum is less than 0 or 0
|
|
23
|
+
*/
|
|
24
|
+
required?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Converts the numeric value to a new number according to the options
|
|
28
|
+
* @param value - numeric value
|
|
29
|
+
* @param options - options for converting the numeric value
|
|
30
|
+
*/
|
|
31
|
+
export declare function inRange(value: number | Nullish, options?: InRangeOptions): number | null;
|
|
32
32
|
//# sourceMappingURL=in-range.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"in-range.d.ts","sourceRoot":"","sources":["../../../../src/num/in-range/in-range.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,OAAO,EAAC,MAAM,cAAc,CAAC;AAG/C;;GAEG;AACH,MAAM,WAAW,cAAc;IAE7B;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE,OAAO,GAAE,cAAmB,GAAG,MAAM,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"in-range.d.ts","sourceRoot":"","sources":["../../../../src/num/in-range/in-range.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,OAAO,EAAC,MAAM,cAAc,CAAC;AAG/C;;GAEG;AACH,MAAM,WAAW,cAAc;IAE7B;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE,OAAO,GAAE,cAAmB,GAAG,MAAM,GAAG,IAAI,CAsB5F"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { round } from './round/round';
|
|
2
|
-
export { inRange, InRangeOptions } from './in-range/in-range';
|
|
1
|
+
export { round } from './round/round';
|
|
2
|
+
export { inRange, InRangeOptions } from './in-range/in-range';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Rounds a numeric value to a number with a specified number of decimal places
|
|
3
|
-
* and replaces NaN and Infinity with 0
|
|
4
|
-
* @param value - numeric value
|
|
5
|
-
* @param precision - number of decimal places, default 0
|
|
6
|
-
*/
|
|
7
|
-
export declare function round(value: number, precision?: number): number;
|
|
1
|
+
/**
|
|
2
|
+
* Rounds a numeric value to a number with a specified number of decimal places
|
|
3
|
+
* and replaces NaN and Infinity with 0
|
|
4
|
+
* @param value - numeric value
|
|
5
|
+
* @param precision - number of decimal places, default 0
|
|
6
|
+
*/
|
|
7
|
+
export declare function round(value: number, precision?: number): number;
|
|
8
8
|
//# sourceMappingURL=round.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Obj } from '../../common';
|
|
2
|
-
/**
|
|
3
|
-
* Makes an object read-only
|
|
4
|
-
* @param obj - any object
|
|
5
|
-
*/
|
|
6
|
-
export declare function constant<T extends Obj>(obj: T): Readonly<T>;
|
|
1
|
+
import { Obj } from '../../common';
|
|
2
|
+
/**
|
|
3
|
+
* Makes an object read-only
|
|
4
|
+
* @param obj - any object
|
|
5
|
+
*/
|
|
6
|
+
export declare function constant<T extends Obj>(obj: T): Readonly<T>;
|
|
7
7
|
//# sourceMappingURL=constant.d.ts.map
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Obj } from '../../common';
|
|
2
|
-
/**
|
|
3
|
-
* Makes an object and its nested objects read-only
|
|
4
|
-
*
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { Obj } from '../../common';
|
|
2
|
+
/**
|
|
3
|
+
* Makes an object and its nested objects read-only.
|
|
4
|
+
* Objects that have been visited will be ignored to prevent looping
|
|
5
|
+
* @param obj - any object
|
|
6
|
+
*/
|
|
7
|
+
export declare function deepConstant<T extends Obj>(obj: T): Readonly<T>;
|
|
7
8
|
//# sourceMappingURL=deep-constant.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deep-constant.d.ts","sourceRoot":"","sources":["../../../../src/obj/deep-constant/deep-constant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,GAAG,EAAC,MAAM,cAAc,CAAC;AAG3C
|
|
1
|
+
{"version":3,"file":"deep-constant.d.ts","sourceRoot":"","sources":["../../../../src/obj/deep-constant/deep-constant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,GAAG,EAAC,MAAM,cAAc,CAAC;AAG3C;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAE/D"}
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { Obj } from '../../common';
|
|
2
|
-
/**
|
|
3
|
-
* Represents response of the diffObj function
|
|
4
|
-
*/
|
|
5
|
-
export interface ObjDiff<T extends Obj> {
|
|
6
|
-
/**
|
|
7
|
-
* Contains equal fields for object 1 and object 2
|
|
8
|
-
*/
|
|
9
|
-
equal: Partial<T>;
|
|
10
|
-
/**
|
|
11
|
-
* Contains fields that are only in object 1 or are not equal to the fields of object 2
|
|
12
|
-
*/
|
|
13
|
-
notEqual1: Partial<T>;
|
|
14
|
-
/**
|
|
15
|
-
* Contains fields that are only in object 2 or are not equal to the fields of object 1
|
|
16
|
-
*/
|
|
17
|
-
notEqual2: Partial<T>;
|
|
18
|
-
/**
|
|
19
|
-
* Contains fields that are only in object 1
|
|
20
|
-
*/
|
|
21
|
-
only1: Partial<T>;
|
|
22
|
-
/**
|
|
23
|
-
* Contains fields that are only in object 2
|
|
24
|
-
*/
|
|
25
|
-
only2: Partial<T>;
|
|
26
|
-
/**
|
|
27
|
-
* True if notEqual1 and notEqual2 are empty, otherwise false
|
|
28
|
-
*/
|
|
29
|
-
isEqual: boolean;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Returns the difference between two objects
|
|
33
|
-
* @param obj1 - any object 1
|
|
34
|
-
* @param obj2 - any object 2
|
|
35
|
-
* @param sortFn - if added, arrays and sets will be sorted before comparison
|
|
36
|
-
*/
|
|
37
|
-
export declare function diffObj<T1 extends Obj, T2 extends Obj>(obj1: T1, obj2: T2, sortFn?: (a: any, b: any) => number): ObjDiff<T1 & T2>;
|
|
1
|
+
import { Obj } from '../../common';
|
|
2
|
+
/**
|
|
3
|
+
* Represents response of the diffObj function
|
|
4
|
+
*/
|
|
5
|
+
export interface ObjDiff<T extends Obj> {
|
|
6
|
+
/**
|
|
7
|
+
* Contains equal fields for object 1 and object 2
|
|
8
|
+
*/
|
|
9
|
+
equal: Partial<T>;
|
|
10
|
+
/**
|
|
11
|
+
* Contains fields that are only in object 1 or are not equal to the fields of object 2
|
|
12
|
+
*/
|
|
13
|
+
notEqual1: Partial<T>;
|
|
14
|
+
/**
|
|
15
|
+
* Contains fields that are only in object 2 or are not equal to the fields of object 1
|
|
16
|
+
*/
|
|
17
|
+
notEqual2: Partial<T>;
|
|
18
|
+
/**
|
|
19
|
+
* Contains fields that are only in object 1
|
|
20
|
+
*/
|
|
21
|
+
only1: Partial<T>;
|
|
22
|
+
/**
|
|
23
|
+
* Contains fields that are only in object 2
|
|
24
|
+
*/
|
|
25
|
+
only2: Partial<T>;
|
|
26
|
+
/**
|
|
27
|
+
* True if notEqual1 and notEqual2 are empty, otherwise false
|
|
28
|
+
*/
|
|
29
|
+
isEqual: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Returns the difference between two objects
|
|
33
|
+
* @param obj1 - any object 1
|
|
34
|
+
* @param obj2 - any object 2
|
|
35
|
+
* @param sortFn - if added, arrays and sets will be sorted before comparison
|
|
36
|
+
*/
|
|
37
|
+
export declare function diffObj<T1 extends Obj, T2 extends Obj>(obj1: T1, obj2: T2, sortFn?: (a: any, b: any) => number): ObjDiff<T1 & T2>;
|
|
38
38
|
//# sourceMappingURL=diff-obj.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Obj } from '../../common';
|
|
2
|
-
/**
|
|
3
|
-
* Returns a new object with the fields of the passed object, excluding the specified set of fields
|
|
4
|
-
* @param obj - any object
|
|
5
|
-
* @param fields - set of fields to be excluded
|
|
6
|
-
*/
|
|
7
|
-
export declare function exclude<T extends Obj, K extends keyof T>(obj: T, ...fields: K[]): Omit<T, K>;
|
|
1
|
+
import { Obj } from '../../common';
|
|
2
|
+
/**
|
|
3
|
+
* Returns a new object with the fields of the passed object, excluding the specified set of fields
|
|
4
|
+
* @param obj - any object
|
|
5
|
+
* @param fields - set of fields to be excluded
|
|
6
|
+
*/
|
|
7
|
+
export declare function exclude<T extends Obj, K extends keyof T>(obj: T, ...fields: K[]): Omit<T, K>;
|
|
8
8
|
//# sourceMappingURL=exclude.d.ts.map
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import { Obj, ValueIntersection } from '../../common';
|
|
2
|
-
/**
|
|
3
|
-
* Copies all enumerable own properties from one or more source objects to a target object.
|
|
4
|
-
* It returns the modified target object
|
|
5
|
-
*
|
|
6
|
-
* @param
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { Obj, ValueIntersection } from '../../common';
|
|
2
|
+
/**
|
|
3
|
+
* Copies all enumerable own properties from one or more source objects to a target object.
|
|
4
|
+
* It returns the modified target object.
|
|
5
|
+
* Keys __proto__, constructor and prototype are skipped to prevent prototype pollution
|
|
6
|
+
* @param target - target object
|
|
7
|
+
* @param sources - source objects
|
|
8
|
+
*/
|
|
9
|
+
export declare function extend<T extends Obj, U extends Obj[]>(target: T, ...sources: U): T & ValueIntersection<typeof sources>;
|
|
10
|
+
/**
|
|
11
|
+
* Copies all enumerable own properties from one or more source objects to a target object
|
|
12
|
+
* and copies enumerable properties from nested source objects to nested target objects.
|
|
13
|
+
* It returns the modified target object.
|
|
14
|
+
* Keys __proto__, constructor and prototype are skipped to prevent prototype pollution
|
|
15
|
+
* @param target - target object
|
|
16
|
+
* @param sources - source objects
|
|
17
|
+
*/
|
|
18
|
+
export declare function extendAll<T extends Obj, U extends Obj[]>(target: T, ...sources: U): T & ValueIntersection<typeof sources>;
|
|
17
19
|
//# sourceMappingURL=extend.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extend.d.ts","sourceRoot":"","sources":["../../../../src/obj/extend/extend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiC,GAAG,EAAE,iBAAiB,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"extend.d.ts","sourceRoot":"","sources":["../../../../src/obj/extend/extend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiC,GAAG,EAAE,iBAAiB,EAAC,MAAM,cAAc,CAAC;AAKpF;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,GAAG,EAAE,CAAC,SAAS,GAAG,EAAE,EACnD,MAAM,EAAE,CAAC,EACT,GAAG,OAAO,EAAE,CAAC,GACZ,CAAC,GAAG,iBAAiB,CAAC,OAAO,OAAO,CAAC,CAEvC;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,GAAG,EAAE,CAAC,SAAS,GAAG,EAAE,EACtD,MAAM,EAAE,CAAC,EACT,GAAG,OAAO,EAAE,CAAC,GACZ,CAAC,GAAG,iBAAiB,CAAC,OAAO,OAAO,CAAC,CAEvC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Obj, ValueUnion } from '../../common';
|
|
2
|
-
/**
|
|
3
|
-
* Iterates through all the fields of an object and calls a handler for each field
|
|
4
|
-
* If the handler returns INTERRUPT, the loop will be interrupted
|
|
5
|
-
* @param obj - any object
|
|
6
|
-
* @param handler - function called for each field
|
|
7
|
-
*/
|
|
8
|
-
export declare function forEachObj<T extends Obj, K extends keyof T>(obj: T, handler: (value: ValueUnion<T>, key: K, obj: T) => any): void;
|
|
1
|
+
import { Obj, ValueUnion } from '../../common';
|
|
2
|
+
/**
|
|
3
|
+
* Iterates through all the fields of an object and calls a handler for each field
|
|
4
|
+
* If the handler returns INTERRUPT, the loop will be interrupted
|
|
5
|
+
* @param obj - any object
|
|
6
|
+
* @param handler - function called for each field
|
|
7
|
+
*/
|
|
8
|
+
export declare function forEachObj<T extends Obj, K extends keyof T>(obj: T, handler: (value: ValueUnion<T>, key: K, obj: T) => any): void;
|
|
9
9
|
//# sourceMappingURL=for-each-obj.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Obj, NumStrSym } from '../../common';
|
|
2
|
-
/**
|
|
3
|
-
* Returns true if the object has the indicated property as its own property.
|
|
4
|
-
* If the property is inherited, or does not exist, the method returns false
|
|
5
|
-
* @param obj - any object
|
|
6
|
-
* @param property
|
|
7
|
-
*/
|
|
8
|
-
export declare function hasOwn(obj: Obj, property: NumStrSym): boolean;
|
|
1
|
+
import { Obj, NumStrSym } from '../../common';
|
|
2
|
+
/**
|
|
3
|
+
* Returns true if the object has the indicated property as its own property.
|
|
4
|
+
* If the property is inherited, or does not exist, the method returns false
|
|
5
|
+
* @param obj - any object
|
|
6
|
+
* @param property
|
|
7
|
+
*/
|
|
8
|
+
export declare function hasOwn(obj: Obj, property: NumStrSym): boolean;
|
|
9
9
|
//# sourceMappingURL=has-own.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"has-own.d.ts","sourceRoot":"","sources":["../../../../src/obj/has-own/has-own.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAE,SAAS,EAAC,MAAM,cAAc,CAAC;AAE5C;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,SAAS,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"has-own.d.ts","sourceRoot":"","sources":["../../../../src/obj/has-own/has-own.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAE,SAAS,EAAC,MAAM,cAAc,CAAC;AAE5C;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,SAAS,GAAG,OAAO,CAE7D"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Obj } from '../../common';
|
|
2
|
-
/**
|
|
3
|
-
* Returns a new object with the specified set of fields
|
|
4
|
-
* @param obj - any object
|
|
5
|
-
* @param fields - set of fields to be included
|
|
6
|
-
*/
|
|
7
|
-
export declare function include<T extends Obj, K extends keyof T>(obj: T, ...fields: K[]): Pick<T, K>;
|
|
1
|
+
import { Obj } from '../../common';
|
|
2
|
+
/**
|
|
3
|
+
* Returns a new object with the specified set of fields
|
|
4
|
+
* @param obj - any object
|
|
5
|
+
* @param fields - set of fields to be included
|
|
6
|
+
*/
|
|
7
|
+
export declare function include<T extends Obj, K extends keyof T>(obj: T, ...fields: K[]): Pick<T, K>;
|
|
8
8
|
//# sourceMappingURL=include.d.ts.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { hasOwn } from './has-own/has-own';
|
|
2
|
-
export { forEachObj } from './for-each-obj/for-each-obj';
|
|
3
|
-
export { keys } from './keys/keys';
|
|
4
|
-
export { values } from './values/values';
|
|
5
|
-
export { include } from './include/include';
|
|
6
|
-
export { exclude } from './exclude/exclude';
|
|
7
|
-
export { constant } from './constant/constant';
|
|
8
|
-
export { deepConstant } from './deep-constant/deep-constant';
|
|
9
|
-
export { mapObj } from './map-obj/map-obj';
|
|
10
|
-
export { mapObjToArr } from './map-obj-to-arr/map-obj-to-arr';
|
|
11
|
-
export { diffObj, ObjDiff } from './diff-obj/diff-obj';
|
|
12
|
-
export { extend, extendAll } from './extend/extend';
|
|
1
|
+
export { hasOwn } from './has-own/has-own';
|
|
2
|
+
export { forEachObj } from './for-each-obj/for-each-obj';
|
|
3
|
+
export { keys } from './keys/keys';
|
|
4
|
+
export { values } from './values/values';
|
|
5
|
+
export { include } from './include/include';
|
|
6
|
+
export { exclude } from './exclude/exclude';
|
|
7
|
+
export { constant } from './constant/constant';
|
|
8
|
+
export { deepConstant } from './deep-constant/deep-constant';
|
|
9
|
+
export { mapObj } from './map-obj/map-obj';
|
|
10
|
+
export { mapObjToArr } from './map-obj-to-arr/map-obj-to-arr';
|
|
11
|
+
export { diffObj, ObjDiff } from './diff-obj/diff-obj';
|
|
12
|
+
export { extend, extendAll } from './extend/extend';
|
|
13
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Obj } from '../../common';
|
|
2
|
-
/**
|
|
3
|
-
* Returns an array of the object's own enumerable property names
|
|
4
|
-
* @param obj - any object
|
|
5
|
-
*/
|
|
6
|
-
export declare function keys<T extends Obj>(obj: T): (keyof T)[];
|
|
1
|
+
import { Obj } from '../../common';
|
|
2
|
+
/**
|
|
3
|
+
* Returns an array of the object's own enumerable property names
|
|
4
|
+
* @param obj - any object
|
|
5
|
+
*/
|
|
6
|
+
export declare function keys<T extends Obj>(obj: T): (keyof T)[];
|
|
7
7
|
//# sourceMappingURL=keys.d.ts.map
|