@herowcode/utils 1.3.4 → 1.4.8
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/README.md +3 -5
- package/dist/api/index.cjs +12 -0
- package/dist/api/index.cjs.map +1 -0
- package/dist/api/{client.d.ts → index.d.mts} +19 -8
- package/dist/api/index.d.ts +36 -3
- package/dist/api/index.js +3 -0
- package/dist/api/index.js.map +1 -0
- package/dist/array/index.cjs +16 -0
- package/dist/array/index.cjs.map +1 -0
- package/dist/array/index.d.mts +5 -0
- package/dist/array/index.d.ts +5 -3
- package/dist/array/index.js +3 -0
- package/dist/array/index.js.map +1 -0
- package/dist/chunk-2MANLCNG.cjs +23 -0
- package/dist/chunk-2MANLCNG.cjs.map +1 -0
- package/dist/chunk-2RTW37WD.js +20 -0
- package/dist/chunk-2RTW37WD.js.map +1 -0
- package/dist/chunk-2Y6M7IOG.js +250 -0
- package/dist/chunk-2Y6M7IOG.js.map +1 -0
- package/dist/chunk-3JUB2OJL.js +3 -0
- package/dist/chunk-3JUB2OJL.js.map +1 -0
- package/dist/chunk-53JMVGIG.js +187 -0
- package/dist/chunk-53JMVGIG.js.map +1 -0
- package/dist/chunk-56NHIM5J.js +151 -0
- package/dist/chunk-56NHIM5J.js.map +1 -0
- package/dist/chunk-5OLQJUNS.js +66 -0
- package/dist/chunk-5OLQJUNS.js.map +1 -0
- package/dist/chunk-5YOEKMTJ.cjs +321 -0
- package/dist/chunk-5YOEKMTJ.cjs.map +1 -0
- package/dist/chunk-6TWPZ6LL.cjs +4 -0
- package/dist/chunk-6TWPZ6LL.cjs.map +1 -0
- package/dist/chunk-AQZBHMTO.js +96 -0
- package/dist/chunk-AQZBHMTO.js.map +1 -0
- package/dist/chunk-ATWN4SRX.js +29 -0
- package/dist/chunk-ATWN4SRX.js.map +1 -0
- package/dist/chunk-GRSF4RY2.cjs +20 -0
- package/dist/chunk-GRSF4RY2.cjs.map +1 -0
- package/dist/chunk-GX5E5B4L.cjs +70 -0
- package/dist/chunk-GX5E5B4L.cjs.map +1 -0
- package/dist/chunk-HK727IAV.cjs +201 -0
- package/dist/chunk-HK727IAV.cjs.map +1 -0
- package/dist/chunk-LJ6KOZD4.cjs +154 -0
- package/dist/chunk-LJ6KOZD4.cjs.map +1 -0
- package/dist/chunk-N2DRAZ3A.cjs +29 -0
- package/dist/chunk-N2DRAZ3A.cjs.map +1 -0
- package/dist/chunk-O7SH3E3T.js +18 -0
- package/dist/chunk-O7SH3E3T.js.map +1 -0
- package/dist/chunk-P5YNRND6.cjs +4 -0
- package/dist/chunk-P5YNRND6.cjs.map +1 -0
- package/dist/chunk-QAE6Q2SA.js +317 -0
- package/dist/chunk-QAE6Q2SA.js.map +1 -0
- package/dist/chunk-QRXVUXGJ.js +378 -0
- package/dist/chunk-QRXVUXGJ.js.map +1 -0
- package/dist/chunk-SLYUARZG.cjs +99 -0
- package/dist/chunk-SLYUARZG.cjs.map +1 -0
- package/dist/chunk-SWRIT7EE.js +3 -0
- package/dist/chunk-SWRIT7EE.js.map +1 -0
- package/dist/chunk-UXEUYHBD.cjs +401 -0
- package/dist/chunk-UXEUYHBD.cjs.map +1 -0
- package/dist/chunk-V6OKXUBQ.js +22 -0
- package/dist/chunk-V6OKXUBQ.js.map +1 -0
- package/dist/chunk-VAZJXZU5.cjs +31 -0
- package/dist/chunk-VAZJXZU5.cjs.map +1 -0
- package/dist/chunk-WGSFRFRO.cjs +252 -0
- package/dist/chunk-WGSFRFRO.cjs.map +1 -0
- package/dist/date/index.cjs +56 -0
- package/dist/date/index.cjs.map +1 -0
- package/dist/date/index.d.mts +63 -0
- package/dist/date/index.d.ts +63 -8
- package/dist/date/index.js +3 -0
- package/dist/date/index.js.map +1 -0
- package/dist/extract-youtube-video-id-HSYMYXIZ.js +3 -0
- package/dist/extract-youtube-video-id-HSYMYXIZ.js.map +1 -0
- package/dist/extract-youtube-video-id-XVGNPUDX.cjs +12 -0
- package/dist/extract-youtube-video-id-XVGNPUDX.cjs.map +1 -0
- package/dist/files/index.browser.cjs +21 -0
- package/dist/files/index.browser.cjs.map +1 -0
- package/dist/files/index.browser.d.mts +14 -0
- package/dist/files/index.browser.d.ts +14 -0
- package/dist/files/index.browser.js +4 -0
- package/dist/files/index.browser.js.map +1 -0
- package/dist/files/index.cjs +31 -0
- package/dist/files/index.cjs.map +1 -0
- package/dist/files/index.d.mts +3 -0
- package/dist/files/index.d.ts +3 -6
- package/dist/files/index.js +6 -0
- package/dist/files/index.js.map +1 -0
- package/dist/files/index.node.cjs +21 -0
- package/dist/files/index.node.cjs.map +1 -0
- package/dist/files/index.node.d.mts +7 -0
- package/dist/files/index.node.d.ts +7 -0
- package/dist/files/index.node.js +4 -0
- package/dist/files/index.node.js.map +1 -0
- package/dist/format-bytes-BGjeDnvM.d.mts +3 -0
- package/dist/format-bytes-BGjeDnvM.d.ts +3 -0
- package/dist/function/index.cjs +20 -0
- package/dist/function/index.cjs.map +1 -0
- package/dist/function/index.d.mts +22 -0
- package/dist/function/index.d.ts +22 -4
- package/dist/function/index.js +3 -0
- package/dist/function/index.js.map +1 -0
- package/dist/index.cjs +188 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.mts +12 -0
- package/dist/index.d.ts +12 -8
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/string/index.cjs +60 -0
- package/dist/string/index.cjs.map +1 -0
- package/dist/string/index.d.mts +28 -0
- package/dist/string/index.d.ts +28 -14
- package/dist/string/index.js +3 -0
- package/dist/string/index.js.map +1 -0
- package/dist/{cjs/function/try-catch.d.ts → try-catch-B7WzqcPU.d.mts} +4 -4
- package/dist/{function/try-catch.d.ts → try-catch-B7WzqcPU.d.ts} +4 -4
- package/dist/youtube/index.browser.cjs +35 -0
- package/dist/youtube/index.browser.cjs.map +1 -0
- package/dist/youtube/index.browser.d.mts +2 -0
- package/dist/youtube/index.browser.d.ts +2 -0
- package/dist/youtube/index.browser.js +6 -0
- package/dist/youtube/index.browser.js.map +1 -0
- package/dist/youtube/index.cjs +36 -0
- package/dist/youtube/index.cjs.map +1 -0
- package/dist/youtube/index.d.mts +12 -0
- package/dist/youtube/index.d.ts +12 -7
- package/dist/youtube/index.js +7 -0
- package/dist/youtube/index.js.map +1 -0
- package/dist/youtube/index.node.cjs +26 -0
- package/dist/youtube/index.node.cjs.map +1 -0
- package/dist/youtube/index.node.d.mts +49 -0
- package/dist/youtube/index.node.d.ts +49 -0
- package/dist/youtube/index.node.js +5 -0
- package/dist/youtube/index.node.js.map +1 -0
- package/package.json +134 -47
- package/dist/api/client.d.ts.map +0 -1
- package/dist/api/index.d.ts.map +0 -1
- package/dist/api/wrapper.d.ts +0 -27
- package/dist/api/wrapper.d.ts.map +0 -1
- package/dist/array/index.d.ts.map +0 -1
- package/dist/array/shuffle.d.ts +0 -2
- package/dist/array/shuffle.d.ts.map +0 -1
- package/dist/array/unique.d.ts +0 -2
- package/dist/array/unique.d.ts.map +0 -1
- package/dist/cjs/api/client.d.ts +0 -25
- package/dist/cjs/api/client.d.ts.map +0 -1
- package/dist/cjs/api/client.js +0 -148
- package/dist/cjs/api/client.js.map +0 -1
- package/dist/cjs/api/index.d.ts +0 -3
- package/dist/cjs/api/index.d.ts.map +0 -1
- package/dist/cjs/api/index.js +0 -6
- package/dist/cjs/api/index.js.map +0 -1
- package/dist/cjs/api/wrapper.d.ts +0 -27
- package/dist/cjs/api/wrapper.d.ts.map +0 -1
- package/dist/cjs/api/wrapper.js +0 -152
- package/dist/cjs/api/wrapper.js.map +0 -1
- package/dist/cjs/array/index.d.ts +0 -3
- package/dist/cjs/array/index.d.ts.map +0 -1
- package/dist/cjs/array/index.js +0 -19
- package/dist/cjs/array/index.js.map +0 -1
- package/dist/cjs/array/shuffle.d.ts +0 -2
- package/dist/cjs/array/shuffle.d.ts.map +0 -1
- package/dist/cjs/array/shuffle.js +0 -16
- package/dist/cjs/array/shuffle.js.map +0 -1
- package/dist/cjs/array/unique.d.ts +0 -2
- package/dist/cjs/array/unique.d.ts.map +0 -1
- package/dist/cjs/array/unique.js +0 -7
- package/dist/cjs/array/unique.js.map +0 -1
- package/dist/cjs/array.js +0 -1
- package/dist/cjs/date/dayjs.d.ts +0 -20
- package/dist/cjs/date/dayjs.d.ts.map +0 -1
- package/dist/cjs/date/dayjs.js +0 -123
- package/dist/cjs/date/dayjs.js.map +0 -1
- package/dist/cjs/date/fix-timezone-offset.d.ts +0 -3
- package/dist/cjs/date/fix-timezone-offset.d.ts.map +0 -1
- package/dist/cjs/date/fix-timezone-offset.js +0 -9
- package/dist/cjs/date/fix-timezone-offset.js.map +0 -1
- package/dist/cjs/date/format-date.d.ts +0 -23
- package/dist/cjs/date/format-date.d.ts.map +0 -1
- package/dist/cjs/date/format-date.js +0 -71
- package/dist/cjs/date/format-date.js.map +0 -1
- package/dist/cjs/date/get-current-date-in-utc.d.ts +0 -3
- package/dist/cjs/date/get-current-date-in-utc.d.ts.map +0 -1
- package/dist/cjs/date/get-current-date-in-utc.js +0 -8
- package/dist/cjs/date/get-current-date-in-utc.js.map +0 -1
- package/dist/cjs/date/get-date-in-utc.d.ts +0 -3
- package/dist/cjs/date/get-date-in-utc.d.ts.map +0 -1
- package/dist/cjs/date/get-date-in-utc.js +0 -8
- package/dist/cjs/date/get-date-in-utc.js.map +0 -1
- package/dist/cjs/date/get-relative-time.d.ts +0 -3
- package/dist/cjs/date/get-relative-time.d.ts.map +0 -1
- package/dist/cjs/date/get-relative-time.js +0 -8
- package/dist/cjs/date/get-relative-time.js.map +0 -1
- package/dist/cjs/date/index.d.ts +0 -8
- package/dist/cjs/date/index.d.ts.map +0 -1
- package/dist/cjs/date/index.js +0 -24
- package/dist/cjs/date/index.js.map +0 -1
- package/dist/cjs/date/parse-time-spent.d.ts +0 -15
- package/dist/cjs/date/parse-time-spent.d.ts.map +0 -1
- package/dist/cjs/date/parse-time-spent.js +0 -207
- package/dist/cjs/date/parse-time-spent.js.map +0 -1
- package/dist/cjs/date.js +0 -1
- package/dist/cjs/files/compress-image.d.ts +0 -10
- package/dist/cjs/files/compress-image.d.ts.map +0 -1
- package/dist/cjs/files/compress-image.js +0 -61
- package/dist/cjs/files/compress-image.js.map +0 -1
- package/dist/cjs/files/download-url.d.ts +0 -2
- package/dist/cjs/files/download-url.d.ts.map +0 -1
- package/dist/cjs/files/download-url.js +0 -29
- package/dist/cjs/files/download-url.js.map +0 -1
- package/dist/cjs/files/file-delete.d.ts +0 -2
- package/dist/cjs/files/file-delete.d.ts.map +0 -1
- package/dist/cjs/files/file-delete.js +0 -20
- package/dist/cjs/files/file-delete.js.map +0 -1
- package/dist/cjs/files/file-exists.d.ts +0 -2
- package/dist/cjs/files/file-exists.d.ts.map +0 -1
- package/dist/cjs/files/file-exists.js +0 -18
- package/dist/cjs/files/file-exists.js.map +0 -1
- package/dist/cjs/files/format-bytes.d.ts +0 -2
- package/dist/cjs/files/format-bytes.d.ts.map +0 -1
- package/dist/cjs/files/format-bytes.js +0 -17
- package/dist/cjs/files/format-bytes.js.map +0 -1
- package/dist/cjs/files/index.d.ts +0 -6
- package/dist/cjs/files/index.d.ts.map +0 -1
- package/dist/cjs/files/index.js +0 -22
- package/dist/cjs/files/index.js.map +0 -1
- package/dist/cjs/files.js +0 -1
- package/dist/cjs/function/debounce.d.ts +0 -11
- package/dist/cjs/function/debounce.d.ts.map +0 -1
- package/dist/cjs/function/debounce.js +0 -26
- package/dist/cjs/function/debounce.js.map +0 -1
- package/dist/cjs/function/index.d.ts +0 -4
- package/dist/cjs/function/index.d.ts.map +0 -1
- package/dist/cjs/function/index.js +0 -20
- package/dist/cjs/function/index.js.map +0 -1
- package/dist/cjs/function/throttle.d.ts +0 -10
- package/dist/cjs/function/throttle.d.ts.map +0 -1
- package/dist/cjs/function/throttle.js +0 -36
- package/dist/cjs/function/throttle.js.map +0 -1
- package/dist/cjs/function/try-catch.d.ts.map +0 -1
- package/dist/cjs/function/try-catch.js +0 -39
- package/dist/cjs/function/try-catch.js.map +0 -1
- package/dist/cjs/function.js +0 -1
- package/dist/cjs/index.d.ts +0 -8
- package/dist/cjs/index.d.ts.map +0 -1
- package/dist/cjs/index.js +0 -24
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/string/camel-case.d.ts +0 -2
- package/dist/cjs/string/camel-case.d.ts.map +0 -1
- package/dist/cjs/string/camel-case.js +0 -25
- package/dist/cjs/string/camel-case.js.map +0 -1
- package/dist/cjs/string/capitalize.d.ts +0 -2
- package/dist/cjs/string/capitalize.d.ts.map +0 -1
- package/dist/cjs/string/capitalize.js +0 -13
- package/dist/cjs/string/capitalize.js.map +0 -1
- package/dist/cjs/string/format-hms-to-seconds.d.ts +0 -2
- package/dist/cjs/string/format-hms-to-seconds.d.ts.map +0 -1
- package/dist/cjs/string/format-hms-to-seconds.js +0 -30
- package/dist/cjs/string/format-hms-to-seconds.js.map +0 -1
- package/dist/cjs/string/format-seconds-to-fragment.d.ts +0 -3
- package/dist/cjs/string/format-seconds-to-fragment.d.ts.map +0 -1
- package/dist/cjs/string/format-seconds-to-fragment.js +0 -20
- package/dist/cjs/string/format-seconds-to-fragment.js.map +0 -1
- package/dist/cjs/string/format-seconds-to-hms.d.ts +0 -2
- package/dist/cjs/string/format-seconds-to-hms.d.ts.map +0 -1
- package/dist/cjs/string/format-seconds-to-hms.js +0 -17
- package/dist/cjs/string/format-seconds-to-hms.js.map +0 -1
- package/dist/cjs/string/format-string-to-time.d.ts +0 -2
- package/dist/cjs/string/format-string-to-time.d.ts.map +0 -1
- package/dist/cjs/string/format-string-to-time.js +0 -15
- package/dist/cjs/string/format-string-to-time.js.map +0 -1
- package/dist/cjs/string/index.d.ts +0 -14
- package/dist/cjs/string/index.d.ts.map +0 -1
- package/dist/cjs/string/index.js +0 -30
- package/dist/cjs/string/index.js.map +0 -1
- package/dist/cjs/string/kebab-case.d.ts +0 -2
- package/dist/cjs/string/kebab-case.d.ts.map +0 -1
- package/dist/cjs/string/kebab-case.js +0 -15
- package/dist/cjs/string/kebab-case.js.map +0 -1
- package/dist/cjs/string/markdown-to-text.d.ts +0 -2
- package/dist/cjs/string/markdown-to-text.d.ts.map +0 -1
- package/dist/cjs/string/markdown-to-text.js +0 -70
- package/dist/cjs/string/markdown-to-text.js.map +0 -1
- package/dist/cjs/string/remove-html-tags.d.ts +0 -2
- package/dist/cjs/string/remove-html-tags.d.ts.map +0 -1
- package/dist/cjs/string/remove-html-tags.js +0 -18
- package/dist/cjs/string/remove-html-tags.js.map +0 -1
- package/dist/cjs/string/slugify.d.ts +0 -2
- package/dist/cjs/string/slugify.d.ts.map +0 -1
- package/dist/cjs/string/slugify.js +0 -13
- package/dist/cjs/string/slugify.js.map +0 -1
- package/dist/cjs/string/snake-case.d.ts +0 -2
- package/dist/cjs/string/snake-case.d.ts.map +0 -1
- package/dist/cjs/string/snake-case.js +0 -15
- package/dist/cjs/string/snake-case.js.map +0 -1
- package/dist/cjs/string/to-sentence-case.d.ts +0 -2
- package/dist/cjs/string/to-sentence-case.d.ts.map +0 -1
- package/dist/cjs/string/to-sentence-case.js +0 -13
- package/dist/cjs/string/to-sentence-case.js.map +0 -1
- package/dist/cjs/string/truncate.d.ts +0 -2
- package/dist/cjs/string/truncate.d.ts.map +0 -1
- package/dist/cjs/string/truncate.js +0 -19
- package/dist/cjs/string/truncate.js.map +0 -1
- package/dist/cjs/string.js +0 -1
- package/dist/cjs/youtube/extract-youtube-video-id.d.ts +0 -2
- package/dist/cjs/youtube/extract-youtube-video-id.d.ts.map +0 -1
- package/dist/cjs/youtube/extract-youtube-video-id.js +0 -30
- package/dist/cjs/youtube/extract-youtube-video-id.js.map +0 -1
- package/dist/cjs/youtube/generate-youtube-url.d.ts +0 -20
- package/dist/cjs/youtube/generate-youtube-url.d.ts.map +0 -1
- package/dist/cjs/youtube/generate-youtube-url.js +0 -86
- package/dist/cjs/youtube/generate-youtube-url.js.map +0 -1
- package/dist/cjs/youtube/get-youtube-thumbnail.d.ts +0 -2
- package/dist/cjs/youtube/get-youtube-thumbnail.d.ts.map +0 -1
- package/dist/cjs/youtube/get-youtube-thumbnail.js +0 -68
- package/dist/cjs/youtube/get-youtube-thumbnail.js.map +0 -1
- package/dist/cjs/youtube/get-youtube-video-info.d.ts +0 -26
- package/dist/cjs/youtube/get-youtube-video-info.d.ts.map +0 -1
- package/dist/cjs/youtube/get-youtube-video-info.js +0 -244
- package/dist/cjs/youtube/get-youtube-video-info.js.map +0 -1
- package/dist/cjs/youtube/index.d.ts +0 -7
- package/dist/cjs/youtube/index.d.ts.map +0 -1
- package/dist/cjs/youtube/index.js +0 -23
- package/dist/cjs/youtube/index.js.map +0 -1
- package/dist/cjs/youtube/use-get-video-duration.d.ts +0 -7
- package/dist/cjs/youtube/use-get-video-duration.d.ts.map +0 -1
- package/dist/cjs/youtube/use-get-video-duration.js +0 -153
- package/dist/cjs/youtube/use-get-video-duration.js.map +0 -1
- package/dist/cjs/youtube/validate-youtube-link.d.ts +0 -2
- package/dist/cjs/youtube/validate-youtube-link.d.ts.map +0 -1
- package/dist/cjs/youtube/validate-youtube-link.js +0 -77
- package/dist/cjs/youtube/validate-youtube-link.js.map +0 -1
- package/dist/cjs/youtube.js +0 -1
- package/dist/date/dayjs.d.ts +0 -20
- package/dist/date/dayjs.d.ts.map +0 -1
- package/dist/date/fix-timezone-offset.d.ts +0 -3
- package/dist/date/fix-timezone-offset.d.ts.map +0 -1
- package/dist/date/format-date.d.ts +0 -23
- package/dist/date/format-date.d.ts.map +0 -1
- package/dist/date/get-current-date-in-utc.d.ts +0 -3
- package/dist/date/get-current-date-in-utc.d.ts.map +0 -1
- package/dist/date/get-date-in-utc.d.ts +0 -3
- package/dist/date/get-date-in-utc.d.ts.map +0 -1
- package/dist/date/get-relative-time.d.ts +0 -3
- package/dist/date/get-relative-time.d.ts.map +0 -1
- package/dist/date/index.d.ts.map +0 -1
- package/dist/date/parse-time-spent.d.ts +0 -15
- package/dist/date/parse-time-spent.d.ts.map +0 -1
- package/dist/esm/api/client.js +0 -143
- package/dist/esm/api/index.js +0 -1
- package/dist/esm/api/wrapper.js +0 -148
- package/dist/esm/array/index.js +0 -2
- package/dist/esm/array/shuffle.js +0 -12
- package/dist/esm/array/unique.js +0 -3
- package/dist/esm/array.js +0 -1
- package/dist/esm/date/dayjs.js +0 -111
- package/dist/esm/date/fix-timezone-offset.js +0 -5
- package/dist/esm/date/format-date.js +0 -67
- package/dist/esm/date/get-current-date-in-utc.js +0 -4
- package/dist/esm/date/get-date-in-utc.js +0 -4
- package/dist/esm/date/get-relative-time.js +0 -4
- package/dist/esm/date/index.js +0 -7
- package/dist/esm/date/parse-time-spent.js +0 -203
- package/dist/esm/date.js +0 -1
- package/dist/esm/files/compress-image.js +0 -57
- package/dist/esm/files/download-url.js +0 -24
- package/dist/esm/files/file-delete.js +0 -12
- package/dist/esm/files/file-exists.js +0 -10
- package/dist/esm/files/format-bytes.js +0 -13
- package/dist/esm/files/index.js +0 -5
- package/dist/esm/files.js +0 -1
- package/dist/esm/function/debounce.js +0 -22
- package/dist/esm/function/index.js +0 -3
- package/dist/esm/function/throttle.js +0 -32
- package/dist/esm/function/try-catch.js +0 -35
- package/dist/esm/function.js +0 -1
- package/dist/esm/index.js +0 -7
- package/dist/esm/string/camel-case.js +0 -21
- package/dist/esm/string/capitalize.js +0 -9
- package/dist/esm/string/format-hms-to-seconds.js +0 -25
- package/dist/esm/string/format-seconds-to-fragment.js +0 -15
- package/dist/esm/string/format-seconds-to-hms.js +0 -13
- package/dist/esm/string/format-string-to-time.js +0 -10
- package/dist/esm/string/index.js +0 -13
- package/dist/esm/string/kebab-case.js +0 -11
- package/dist/esm/string/markdown-to-text.js +0 -66
- package/dist/esm/string/remove-html-tags.js +0 -14
- package/dist/esm/string/slugify.js +0 -9
- package/dist/esm/string/snake-case.js +0 -11
- package/dist/esm/string/to-sentence-case.js +0 -9
- package/dist/esm/string/truncate.js +0 -15
- package/dist/esm/string.js +0 -1
- package/dist/esm/youtube/extract-youtube-video-id.js +0 -26
- package/dist/esm/youtube/generate-youtube-url.js +0 -81
- package/dist/esm/youtube/get-youtube-thumbnail.js +0 -31
- package/dist/esm/youtube/get-youtube-video-info.js +0 -207
- package/dist/esm/youtube/index.js +0 -6
- package/dist/esm/youtube/use-get-video-duration.js +0 -149
- package/dist/esm/youtube/validate-youtube-link.js +0 -40
- package/dist/esm/youtube.js +0 -1
- package/dist/files/compress-image.d.ts +0 -10
- package/dist/files/compress-image.d.ts.map +0 -1
- package/dist/files/download-url.d.ts +0 -2
- package/dist/files/download-url.d.ts.map +0 -1
- package/dist/files/file-delete.d.ts +0 -2
- package/dist/files/file-delete.d.ts.map +0 -1
- package/dist/files/file-exists.d.ts +0 -2
- package/dist/files/file-exists.d.ts.map +0 -1
- package/dist/files/format-bytes.d.ts +0 -2
- package/dist/files/format-bytes.d.ts.map +0 -1
- package/dist/files/index.d.ts.map +0 -1
- package/dist/function/debounce.d.ts +0 -11
- package/dist/function/debounce.d.ts.map +0 -1
- package/dist/function/index.d.ts.map +0 -1
- package/dist/function/throttle.d.ts +0 -10
- package/dist/function/throttle.d.ts.map +0 -1
- package/dist/function/try-catch.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/string/camel-case.d.ts +0 -2
- package/dist/string/camel-case.d.ts.map +0 -1
- package/dist/string/capitalize.d.ts +0 -2
- package/dist/string/capitalize.d.ts.map +0 -1
- package/dist/string/format-hms-to-seconds.d.ts +0 -2
- package/dist/string/format-hms-to-seconds.d.ts.map +0 -1
- package/dist/string/format-seconds-to-fragment.d.ts +0 -3
- package/dist/string/format-seconds-to-fragment.d.ts.map +0 -1
- package/dist/string/format-seconds-to-hms.d.ts +0 -2
- package/dist/string/format-seconds-to-hms.d.ts.map +0 -1
- package/dist/string/format-string-to-time.d.ts +0 -2
- package/dist/string/format-string-to-time.d.ts.map +0 -1
- package/dist/string/index.d.ts.map +0 -1
- package/dist/string/kebab-case.d.ts +0 -2
- package/dist/string/kebab-case.d.ts.map +0 -1
- package/dist/string/markdown-to-text.d.ts +0 -2
- package/dist/string/markdown-to-text.d.ts.map +0 -1
- package/dist/string/remove-html-tags.d.ts +0 -2
- package/dist/string/remove-html-tags.d.ts.map +0 -1
- package/dist/string/slugify.d.ts +0 -2
- package/dist/string/slugify.d.ts.map +0 -1
- package/dist/string/snake-case.d.ts +0 -2
- package/dist/string/snake-case.d.ts.map +0 -1
- package/dist/string/to-sentence-case.d.ts +0 -2
- package/dist/string/to-sentence-case.d.ts.map +0 -1
- package/dist/string/truncate.d.ts +0 -2
- package/dist/string/truncate.d.ts.map +0 -1
- package/dist/youtube/extract-youtube-video-id.d.ts +0 -2
- package/dist/youtube/extract-youtube-video-id.d.ts.map +0 -1
- package/dist/youtube/generate-youtube-url.d.ts +0 -20
- package/dist/youtube/generate-youtube-url.d.ts.map +0 -1
- package/dist/youtube/get-youtube-thumbnail.d.ts +0 -2
- package/dist/youtube/get-youtube-thumbnail.d.ts.map +0 -1
- package/dist/youtube/get-youtube-video-info.d.ts +0 -26
- package/dist/youtube/get-youtube-video-info.d.ts.map +0 -1
- package/dist/youtube/index.d.ts.map +0 -1
- package/dist/youtube/use-get-video-duration.d.ts +0 -7
- package/dist/youtube/use-get-video-duration.d.ts.map +0 -1
- package/dist/youtube/validate-youtube-link.d.ts +0 -2
- package/dist/youtube/validate-youtube-link.d.ts.map +0 -1
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { IDayjsIntlConfig } from "./dayjs";
|
|
2
|
-
export interface IFormatDateConfig {
|
|
3
|
-
/** Optional locale override applied to the underlying dayjs instance */
|
|
4
|
-
locale?: string;
|
|
5
|
-
/**
|
|
6
|
-
* When provided, format using dayjs tokens (e.g. "DD/MM/YYYY").
|
|
7
|
-
* Unless `useIntl` is true, this takes precedence over Intl formatting.
|
|
8
|
-
*/
|
|
9
|
-
format?: string;
|
|
10
|
-
/**
|
|
11
|
-
* Intl configuration used when formatting through `Intl.DateTimeFormat`.
|
|
12
|
-
* Values are merged on top of the global Intl configuration.
|
|
13
|
-
*/
|
|
14
|
-
intl?: IDayjsIntlConfig;
|
|
15
|
-
/**
|
|
16
|
-
* Forces the use of Intl formatting even if a format string is supplied.
|
|
17
|
-
*/
|
|
18
|
-
useIntl?: boolean;
|
|
19
|
-
}
|
|
20
|
-
type TLocaleOrConfig = Intl.LocalesArgument | IFormatDateConfig;
|
|
21
|
-
export declare function formatDate(date: Date | string | number, localeOrConfig?: TLocaleOrConfig, opts?: Intl.DateTimeFormatOptions): string;
|
|
22
|
-
export {};
|
|
23
|
-
//# sourceMappingURL=format-date.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"format-date.d.ts","sourceRoot":"","sources":["../../../src/date/format-date.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAG/C,MAAM,WAAW,iBAAiB;IAChC,wEAAwE;IACxE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;OAGG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAA;IACvB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,KAAK,eAAe,GAAG,IAAI,CAAC,eAAe,GAAG,iBAAiB,CAAA;AAqC/D,wBAAgB,UAAU,CACxB,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,EAC5B,cAAc,GAAE,eAA6C,EAC7D,IAAI,CAAC,EAAE,IAAI,CAAC,qBAAqB,GAChC,MAAM,CAkDR"}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.formatDate = formatDate;
|
|
4
|
-
const dayjs_1 = require("./dayjs");
|
|
5
|
-
function isFormatDateConfig(value) {
|
|
6
|
-
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
7
|
-
}
|
|
8
|
-
function isValidLocaleTag(value) {
|
|
9
|
-
if (typeof Intl !== "undefined" &&
|
|
10
|
-
typeof Intl.getCanonicalLocales === "function") {
|
|
11
|
-
try {
|
|
12
|
-
Intl.getCanonicalLocales(value);
|
|
13
|
-
return true;
|
|
14
|
-
}
|
|
15
|
-
catch (_a) {
|
|
16
|
-
return false;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
return /^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/.test(value);
|
|
20
|
-
}
|
|
21
|
-
function toDayjsLocale(locale) {
|
|
22
|
-
if (!locale)
|
|
23
|
-
return undefined;
|
|
24
|
-
const first = Array.isArray(locale)
|
|
25
|
-
? locale[0]
|
|
26
|
-
: locale;
|
|
27
|
-
return typeof first === "string" ? first : String(first);
|
|
28
|
-
}
|
|
29
|
-
function formatDate(date, localeOrConfig = (0, dayjs_1.getDayjsGlobalIntl)().locale, opts) {
|
|
30
|
-
var _a;
|
|
31
|
-
const instance = (0, dayjs_1.dayjs)(date);
|
|
32
|
-
if (!instance.isValid()) {
|
|
33
|
-
throw new RangeError("Invalid time value");
|
|
34
|
-
}
|
|
35
|
-
if (isFormatDateConfig(localeOrConfig)) {
|
|
36
|
-
const { format, locale, intl, useIntl } = localeOrConfig;
|
|
37
|
-
const baseLocale = locale !== null && locale !== void 0 ? locale : toDayjsLocale(intl === null || intl === void 0 ? void 0 : intl.locale);
|
|
38
|
-
const workingInstance = baseLocale ? instance.locale(baseLocale) : instance;
|
|
39
|
-
if (format && !useIntl) {
|
|
40
|
-
return workingInstance.format(format);
|
|
41
|
-
}
|
|
42
|
-
const intlConfig = intl
|
|
43
|
-
? {
|
|
44
|
-
locale: (_a = intl.locale) !== null && _a !== void 0 ? _a : baseLocale,
|
|
45
|
-
options: intl.options,
|
|
46
|
-
}
|
|
47
|
-
: baseLocale
|
|
48
|
-
? {
|
|
49
|
-
locale: baseLocale,
|
|
50
|
-
}
|
|
51
|
-
: undefined;
|
|
52
|
-
return workingInstance.formatIntl(intlConfig);
|
|
53
|
-
}
|
|
54
|
-
if (typeof localeOrConfig === "string" && opts === undefined) {
|
|
55
|
-
if (!isValidLocaleTag(localeOrConfig)) {
|
|
56
|
-
return instance.format(localeOrConfig);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
const localeForDayjs = toDayjsLocale(localeOrConfig);
|
|
60
|
-
const workingInstance = localeForDayjs
|
|
61
|
-
? instance.locale(localeForDayjs)
|
|
62
|
-
: instance;
|
|
63
|
-
const intlConfig = localeOrConfig !== undefined || opts !== undefined
|
|
64
|
-
? {
|
|
65
|
-
locale: localeOrConfig,
|
|
66
|
-
options: opts,
|
|
67
|
-
}
|
|
68
|
-
: undefined;
|
|
69
|
-
return workingInstance.formatIntl(intlConfig);
|
|
70
|
-
}
|
|
71
|
-
//# sourceMappingURL=format-date.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"format-date.js","sourceRoot":"","sources":["../../../src/date/format-date.ts"],"names":[],"mappings":";;AA2DA,gCAsDC;AAhHD,mCAAmD;AAuBnD,SAAS,kBAAkB,CACzB,KAAsB;IAEtB,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AAC7E,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAa;IACrC,IACE,OAAO,IAAI,KAAK,WAAW;QAC3B,OAAO,IAAI,CAAC,mBAAmB,KAAK,UAAU,EAC9C,CAAC;QACD,IAAI,CAAC;YACH,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAA;YAC/B,OAAO,IAAI,CAAA;QACb,CAAC;QAAC,WAAM,CAAC;YACP,OAAO,KAAK,CAAA;QACd,CAAC;IACH,CAAC;IAED,OAAO,oCAAoC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AACzD,CAAC;AAED,SAAS,aAAa,CACpB,MAGqC;IAErC,IAAI,CAAC,MAAM;QAAE,OAAO,SAAS,CAAA;IAC7B,MAAM,KAAK,GAAG,KA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AC,CAAC,SAAS,CAAA;QAEf,OAAO,eAAe,CAAC,UAAU,CAAC,UAAU,CAAC,CAAA;IAC/C,CAAC;IAED,IAAI,OAAO,cAAc,KAAK,QAAQ,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QAC7D,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,EAAE,CAAC;YACtC,OAAO,QAAQ,CAAC,MAAM,CAAC,cAAc,CAAC,CAAA;QACxC,CAAC;IACH,CAAC;IAED,MAAM,cAAc,GAAG,aAAa,CAAC,cAAc,CAAC,CAAA;IACpD,MAAM,eAAe,GAAG,cAAc;QACpC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,cAAc,CAAC;QACjC,CAAC,CAAC,QAAQ,CAAA;IAEZ,MAAM,UAAU,GACd,cAAc,KAAK,SAAS,IAAI,IAAI,KAAK,SAAS;QAChD,CAAC,CAAC;YACE,MAAM,EAAE,cAAc;YACtB,OAAO,EAAE,IAAI;SACd;QACH,CAAC,CAAC,SAAS,CAAA;IAEf,OAAO,eAAe,CAAC,UAAU,CAAC,UAAU,CAAC,CAAA;AAC/C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-current-date-in-utc.d.ts","sourceRoot":"","sources":["../../../src/date/get-current-date-in-utc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAIlC,wBAAgB,mBAAmB,IAAI,KAAK,CAE3C"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getCurrentDateInUTC = getCurrentDateInUTC;
|
|
4
|
-
const dayjs_1 = require("./dayjs");
|
|
5
|
-
function getCurrentDateInUTC() {
|
|
6
|
-
return (0, dayjs_1.dayjs)().utc();
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=get-current-date-in-utc.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-current-date-in-utc.js","sourceRoot":"","sources":["../../../src/date/get-current-date-in-utc.ts"],"names":[],"mappings":";;AAIA,kDAEC;AAJD,mCAA+B;AAE/B,SAAgB,mBAAmB;IACjC,OAAO,IAAA,aAAK,GAAE,CAAC,GAAG,EAAE,CAAA;AACtB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-date-in-utc.d.ts","sourceRoot":"","sources":["../../../src/date/get-date-in-utc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAIlC,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,KAAK,CAE9C"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDateInUTC = getDateInUTC;
|
|
4
|
-
const dayjs_1 = require("./dayjs");
|
|
5
|
-
function getDateInUTC(date) {
|
|
6
|
-
return (0, dayjs_1.dayjs)(date).utc();
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=get-date-in-utc.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-date-in-utc.js","sourceRoot":"","sources":["../../../src/date/get-date-in-utc.ts"],"names":[],"mappings":";;AAIA,oCAEC;AAJD,mCAA+B;AAE/B,SAAgB,YAAY,CAAC,IAAU;IACrC,OAAO,IAAA,aAAK,EAAC,IAAI,CAAC,CAAC,GAAG,EAAE,CAAA;AAC1B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-relative-time.d.ts","sourceRoot":"","sources":["../../../src/date/get-relative-time.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAGvC,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,wBAAU,GAAG,MAAM,CAE3E"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getRelativeTime = getRelativeTime;
|
|
4
|
-
const dayjs_1 = require("./dayjs");
|
|
5
|
-
function getRelativeTime(date, dateNow = (0, dayjs_1.dayjs)()) {
|
|
6
|
-
return (0, dayjs_1.dayjs)(date).from(dateNow);
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=get-relative-time.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-relative-time.js","sourceRoot":"","sources":["../../../src/date/get-relative-time.ts"],"names":[],"mappings":";;AAGA,0CAEC;AAJD,mCAA+B;AAE/B,SAAgB,eAAe,CAAC,IAAgB,EAAE,OAAO,GAAG,IAAA,aAAK,GAAE;IACjE,OAAO,IAAA,aAAK,EAAC,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;AAClC,CAAC"}
|
package/dist/cjs/date/index.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from "./dayjs";
|
|
2
|
-
export * from "./fix-timezone-offset";
|
|
3
|
-
export * from "./format-date";
|
|
4
|
-
export * from "./get-current-date-in-utc";
|
|
5
|
-
export * from "./get-date-in-utc";
|
|
6
|
-
export * from "./get-relative-time";
|
|
7
|
-
export * from "./parse-time-spent";
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/date/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,uBAAuB,CAAA;AACrC,cAAc,eAAe,CAAA;AAC7B,cAAc,2BAA2B,CAAA;AACzC,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA"}
|
package/dist/cjs/date/index.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./dayjs"), exports);
|
|
18
|
-
__exportStar(require("./fix-timezone-offset"), exports);
|
|
19
|
-
__exportStar(require("./format-date"), exports);
|
|
20
|
-
__exportStar(require("./get-current-date-in-utc"), exports);
|
|
21
|
-
__exportStar(require("./get-date-in-utc"), exports);
|
|
22
|
-
__exportStar(require("./get-relative-time"), exports);
|
|
23
|
-
__exportStar(require("./parse-time-spent"), exports);
|
|
24
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/date/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB;AACvB,wDAAqC;AACrC,gDAA6B;AAC7B,4DAAyC;AACzC,oDAAiC;AACjC,sDAAmC;AACnC,qDAAkC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export interface ITimeSpent {
|
|
2
|
-
years: number;
|
|
3
|
-
months: number;
|
|
4
|
-
days: number;
|
|
5
|
-
hours: number;
|
|
6
|
-
minutes: number;
|
|
7
|
-
seconds: number;
|
|
8
|
-
formatted: string;
|
|
9
|
-
}
|
|
10
|
-
export declare function parseTimeSpent(initialDate: string | Date, finalDate: string | Date, locale?: string, // Default to Portuguese for backward compatibility
|
|
11
|
-
options?: {
|
|
12
|
-
format?: "verbose" | "compact";
|
|
13
|
-
minimal?: boolean;
|
|
14
|
-
}): ITimeSpent;
|
|
15
|
-
//# sourceMappingURL=parse-time-spent.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parse-time-spent.d.ts","sourceRoot":"","sources":["../../../src/date/parse-time-spent.ts"],"names":[],"mappings":"AA2HA,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;CAClB;AAGD,wBAAgB,cAAc,CAC5B,WAAW,EAAE,MAAM,GAAG,IAAI,EAC1B,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,MAAM,SAAU,EAAE,mDAAmD;AACrE,OAAO,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAC9D,UAAU,CAkHZ"}
|
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parseTimeSpent = parseTimeSpent;
|
|
4
|
-
const fix_timezone_offset_1 = require("./fix-timezone-offset");
|
|
5
|
-
// Supported locales and their translations
|
|
6
|
-
const locales = {
|
|
7
|
-
"pt-BR": {
|
|
8
|
-
year: { singular: "ano", plural: "anos" },
|
|
9
|
-
month: { singular: "mês", plural: "meses" },
|
|
10
|
-
day: { singular: "dia", plural: "dias" },
|
|
11
|
-
hour: { singular: "hora", plural: "horas" },
|
|
12
|
-
minute: { singular: "minuto", plural: "minutos" },
|
|
13
|
-
second: { singular: "segundo", plural: "segundos" },
|
|
14
|
-
formatList: (parts) => {
|
|
15
|
-
if (parts.length === 0)
|
|
16
|
-
return "";
|
|
17
|
-
if (parts.length === 1)
|
|
18
|
-
return parts[0];
|
|
19
|
-
const lastPart = parts[parts.length - 1];
|
|
20
|
-
const otherParts = parts.slice(0, -1);
|
|
21
|
-
return `${otherParts.join(", ")} e ${lastPart}`;
|
|
22
|
-
},
|
|
23
|
-
compactTokens: {
|
|
24
|
-
year: "a",
|
|
25
|
-
month: "m",
|
|
26
|
-
day: "d",
|
|
27
|
-
hour: "h",
|
|
28
|
-
minute: "min",
|
|
29
|
-
second: "s",
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
"en-US": {
|
|
33
|
-
year: { singular: "year", plural: "years" },
|
|
34
|
-
month: { singular: "month", plural: "months" },
|
|
35
|
-
day: { singular: "day", plural: "days" },
|
|
36
|
-
hour: { singular: "hour", plural: "hours" },
|
|
37
|
-
minute: { singular: "minute", plural: "minutes" },
|
|
38
|
-
second: { singular: "second", plural: "seconds" },
|
|
39
|
-
formatList: (parts) => {
|
|
40
|
-
if (parts.length === 0)
|
|
41
|
-
return "";
|
|
42
|
-
if (parts.length === 1)
|
|
43
|
-
return parts[0];
|
|
44
|
-
if (parts.length === 2)
|
|
45
|
-
return `${parts[0]} and ${parts[1]}`;
|
|
46
|
-
return `${parts.slice(0, -1).join(", ")}, and ${parts[parts.length - 1]}`;
|
|
47
|
-
},
|
|
48
|
-
compactTokens: {
|
|
49
|
-
year: "y",
|
|
50
|
-
month: "mo",
|
|
51
|
-
day: "d",
|
|
52
|
-
hour: "h",
|
|
53
|
-
minute: "m",
|
|
54
|
-
second: "s",
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
"es-ES": {
|
|
58
|
-
year: { singular: "año", plural: "años" },
|
|
59
|
-
month: { singular: "mes", plural: "meses" },
|
|
60
|
-
day: { singular: "día", plural: "días" },
|
|
61
|
-
hour: { singular: "hora", plural: "horas" },
|
|
62
|
-
minute: { singular: "minuto", plural: "minutos" },
|
|
63
|
-
second: { singular: "segundo", plural: "segundos" },
|
|
64
|
-
formatList: (parts) => {
|
|
65
|
-
if (parts.length === 0)
|
|
66
|
-
return "";
|
|
67
|
-
if (parts.length === 1)
|
|
68
|
-
return parts[0];
|
|
69
|
-
const lastPart = parts[parts.length - 1];
|
|
70
|
-
const otherParts = parts.slice(0, -1);
|
|
71
|
-
return `${otherParts.join(", ")} y ${lastPart}`;
|
|
72
|
-
},
|
|
73
|
-
compactTokens: {
|
|
74
|
-
year: "a",
|
|
75
|
-
month: "mes",
|
|
76
|
-
day: "d",
|
|
77
|
-
hour: "h",
|
|
78
|
-
minute: "min",
|
|
79
|
-
second: "s",
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
"fr-FR": {
|
|
83
|
-
year: { singular: "an", plural: "ans" },
|
|
84
|
-
month: { singular: "mois", plural: "mois" },
|
|
85
|
-
day: { singular: "jour", plural: "jours" },
|
|
86
|
-
hour: { singular: "heure", plural: "heures" },
|
|
87
|
-
minute: { singular: "minute", plural: "minutes" },
|
|
88
|
-
second: { singular: "seconde", plural: "secondes" },
|
|
89
|
-
formatList: (parts) => {
|
|
90
|
-
if (parts.length === 0)
|
|
91
|
-
return "";
|
|
92
|
-
if (parts.length === 1)
|
|
93
|
-
return parts[0];
|
|
94
|
-
const lastPart = parts[parts.length - 1];
|
|
95
|
-
const otherParts = parts.slice(0, -1);
|
|
96
|
-
return `${otherParts.join(", ")} et ${lastPart}`;
|
|
97
|
-
},
|
|
98
|
-
compactTokens: {
|
|
99
|
-
year: "a",
|
|
100
|
-
month: "m",
|
|
101
|
-
day: "j",
|
|
102
|
-
hour: "h",
|
|
103
|
-
minute: "min",
|
|
104
|
-
second: "s",
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
};
|
|
108
|
-
// options: format -> 'verbose' | 'compact', minimal -> show only largest non-zero unit
|
|
109
|
-
function parseTimeSpent(initialDate, finalDate, locale = "pt-BR", // Default to Portuguese for backward compatibility
|
|
110
|
-
options) {
|
|
111
|
-
var _a, _b;
|
|
112
|
-
const final = (0, fix_timezone_offset_1.fixTimezoneOffset)(finalDate);
|
|
113
|
-
const initial = (0, fix_timezone_offset_1.fixTimezoneOffset)(initialDate);
|
|
114
|
-
const years = final.diff(initial, "year");
|
|
115
|
-
const months = final.diff(initial.add(years, "year"), "month");
|
|
116
|
-
const days = final.diff(initial.add(years, "year").add(months, "month"), "day");
|
|
117
|
-
const hours = final.diff(initial.add(years, "year").add(months, "month").add(days, "day"), "hour");
|
|
118
|
-
const minutes = final.diff(initial
|
|
119
|
-
.add(years, "year")
|
|
120
|
-
.add(months, "month")
|
|
121
|
-
.add(days, "day")
|
|
122
|
-
.add(hours, "hour"), "minute");
|
|
123
|
-
const seconds = final.diff(initial
|
|
124
|
-
.add(years, "year")
|
|
125
|
-
.add(months, "month")
|
|
126
|
-
.add(days, "day")
|
|
127
|
-
.add(hours, "hour")
|
|
128
|
-
.add(minutes, "minute"), "second");
|
|
129
|
-
// Use default locale if the requested one isn't supported
|
|
130
|
-
const translations = locales[locale] || locales["pt-BR"];
|
|
131
|
-
// Build verbose parts (localized words)
|
|
132
|
-
const verboseParts = [];
|
|
133
|
-
if (years > 0) {
|
|
134
|
-
const unit = years === 1 ? translations.year.singular : translations.year.plural;
|
|
135
|
-
verboseParts.push(`${years} ${unit}`);
|
|
136
|
-
}
|
|
137
|
-
if (months > 0) {
|
|
138
|
-
const unit = months === 1 ? translations.month.singular : translations.month.plural;
|
|
139
|
-
verboseParts.push(`${months} ${unit}`);
|
|
140
|
-
}
|
|
141
|
-
if (days > 0) {
|
|
142
|
-
const unit = days === 1 ? translations.day.singular : translations.day.plural;
|
|
143
|
-
verboseParts.push(`${days} ${unit}`);
|
|
144
|
-
}
|
|
145
|
-
if (hours > 0) {
|
|
146
|
-
const unit = hours === 1 ? translations.hour.singular : translations.hour.plural;
|
|
147
|
-
verboseParts.push(`${hours} ${unit}`);
|
|
148
|
-
}
|
|
149
|
-
if (minutes > 0) {
|
|
150
|
-
const unit = minutes === 1 ? translations.minute.singular : translations.minute.plural;
|
|
151
|
-
verboseParts.push(`${minutes} ${unit}`);
|
|
152
|
-
}
|
|
153
|
-
if (seconds > 0) {
|
|
154
|
-
const unit = seconds === 1 ? translations.second.singular : translations.second.plural;
|
|
155
|
-
verboseParts.push(`${seconds} ${unit}`);
|
|
156
|
-
}
|
|
157
|
-
// Build compact parts (e.g. "1a2m3d")
|
|
158
|
-
const compactPieces = [];
|
|
159
|
-
if (years > 0)
|
|
160
|
-
compactPieces.push(`${years}${translations.compactTokens.year}`);
|
|
161
|
-
if (months > 0)
|
|
162
|
-
compactPieces.push(`${months}${translations.compactTokens.month}`);
|
|
163
|
-
if (days > 0)
|
|
164
|
-
compactPieces.push(`${days}${translations.compactTokens.day}`);
|
|
165
|
-
if (hours > 0)
|
|
166
|
-
compactPieces.push(`${hours}${translations.compactTokens.hour}`);
|
|
167
|
-
if (minutes > 0)
|
|
168
|
-
compactPieces.push(`${minutes}${translations.compactTokens.minute}`);
|
|
169
|
-
if (seconds > 0)
|
|
170
|
-
compactPieces.push(`${seconds}${translations.compactTokens.second}`);
|
|
171
|
-
const format = (_a = options === null || options === void 0 ? void 0 : options.format) !== null && _a !== void 0 ? _a : "verbose";
|
|
172
|
-
const minimal = (_b = options === null || options === void 0 ? void 0 : options.minimal) !== null && _b !== void 0 ? _b : false;
|
|
173
|
-
let formatted = "";
|
|
174
|
-
if (format === "compact") {
|
|
175
|
-
if (compactPieces.length === 0) {
|
|
176
|
-
formatted = "";
|
|
177
|
-
}
|
|
178
|
-
else if (minimal) {
|
|
179
|
-
formatted = compactPieces[0];
|
|
180
|
-
}
|
|
181
|
-
else {
|
|
182
|
-
formatted = compactPieces.join("");
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
else {
|
|
186
|
-
// verbose
|
|
187
|
-
if (verboseParts.length === 0) {
|
|
188
|
-
formatted = "";
|
|
189
|
-
}
|
|
190
|
-
else if (minimal) {
|
|
191
|
-
formatted = verboseParts[0];
|
|
192
|
-
}
|
|
193
|
-
else {
|
|
194
|
-
formatted = translations.formatList(verboseParts);
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
return {
|
|
198
|
-
years,
|
|
199
|
-
months,
|
|
200
|
-
days,
|
|
201
|
-
hours,
|
|
202
|
-
minutes,
|
|
203
|
-
seconds,
|
|
204
|
-
formatted,
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
//# sourceMappingURL=parse-time-spent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parse-time-spent.js","sourceRoot":"","sources":["../../../src/date/parse-time-spent.ts"],"names":[],"mappings":";;AAsIA,wCAuHC;AA7PD,+DAAyD;AA2BzD,2CAA2C;AAC3C,MAAM,OAAO,GAAwC;IACnD,OAAO,EAAE;QACP,IAAI,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE;QACzC,KAAK,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE;QAC3C,GAAG,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE;QACxC,IAAI,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE;QAC3C,MAAM,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE;QACjD,MAAM,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE;QACnD,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE;YACpB,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;gBAAE,OAAO,E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ACJ,KAAK;QACL,OAAO;QACP,OAAO;QACP,SAAS;KACV,CAAA;AACH,CAAC"}
|
package/dist/cjs/date.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('./date/index.js')
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
interface ICompressImageParams {
|
|
2
|
-
file: File;
|
|
3
|
-
maxWidth?: number;
|
|
4
|
-
maxHeight?: number;
|
|
5
|
-
quality?: number;
|
|
6
|
-
allowedFileTypes?: string[];
|
|
7
|
-
}
|
|
8
|
-
export declare function compressImage({ file, maxWidth, maxHeight, quality, allowedFileTypes, }: ICompressImageParams): Promise<File>;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=compress-image.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compress-image.d.ts","sourceRoot":"","sources":["../../../src/files/compress-image.ts"],"names":[],"mappings":"AAAA,UAAU,oBAAoB;IAC5B,IAAI,EAAE,IAAI,CAAA;IACV,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;CAC5B;AAYD,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,QAAmC,EACnC,SAAoC,EACpC,OAAW,EACX,gBAAyE,GAC1E,EAAE,oBAAoB,iBAiEtB"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.compressImage = compressImage;
|
|
4
|
-
function convertToWebp(filename) {
|
|
5
|
-
const lastDotIndex = filename.lastIndexOf(".");
|
|
6
|
-
if (lastDotIndex === -1) {
|
|
7
|
-
return `${filename}.webp`;
|
|
8
|
-
}
|
|
9
|
-
return `${filename.substring(0, lastDotIndex)}.webp`;
|
|
10
|
-
}
|
|
11
|
-
function compressImage({ file, maxWidth = Number.POSITIVE_INFINITY, maxHeight = Number.POSITIVE_INFINITY, quality = 1, allowedFileTypes = ["image/jpg", "image/jpeg", "image/png", "image/webp"], }) {
|
|
12
|
-
if (!allowedFileTypes.includes(file.type)) {
|
|
13
|
-
throw new Error("Image format not supported");
|
|
14
|
-
}
|
|
15
|
-
return new Promise((resolve, reject) => {
|
|
16
|
-
const reader = new FileReader();
|
|
17
|
-
reader.onload = (event) => {
|
|
18
|
-
var _a;
|
|
19
|
-
const compressed = new Image();
|
|
20
|
-
compressed.onload = () => {
|
|
21
|
-
const canvas = document.createElement("canvas");
|
|
22
|
-
let width = compressed.width;
|
|
23
|
-
let height = compressed.height;
|
|
24
|
-
if (width > height) {
|
|
25
|
-
if (width > maxWidth) {
|
|
26
|
-
height *= maxWidth / width;
|
|
27
|
-
width = maxWidth;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
if (height > maxHeight) {
|
|
32
|
-
width *= maxHeight / height;
|
|
33
|
-
height = maxHeight;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
canvas.width = width;
|
|
37
|
-
canvas.height = height;
|
|
38
|
-
const context = canvas.getContext("2d");
|
|
39
|
-
if (!context) {
|
|
40
|
-
reject(new Error("Failed to get canvas context"));
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
context.drawImage(compressed, 0, 0, width, height);
|
|
44
|
-
canvas.toBlob((blob) => {
|
|
45
|
-
if (!blob) {
|
|
46
|
-
reject(new Error("Failed to compress image."));
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
const compressedFile = new File([blob], convertToWebp(file.name), {
|
|
50
|
-
type: "image/webp",
|
|
51
|
-
lastModified: Date.now(),
|
|
52
|
-
});
|
|
53
|
-
resolve(compressedFile);
|
|
54
|
-
}, "image/webp", quality);
|
|
55
|
-
};
|
|
56
|
-
compressed.src = (_a = event.target) === null || _a === void 0 ? void 0 : _a.result;
|
|
57
|
-
};
|
|
58
|
-
reader.readAsDataURL(file);
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
//# sourceMappingURL=compress-image.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compress-image.js","sourceRoot":"","sources":["../../../src/files/compress-image.ts"],"names":[],"mappings":";;AAkBA,sCAuEC;AAjFD,SAAS,aAAa,CAAC,QAAgB;IACrC,MAAM,YAAY,GAAG,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA;IAE9C,IAAI,YAAY,KAAK,CAAC,CAAC,EAAE,CAAC;QACxB,OAAO,GAAG,QAAQ,OAAO,CAAA;IAC3B,CAAC;IAED,OAAO,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC,EAAE,YAAY,CAAC,OAAO,CAAA;AACtD,CAAC;AAED,SAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,QAAQ,GAAG,MAAM,CAAC,iBAAiB,EACnC,SAAS,GAAG,MAAM,CAAC,iBAAiB,EACpC,OAAO,GAAG,CAAC,EACX,gBAAgB,GAAG,CAAC,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,CAAC,GACpD;IACrB,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAC1C,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAA;IAC/C,CAAC;IAED,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC3C,MAAM,MAAM,GAAG,IAAI,UAAU,EAAE,CAAA;QAE/B,MAAM,CAAC,MAAM,GAAG,CAAC,KAAK,EAAE,EAAE;;YACxB,MAAM,UAAU,GAAG,IAAI,KAAK,EAAE,CAAA;YAE9B,UAAU,CAAC,MAAM,GAAG,GAAG,EAAE;gBACvB,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAA;gBAE/C,IAAI,KAAK,GAAG,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AAY,EACZ,OAAO,CACR,CAAA;YACH,CAAC,CAAA;YAED,UAAU,CAAC,GAAG,GAAG,MAAA,KAAK,CAAC,MAAM,0CAAE,MAAgB,CAAA;QACjD,CAAC,CAAA;QAED,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;IAC5B,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"download-url.d.ts","sourceRoot":"","sources":["../../../src/files/download-url.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,GAAU,KAAK,MAAM,KAAG,OAAO,CAAC,OAAO,CAyB9D,CAAA"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.downloadUrl = void 0;
|
|
4
|
-
const downloadUrl = async (url) => {
|
|
5
|
-
try {
|
|
6
|
-
const urlObj = new URL(url);
|
|
7
|
-
const pathname = urlObj.pathname;
|
|
8
|
-
const segments = pathname.split("/").filter((segment) => segment.length > 0);
|
|
9
|
-
const filename = segments.length > 0 ? segments[segments.length - 1] : null;
|
|
10
|
-
if (!filename || !filename.includes(".")) {
|
|
11
|
-
throw new Error("URL does not contain a valid filename");
|
|
12
|
-
}
|
|
13
|
-
const response = await fetch(url, { mode: "cors" });
|
|
14
|
-
const blob = await response.blob();
|
|
15
|
-
const link = document.createElement("a");
|
|
16
|
-
link.href = window.URL.createObjectURL(blob);
|
|
17
|
-
link.download = filename;
|
|
18
|
-
document.body.appendChild(link);
|
|
19
|
-
link.click();
|
|
20
|
-
document.body.removeChild(link);
|
|
21
|
-
return true;
|
|
22
|
-
}
|
|
23
|
-
catch (error) {
|
|
24
|
-
console.error("Error downloading the file", error);
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
exports.downloadUrl = downloadUrl;
|
|
29
|
-
//# sourceMappingURL=download-url.js.map
|
|
@@ -1 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AC,IAAI,CAAC,CAAA;QAC/B,OAAO,IAAI,CAAA;IACb,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAA;QAClD,OAAO,KAAK,CAAA;IACd,CAAC;AACH,CAAC,CAAA;AAzBY,QAAA,WAAW,eAyBvB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-delete.d.ts","sourceRoot":"","sources":["../../../src/files/file-delete.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU,GAAU,UAAU,MAAM,kBAOhD,CAAA"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.fileDelete = void 0;
|
|
7
|
-
const promises_1 = __importDefault(require("node:fs/promises"));
|
|
8
|
-
const file_exists_1 = require("./file-exists");
|
|
9
|
-
const fileDelete = async (filePath) => {
|
|
10
|
-
try {
|
|
11
|
-
if (await (0, file_exists_1.fileExists)(filePath))
|
|
12
|
-
await promises_1.default.rm(filePath);
|
|
13
|
-
}
|
|
14
|
-
catch (err) {
|
|
15
|
-
// Log but don't throw during cleanup
|
|
16
|
-
console.error(`Error deleting file at ${filePath}:`, err);
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
exports.fileDelete = fileDelete;
|
|
20
|
-
//# sourceMappingURL=file-delete.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-delete.js","sourceRoot":"","sources":["../../../src/files/file-delete.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAiC;AACjC,+CAA0C;AAEnC,MAAM,UAAU,GAAG,KAAK,EAAE,QAAgB,EAAE,EAAE;IACnD,IAAI,CAAC;QACH,IAAI,MAAM,IAAA,wBAAU,EAAC,QAAQ,CAAC;YAAE,MAAM,kBAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAA;IACvD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,qCAAqC;QACrC,OAAO,CAAC,KAAK,CAAC,0BAA0B,QAAQ,GAAG,EAAE,GAAG,CAAC,CAAA;IAC3D,CAAC;AACH,CAAC,CAAA;AAPY,QAAA,UAAU,cAOtB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-exists.d.ts","sourceRoot":"","sources":["../../../src/files/file-exists.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,GAAU,UAAU,MAAM,qBAOhD,CAAA"}
|