@react-pakistan/util-functions 1.25.90 โ 2.0.0
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 +74 -315
- package/constants/api-methods.d.ts +3 -1
- package/constants/api-methods.js +1 -15
- package/constants/cache-time.d.ts +7 -5
- package/constants/cache-time.js +1 -8
- package/constants/countries-timezones.d.ts +4 -2
- package/constants/countries-timezones.js +1 -1411
- package/constants/currencies.d.ts +4 -2
- package/constants/currencies.js +1 -1076
- package/constants/dial-codes.d.ts +5 -3
- package/constants/dial-codes.js +1 -1216
- package/constants/layout-direction.d.ts +3 -1
- package/constants/layout-direction.js +1 -8
- package/constants/react-pakistan-meta.d.ts +4 -2
- package/constants/react-pakistan-meta.js +1 -35
- package/constants/react-pakistan.d.ts +5 -3
- package/constants/react-pakistan.js +12 -104
- package/constants/select-value-delimiter.d.ts +3 -1
- package/constants/select-value-delimiter.js +1 -13
- package/constants/social-media-colors.d.ts +3 -1
- package/constants/social-media-colors.js +1 -42
- package/constants/social-media-sizes.d.ts +6 -4
- package/constants/social-media-sizes.js +1 -327
- package/constants/user-roles.d.ts +3 -1
- package/constants/user-roles.js +1 -9
- package/edu-pilot-pro/types/academics.d.ts +2 -266
- package/edu-pilot-pro/types/academics.js +1 -9
- package/edu-pilot-pro/types/admission.d.ts +803 -10
- package/edu-pilot-pro/types/admission.js +1 -7
- package/edu-pilot-pro/types/communication.d.ts +2 -165
- package/edu-pilot-pro/types/communication.js +1 -8
- package/edu-pilot-pro/types/enums.d.ts +30 -28
- package/edu-pilot-pro/types/enums.js +1 -445
- package/edu-pilot-pro/types/finance.d.ts +2 -128
- package/edu-pilot-pro/types/finance.js +1 -8
- package/edu-pilot-pro/types/index.d.ts +2 -12
- package/edu-pilot-pro/types/index.js +1 -28
- package/edu-pilot-pro/types/user-management.d.ts +2 -236
- package/edu-pilot-pro/types/user-management.js +1 -8
- package/factory/generic-component-factory.d.ts +12 -9
- package/factory/generic-component-factory.js +1 -131
- package/factory/generic-module-factory.d.ts +14 -10
- package/factory/generic-module-factory.js +1 -190
- package/general/basic-get.d.ts +8 -1
- package/general/basic-get.js +1 -83
- package/general/basic-post.d.ts +8 -1
- package/general/basic-post.js +1 -70
- package/general/calculate-pages.d.ts +9 -1
- package/general/calculate-pages.js +1 -7
- package/general/camel-to-sentence-case.d.ts +3 -1
- package/general/camel-to-sentence-case.js +1 -20
- package/general/check-even-odd-length.d.ts +3 -1
- package/general/check-even-odd-length.js +1 -17
- package/general/clear-cache.d.ts +7 -2
- package/general/clear-cache.js +1 -12
- package/general/cnic-formatter.d.ts +16 -3
- package/general/cnic-formatter.js +1 -53
- package/general/convert-url-to-base64.d.ts +8 -6
- package/general/convert-url-to-base64.js +1 -231
- package/general/countries.d.ts +5 -3
- package/general/countries.js +1 -514
- package/general/create-date.d.ts +3 -1
- package/general/create-date.js +1 -22
- package/general/crypto.d.ts +4 -2
- package/general/crypto.js +1 -45
- package/general/currencies.d.ts +2 -0
- package/general/currencies.js +0 -1077
- package/general/delete-image-from-private-supabase.d.ts +10 -2
- package/general/delete-image-from-private-supabase.js +1 -66
- package/general/delete-image-from-public-supabase.d.ts +10 -2
- package/general/delete-image-from-public-supabase.js +1 -66
- package/general/download-from-url.d.ts +8 -1
- package/general/download-from-url.js +1 -82
- package/general/dynamic-page-limit.d.ts +9 -3
- package/general/dynamic-page-limit.js +1 -7
- package/general/enum-to-text.d.ts +8 -1
- package/general/enum-to-text.js +1 -11
- package/general/fetch-data.d.ts +16 -4
- package/general/fetch-data.js +1 -95
- package/general/fetch-supabase-image.d.ts +11 -2
- package/general/fetch-supabase-image.js +1 -67
- package/general/fetch-supabase-private-assets.d.ts +11 -2
- package/general/fetch-supabase-private-assets.js +1 -69
- package/general/format-date.d.ts +10 -2
- package/general/format-date.js +1 -49
- package/general/format-number.d.ts +12 -2
- package/general/format-number.js +1 -35
- package/general/format-phone-display.d.ts +9 -1
- package/general/format-phone-display.js +1 -32
- package/general/format-phone.d.ts +10 -2
- package/general/format-phone.js +1 -20
- package/general/format-pricing.d.ts +8 -1
- package/general/format-pricing.js +1 -23
- package/general/format-secs.d.ts +8 -1
- package/general/format-secs.js +1 -21
- package/general/format-time.d.ts +8 -2
- package/general/format-time.js +1 -38
- package/general/format-value.d.ts +8 -1
- package/general/format-value.js +1 -7
- package/general/full-month-range.d.ts +3 -2
- package/general/full-month-range.js +1 -24
- package/general/full-year-range.d.ts +3 -2
- package/general/full-year-range.js +1 -20
- package/general/generate-article-schema.d.ts +3 -2
- package/general/generate-article-schema.js +1 -100
- package/general/generate-blog-schema.d.ts +3 -2
- package/general/generate-blog-schema.js +1 -32
- package/general/generate-book-schema.d.ts +3 -2
- package/general/generate-book-schema.js +1 -109
- package/general/generate-breadcrumb-schema.d.ts +3 -2
- package/general/generate-breadcrumb-schema.js +1 -34
- package/general/generate-carousel-schema.d.ts +3 -2
- package/general/generate-carousel-schema.js +1 -172
- package/general/generate-course-schema.d.ts +3 -2
- package/general/generate-course-schema.js +1 -124
- package/general/generate-dataset-schema.d.ts +3 -2
- package/general/generate-dataset-schema.js +1 -156
- package/general/generate-discussion-forum-schema.d.ts +3 -2
- package/general/generate-discussion-forum-schema.js +1 -67
- package/general/generate-education-schema.d.ts +3 -2
- package/general/generate-education-schema.js +1 -137
- package/general/generate-employer-aggregate-rating-schema.d.ts +3 -2
- package/general/generate-employer-aggregate-rating-schema.js +1 -64
- package/general/generate-event-schema.d.ts +3 -2
- package/general/generate-event-schema.js +1 -214
- package/general/generate-faq-schema.d.ts +3 -2
- package/general/generate-faq-schema.js +1 -43
- package/general/generate-grid.d.ts +3 -2
- package/general/generate-grid.js +1 -55
- package/general/generate-image-metadata-schema.d.ts +3 -2
- package/general/generate-image-metadata-schema.js +1 -73
- package/general/generate-job-posting-schema.d.ts +3 -2
- package/general/generate-job-posting-schema.js +1 -120
- package/general/generate-local-business-schema.d.ts +3 -2
- package/general/generate-local-business-schema.js +1 -75
- package/general/generate-math-solver-schema.d.ts +3 -2
- package/general/generate-math-solver-schema.js +1 -83
- package/general/generate-movie-carousel-schema.d.ts +3 -2
- package/general/generate-movie-carousel-schema.js +1 -160
- package/general/generate-organization-schema.d.ts +3 -2
- package/general/generate-organization-schema.js +1 -39
- package/general/generate-profile-page-schema.d.ts +3 -2
- package/general/generate-profile-page-schema.js +1 -82
- package/general/generate-qa-page-schema.d.ts +3 -2
- package/general/generate-qa-page-schema.js +1 -67
- package/general/generate-recipe-schema.d.ts +3 -2
- package/general/generate-recipe-schema.js +1 -104
- package/general/generate-ref.d.ts +8 -2
- package/general/generate-ref.js +1 -12
- package/general/generate-review-snippet-schema.d.ts +3 -2
- package/general/generate-review-snippet-schema.js +1 -137
- package/general/generate-shopping-loyalty-program-schema.d.ts +3 -2
- package/general/generate-shopping-loyalty-program-schema.js +1 -59
- package/general/generate-shopping-merchant-listing-schema.d.ts +3 -2
- package/general/generate-shopping-merchant-listing-schema.js +1 -153
- package/general/generate-shopping-merchant-return-policy-schema.d.ts +3 -2
- package/general/generate-shopping-merchant-return-policy-schema.js +1 -68
- package/general/generate-shopping-merchant-shipping-policy-schema.d.ts +3 -2
- package/general/generate-shopping-merchant-shipping-policy-schema.js +1 -74
- package/general/generate-shopping-overview-schema.d.ts +3 -2
- package/general/generate-shopping-overview-schema.js +1 -157
- package/general/generate-shopping-product-snippet-schema.d.ts +3 -2
- package/general/generate-shopping-product-snippet-schema.js +1 -167
- package/general/generate-shopping-variants-schema.d.ts +3 -2
- package/general/generate-shopping-variants-schema.js +1 -143
- package/general/generate-software-app-schema.d.ts +3 -2
- package/general/generate-software-app-schema.js +1 -143
- package/general/generate-speakable-schema.d.ts +3 -2
- package/general/generate-speakable-schema.js +1 -139
- package/general/generate-subscription-schema.d.ts +3 -2
- package/general/generate-subscription-schema.js +1 -133
- package/general/generate-vacation-rental-schema.d.ts +3 -2
- package/general/generate-vacation-rental-schema.js +1 -135
- package/general/generate-video-schema.d.ts +3 -2
- package/general/generate-video-schema.js +1 -163
- package/general/generic-cache.d.ts +17 -15
- package/general/generic-cache.js +1 -659
- package/general/get-available-page-limit.d.ts +8 -2
- package/general/get-available-page-limit.js +1 -31
- package/general/get-calendar-current-month.d.ts +11 -3
- package/general/get-calendar-current-month.js +1 -31
- package/general/get-calendar-dates.d.ts +11 -3
- package/general/get-calendar-dates.js +1 -42
- package/general/get-calendar-next-month.d.ts +12 -3
- package/general/get-calendar-next-month.js +1 -32
- package/general/get-calendar-previous-month.d.ts +12 -3
- package/general/get-calendar-previous-month.js +1 -36
- package/general/get-current-year.d.ts +7 -1
- package/general/get-current-year.js +1 -5
- package/general/get-day-name.d.ts +5 -3
- package/general/get-day-name.js +1 -14
- package/general/get-dial-code.d.ts +8 -1
- package/general/get-dial-code.js +1 -8
- package/general/get-full-name.d.ts +9 -2
- package/general/get-full-name.js +1 -8
- package/general/get-href.d.ts +3 -1
- package/general/get-href.js +1 -13
- package/general/get-month-name.d.ts +5 -3
- package/general/get-month-name.js +1 -19
- package/general/get-month-number.d.ts +5 -3
- package/general/get-month-number.js +1 -29
- package/general/get-number-of-days-in-month.d.ts +9 -2
- package/general/get-number-of-days-in-month.js +1 -12
- package/general/get-pathname.d.ts +3 -1
- package/general/get-pathname.js +1 -16
- package/general/get-week-day.d.ts +8 -1
- package/general/get-week-day.js +1 -9
- package/general/image-url-to-base64.d.ts +3 -1
- package/general/image-url-to-base64.js +1 -80
- package/general/is-created-or-updated.d.ts +3 -1
- package/general/is-created-or-updated.js +1 -26
- package/general/is-next-button-disabled.d.ts +9 -1
- package/general/is-next-button-disabled.js +1 -5
- package/general/is-odd.d.ts +3 -1
- package/general/is-odd.js +1 -13
- package/general/is-previous-button-disabled.d.ts +8 -1
- package/general/is-previous-button-disabled.js +1 -7
- package/general/linear-gradients.d.ts +4 -2
- package/general/linear-gradients.js +1 -52
- package/general/multi-part-search.d.ts +10 -2
- package/general/multi-part-search.js +1 -16
- package/general/normalize-phone.d.ts +15 -2
- package/general/normalize-phone.js +1 -40
- package/general/parse-frontmatter.d.ts +11 -4
- package/general/parse-frontmatter.js +2 -35
- package/general/remove-data-image-prefix.d.ts +8 -1
- package/general/remove-data-image-prefix.js +1 -7
- package/general/repeat-times.d.ts +3 -1
- package/general/repeat-times.js +1 -21
- package/general/resolve-anchor-link.d.ts +3 -1
- package/general/resolve-anchor-link.js +1 -26
- package/general/resolve-current-date.d.ts +3 -1
- package/general/resolve-current-date.js +1 -22
- package/general/resolve-grid.d.ts +3 -1
- package/general/resolve-grid.js +1 -18
- package/general/resolve-initials.d.ts +3 -1
- package/general/resolve-initials.js +1 -17
- package/general/set-timezone.d.ts +11 -1
- package/general/set-timezone.js +1 -12
- package/general/slugify.d.ts +3 -1
- package/general/slugify.js +1 -24
- package/general/text-to-enum.d.ts +8 -1
- package/general/text-to-enum.js +1 -10
- package/general/text-to-sentence-case.d.ts +3 -1
- package/general/text-to-sentence-case.js +1 -16
- package/general/time-out.d.ts +3 -1
- package/general/time-out.js +1 -16
- package/general/time-zones.d.ts +3 -1
- package/general/time-zones.js +1 -437
- package/general/truncate-text.d.ts +3 -1
- package/general/truncate-text.js +1 -18
- package/general/type.d.ts +3 -1
- package/general/type.js +1 -2
- package/general/upload-blob-to-private-supabase.d.ts +14 -2
- package/general/upload-blob-to-private-supabase.js +1 -62
- package/general/upload-blob-to-public-supabase.d.ts +14 -2
- package/general/upload-blob-to-public-supabase.js +1 -62
- package/general/upload-image-to-private-supabase.d.ts +15 -3
- package/general/upload-image-to-private-supabase.js +1 -66
- package/general/upload-image-to-public-supabase.d.ts +15 -3
- package/general/upload-image-to-public-supabase.js +1 -66
- package/general/url-to-sentence-case.d.ts +3 -1
- package/general/url-to-sentence-case.js +1 -19
- package/general/validate-comment.d.ts +3 -1
- package/general/validate-comment.js +1 -21
- package/general/validate-email.d.ts +3 -1
- package/general/validate-email.js +1 -24
- package/general/validate-form.d.ts +12 -3
- package/general/validate-form.js +1 -29
- package/general/validate-name.d.ts +3 -1
- package/general/validate-name.js +1 -21
- package/hooks/use-change.d.ts +11 -2
- package/hooks/use-change.js +1 -23
- package/hooks/use-debounce.d.ts +10 -1
- package/hooks/use-debounce.js +1 -14
- package/hooks/use-fetch.d.ts +7 -5
- package/hooks/use-fetch.js +1 -239
- package/hooks/use-force-render.d.ts +6 -2
- package/hooks/use-force-render.js +1 -17
- package/hooks/use-ip-geo-location.d.ts +8 -1
- package/hooks/use-ip-geo-location.js +1 -79
- package/hooks/use-is-mobile.d.ts +8 -1
- package/hooks/use-is-mobile.js +1 -22
- package/hooks/use-module-entity-v2.d.ts +7 -4
- package/hooks/use-module-entity-v2.js +1 -188
- package/hooks/use-module-entity.d.ts +7 -4
- package/hooks/use-module-entity.js +1 -177
- package/hooks/use-phone-formatter.d.ts +10 -2
- package/hooks/use-phone-formatter.js +1 -23
- package/hooks/use-position.d.ts +6 -3
- package/hooks/use-position.js +1 -43
- package/hooks/use-rtl.d.ts +4 -2
- package/hooks/use-rtl.js +1 -84
- package/hooks/use-sticky.d.ts +3 -1
- package/hooks/use-sticky.js +1 -39
- package/hooks/use-toggle-state.d.ts +3 -2
- package/hooks/use-toggle-state.js +1 -26
- package/hooks/use-window-event-listener.d.ts +9 -1
- package/hooks/use-window-event-listener.js +1 -11
- package/hooks/with-seo.d.ts +11 -2
- package/hooks/with-seo.js +1 -37
- package/local-storage/get-storage-value.d.ts +5 -2
- package/local-storage/get-storage-value.js +1 -20
- package/local-storage/remove-storage-value.d.ts +3 -1
- package/local-storage/remove-storage-value.js +1 -14
- package/local-storage/set-storage-value.d.ts +3 -1
- package/local-storage/set-storage-value.js +1 -14
- package/local-storage/type.d.ts +3 -1
- package/local-storage/type.js +1 -2
- package/npm.d.d.ts +2 -0
- package/npm.d.js +0 -0
- package/package.json +20 -18
- package/storybook/generate-sitemap.d.ts +3 -1
- package/storybook/generate-sitemap.js +17 -26
- package/storybook/preview.d.ts +4 -2
- package/storybook/preview.js +1 -62
- package/storybook/react-design-story-script.d.ts +3 -1
- package/storybook/react-design-story-script.js +5 -27
- package/storybook/react-emoji-collection.d.ts +3 -1
- package/storybook/react-emoji-collection.js +10 -55
- package/storybook/react-emoji-story-script.d.ts +3 -1
- package/storybook/react-emoji-story-script.js +5 -31
- package/storybook/react-emoji-story-template.d.ts +3 -1
- package/storybook/react-emoji-story-template.js +45 -15
- package/storybook/react-icon-collection.d.ts +3 -1
- package/storybook/react-icon-collection.js +10 -42
- package/storybook/react-icon-story-script.d.ts +3 -1
- package/storybook/react-icon-story-script.js +5 -27
- package/storybook/react-icon-story-template.d.ts +3 -1
- package/storybook/react-icon-story-template.js +45 -14
- package/storybook/react-logo-collection.d.ts +3 -1
- package/storybook/react-logo-collection.js +10 -42
- package/storybook/react-logo-story-script.d.ts +3 -1
- package/storybook/react-logo-story-script.js +5 -27
- package/storybook/react-logo-story-template.d.ts +3 -1
- package/storybook/react-logo-story-template.js +45 -14
- package/storybook/react-pakistan-theme.d.ts +3 -1
- package/storybook/react-pakistan-theme.js +1 -31
- package/storybook/responsive-args.d.ts +11 -10
- package/storybook/responsive-args.js +1 -19
- package/storybook/responsive-component.d.ts +4 -2
- package/storybook/responsive-component.js +37 -23
- package/storybook/responsive-screens.d.ts +3 -1
- package/storybook/responsive-screens.js +1 -109
- package/storybook/theme.d.ts +17 -15
- package/storybook/theme.js +1 -1022
- package/api/stellar-solutions/app-user/index.d.ts +0 -51
- package/api/stellar-solutions/app-user/index.js +0 -210
- package/api/stellar-solutions/bank/index.d.ts +0 -59
- package/api/stellar-solutions/bank/index.js +0 -210
- package/api/stellar-solutions/branch/index.d.ts +0 -58
- package/api/stellar-solutions/branch/index.js +0 -220
- package/api/stellar-solutions/company/index.d.ts +0 -57
- package/api/stellar-solutions/company/index.js +0 -218
- package/api/stellar-solutions/company-report/index.d.ts +0 -15
- package/api/stellar-solutions/company-report/index.js +0 -74
- package/api/stellar-solutions/constants.d.ts +0 -19
- package/api/stellar-solutions/constants.js +0 -22
- package/api/stellar-solutions/contact/index.d.ts +0 -56
- package/api/stellar-solutions/contact/index.js +0 -217
- package/api/stellar-solutions/currency/index.d.ts +0 -55
- package/api/stellar-solutions/currency/index.js +0 -212
- package/api/stellar-solutions/customer/index.d.ts +0 -68
- package/api/stellar-solutions/customer/index.js +0 -249
- package/api/stellar-solutions/expense/index.d.ts +0 -58
- package/api/stellar-solutions/expense/index.js +0 -229
- package/api/stellar-solutions/expense-category/index.d.ts +0 -53
- package/api/stellar-solutions/expense-category/index.js +0 -214
- package/api/stellar-solutions/lead/index.d.ts +0 -51
- package/api/stellar-solutions/lead/index.js +0 -206
- package/api/stellar-solutions/menu-order/index.d.ts +0 -53
- package/api/stellar-solutions/menu-order/index.js +0 -202
- package/api/stellar-solutions/payment/index.d.ts +0 -65
- package/api/stellar-solutions/payment/index.js +0 -230
- package/api/stellar-solutions/payment-mode/index.d.ts +0 -53
- package/api/stellar-solutions/payment-mode/index.js +0 -191
- package/api/stellar-solutions/preference/index.d.ts +0 -25
- package/api/stellar-solutions/preference/index.js +0 -114
- package/api/stellar-solutions/product/index.d.ts +0 -64
- package/api/stellar-solutions/product/index.js +0 -235
- package/api/stellar-solutions/product-category/index.d.ts +0 -51
- package/api/stellar-solutions/product-category/index.js +0 -212
- package/api/stellar-solutions/profile/index.d.ts +0 -78
- package/api/stellar-solutions/profile/index.js +0 -234
- package/api/stellar-solutions/quote-invoice/index.d.ts +0 -97
- package/api/stellar-solutions/quote-invoice/index.js +0 -369
- package/api/stellar-solutions/quote-invoice-report/index.d.ts +0 -15
- package/api/stellar-solutions/quote-invoice-report/index.js +0 -74
- package/api/stellar-solutions/tax/index.d.ts +0 -55
- package/api/stellar-solutions/tax/index.js +0 -224
- package/api/stellar-solutions/types/common.d.ts +0 -24
- package/api/stellar-solutions/types/common.js +0 -22
- package/api/stellar-solutions/types/erp.d.ts +0 -302
- package/api/stellar-solutions/types/erp.js +0 -73
- package/api/stellar-solutions/types/index.d.ts +0 -3
- package/api/stellar-solutions/types/index.js +0 -19
- package/api/stellar-solutions/types/pos.d.ts +0 -176
- package/api/stellar-solutions/types/pos.js +0 -61
- package/constants/index.d.ts +0 -12
- package/constants/index.js +0 -28
- package/factory/index.d.ts +0 -2
- package/factory/index.js +0 -18
- package/general/index.d.ts +0 -95
- package/general/index.js +0 -111
- package/index.d.ts +0 -28
- package/index.js +0 -44
- package/local-storage/index.d.ts +0 -4
- package/local-storage/index.js +0 -20
- package/setupTests.d.ts +0 -1
- package/setupTests.js +0 -52
- package/storybook/index.d.ts +0 -17
- package/storybook/index.js +0 -33
package/README.md
CHANGED
|
@@ -1,348 +1,107 @@
|
|
|
1
|
-
#
|
|
1
|
+
# React Pakistan โ Util Functions
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
<a
|
|
5
|
-
href="https://react-pakistan.github.io/react-pakistan-docs/"
|
|
6
|
-
target="_blank"
|
|
7
|
-
>
|
|
8
|
-
<img
|
|
9
|
-
alt="React Pakistan - React Pakistan Documentation"
|
|
10
|
-
src="https://res.cloudinary.com/dq6hflqwx/image/upload/v1565548545/GitHub/React_Pakistan_Storybook_Logo.jpg"
|
|
11
|
-
width="70%"
|
|
12
|
-
/>
|
|
13
|
-
</a>
|
|
14
|
-
<a
|
|
15
|
-
href="https://react-pakistan.github.io/react-pakistan-docs/"
|
|
16
|
-
target="_blank"
|
|
17
|
-
>
|
|
18
|
-
<img
|
|
19
|
-
alt="Taimoor Khan - React Commons Collection Author"
|
|
20
|
-
src="https://avatars1.githubusercontent.com/u/27800340?s=460&v=4"
|
|
21
|
-
width="20%"
|
|
22
|
-
/>
|
|
23
|
-
</a>
|
|
24
|
-
</div>
|
|
3
|
+
React Pakistan is an open-source platform creating React software solutions for the global community.
|
|
25
4
|
|
|
26
|
-
|
|
5
|
+
A central library of utility functions, hooks, constants, and factories for the React Pakistan ecosystem.
|
|
27
6
|
|
|
28
|
-
##
|
|
7
|
+
## Table of Contents
|
|
29
8
|
|
|
30
|
-
|
|
9
|
+
- [Tech Stack](#tech-stack)
|
|
10
|
+
- [Installation](#installation)
|
|
11
|
+
- [Usage](#usage)
|
|
12
|
+
- [Tests](#tests)
|
|
13
|
+
- [Ecosystem](#ecosystem)
|
|
14
|
+
- [Contributors](#contributors)
|
|
15
|
+
- [Support](#support)
|
|
31
16
|
|
|
32
|
-
|
|
17
|
+
## Tech Stack
|
|
33
18
|
|
|
34
|
-
|
|
35
|
-
- [Installation](#-installation-) โจ
|
|
36
|
-
- [Tested](#-tested-) โจ
|
|
37
|
-
- [Contributors](#-contributors-) โจ
|
|
38
|
-
- [Other Libraries from ReactPakistan](#-other-libraries-from-reactpakistan-) โจ
|
|
39
|
-
- [Support](#-support-) โจ
|
|
40
|
-
- [Contact](#-contact-) โจ
|
|
41
|
-
- [Buy Me Coffee](#-buy-me-coffee-) โจ
|
|
19
|
+
React ยท TypeScript ยท Styled Components ยท Vitest ยท ESLint
|
|
42
20
|
|
|
43
|
-
|
|
21
|
+
## Installation
|
|
44
22
|
|
|
45
|
-
|
|
46
|
-
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
- [Jest](https://jestjs.io/) โจ
|
|
50
|
-
- [Eslint](https://eslint.org/) โจ
|
|
51
|
-
|
|
52
|
-
### ๐ Installation ๐
|
|
53
|
-
|
|
54
|
-
- Clone the repo
|
|
55
|
-
- Cd into the project folder
|
|
56
|
-
- Figure out which package manager you have on your system, then run following commands for their specific use cases.
|
|
57
|
-
|
|
58
|
-
```console
|
|
59
|
-
// to install dependencies
|
|
60
|
-
yarn
|
|
61
|
-
// to start local dev server
|
|
62
|
-
yarn start
|
|
63
|
-
// to run all tests locally
|
|
64
|
-
yarn test
|
|
23
|
+
```sh
|
|
24
|
+
yarn add @react-pakistan/util-functions
|
|
25
|
+
# or
|
|
26
|
+
npm install @react-pakistan/util-functions
|
|
65
27
|
```
|
|
66
28
|
|
|
67
|
-
|
|
29
|
+
### Development
|
|
68
30
|
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
// to run all tests locally
|
|
77
|
-
npm test
|
|
31
|
+
```sh
|
|
32
|
+
git clone <repo-url>
|
|
33
|
+
cd util-functions
|
|
34
|
+
yarn
|
|
35
|
+
yarn test # run all tests
|
|
36
|
+
yarn test:watch # watch mode
|
|
37
|
+
yarn build # build the library
|
|
78
38
|
```
|
|
79
39
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
We aim to achieve 100% coverage and we shall...
|
|
40
|
+
## Usage
|
|
83
41
|
|
|
84
|
-
|
|
85
|
-

|
|
86
|
-

|
|
87
|
-

|
|
42
|
+
> This package has **no barrel exports**. Import functions directly from their file paths.
|
|
88
43
|
|
|
89
|
-
|
|
44
|
+
```ts
|
|
45
|
+
// General utilities
|
|
46
|
+
import { slugify } from '@react-pakistan/util-functions/general/slugify';
|
|
47
|
+
import { validateEmail } from '@react-pakistan/util-functions/general/validate-email';
|
|
48
|
+
import { formatDate } from '@react-pakistan/util-functions/general/format-date';
|
|
90
49
|
|
|
91
|
-
|
|
50
|
+
// Hooks
|
|
51
|
+
import { useDebounce } from '@react-pakistan/util-functions/hooks/use-debounce';
|
|
52
|
+
import { useRTL } from '@react-pakistan/util-functions/hooks/use-rtl';
|
|
92
53
|
|
|
93
|
-
|
|
54
|
+
// Constants
|
|
55
|
+
import { API_METHODS } from '@react-pakistan/util-functions/constants/api-methods';
|
|
56
|
+
import { COUNTRIES_TIMEZONES } from '@react-pakistan/util-functions/constants/countries-timezones';
|
|
94
57
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
| <img src="https://avatars0.githubusercontent.com/u/27800340?s=150&v=4" /> | <a href="https://github.com/taimoormk">Taimoor Khan</a> | ๐จ๐ค๐ง๐๐โ ๏ธ |
|
|
58
|
+
// Local storage
|
|
59
|
+
import { getStorageValue } from '@react-pakistan/util-functions/local-storage/get-storage-value';
|
|
98
60
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
<a
|
|
103
|
-
href="https://react-commons-collection.surge.sh"
|
|
104
|
-
target="_blank"
|
|
105
|
-
>
|
|
106
|
-
<img
|
|
107
|
-
alt="React Pakistan - React Commons Collection"
|
|
108
|
-
src="https://res.cloudinary.com/dq6hflqwx/image/upload/v1671950783/React%20Pakistan/react-commons-collection.jpg"
|
|
109
|
-
width="70%"
|
|
110
|
-
/>
|
|
111
|
-
</a>
|
|
112
|
-
<a
|
|
113
|
-
href="https://www.npmjs.com/package/@react-pakistan/react-commons-collection"
|
|
114
|
-
target="_blank"
|
|
115
|
-
>
|
|
116
|
-
<img
|
|
117
|
-
alt="React Pakistan - React Commons Collection - NPM Package"
|
|
118
|
-
src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQY1K6JwhYEBfsv52nUT30dAIjoFyp252cH6VVkhXB_Gq1bUSz-"
|
|
119
|
-
width="20%"
|
|
120
|
-
/>
|
|
121
|
-
</a>
|
|
122
|
-
</div>
|
|
123
|
-
|
|
124
|
-
<div>
|
|
125
|
-
<a
|
|
126
|
-
href="https://react-ui-collection.surge.sh"
|
|
127
|
-
target="_blank"
|
|
128
|
-
>
|
|
129
|
-
<img
|
|
130
|
-
alt="React Pakistan - React UI Collection"
|
|
131
|
-
src="https://res.cloudinary.com/dq6hflqwx/image/upload/v1671950784/React%20Pakistan/react-ui-collection.jpg"
|
|
132
|
-
width="70%"
|
|
133
|
-
/>
|
|
134
|
-
</a>
|
|
135
|
-
<a
|
|
136
|
-
href="https://www.npmjs.com/package/@react-pakistan/react-ui-collection"
|
|
137
|
-
target="_blank"
|
|
138
|
-
>
|
|
139
|
-
<img
|
|
140
|
-
alt="React Pakistan - React UI Collection - NPM Package"
|
|
141
|
-
src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQY1K6JwhYEBfsv52nUT30dAIjoFyp252cH6VVkhXB_Gq1bUSz-"
|
|
142
|
-
width="20%"
|
|
143
|
-
/>
|
|
144
|
-
</a>
|
|
145
|
-
</div>
|
|
146
|
-
|
|
147
|
-
<div>
|
|
148
|
-
<a
|
|
149
|
-
href="https://react-pakistan.github.io/react-icon-collection"
|
|
150
|
-
target="_blank"
|
|
151
|
-
>
|
|
152
|
-
<img
|
|
153
|
-
alt="React Pakistan - React Icon Collection"
|
|
154
|
-
src="https://res.cloudinary.com/dq6hflqwx/image/upload/v1671950784/React%20Pakistan/react-icon-collection.jpg"
|
|
155
|
-
width="70%"
|
|
156
|
-
/>
|
|
157
|
-
</a>
|
|
158
|
-
<a
|
|
159
|
-
href="https://www.npmjs.com/package/@react-pakistan/react-icon-collection"
|
|
160
|
-
target="_blank"
|
|
161
|
-
>
|
|
162
|
-
<img
|
|
163
|
-
alt="React Pakistan - React Icon Collection - NPM Package"
|
|
164
|
-
src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQY1K6JwhYEBfsv52nUT30dAIjoFyp252cH6VVkhXB_Gq1bUSz-"
|
|
165
|
-
width="20%"
|
|
166
|
-
/>
|
|
167
|
-
</a>
|
|
168
|
-
</div>
|
|
61
|
+
// Factories
|
|
62
|
+
import { genericComponentFactory } from '@react-pakistan/util-functions/factory/generic-component-factory';
|
|
63
|
+
```
|
|
169
64
|
|
|
170
|
-
|
|
171
|
-
<a
|
|
172
|
-
href="https://react-pakistan.github.io/react-logo-collection"
|
|
173
|
-
target="_blank"
|
|
174
|
-
>
|
|
175
|
-
<img
|
|
176
|
-
alt="React Pakistan - React Logo Collection"
|
|
177
|
-
src="https://res.cloudinary.com/dq6hflqwx/image/upload/v1671950784/React%20Pakistan/react-logo-collection.jpg"
|
|
178
|
-
width="70%"
|
|
179
|
-
/>
|
|
180
|
-
</a>
|
|
181
|
-
<a
|
|
182
|
-
href="https://www.npmjs.com/package/@react-pakistan/react-logo-collection"
|
|
183
|
-
target="_blank"
|
|
184
|
-
>
|
|
185
|
-
<img
|
|
186
|
-
alt="React Pakistan - React Logo Collection - NPM Package"
|
|
187
|
-
src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQY1K6JwhYEBfsv52nUT30dAIjoFyp252cH6VVkhXB_Gq1bUSz-"
|
|
188
|
-
width="20%"
|
|
189
|
-
/>
|
|
190
|
-
</a>
|
|
191
|
-
</div>
|
|
65
|
+
## Tests
|
|
192
66
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
>
|
|
198
|
-
<img
|
|
199
|
-
alt="React Pakistan - React Emoji Collection"
|
|
200
|
-
src="https://res.cloudinary.com/dq6hflqwx/image/upload/v1671950784/React%20Pakistan/react-emoji-collection.jpg"
|
|
201
|
-
width="70%"
|
|
202
|
-
/>
|
|
203
|
-
</a>
|
|
204
|
-
<a
|
|
205
|
-
href="https://www.npmjs.com/package/@react-pakistan/react-emoji-collection"
|
|
206
|
-
target="_blank"
|
|
207
|
-
>
|
|
208
|
-
<img
|
|
209
|
-
alt="React Pakistan - React Emoji Collection - NPM Package"
|
|
210
|
-
src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQY1K6JwhYEBfsv52nUT30dAIjoFyp252cH6VVkhXB_Gq1bUSz-"
|
|
211
|
-
width="20%"
|
|
212
|
-
/>
|
|
213
|
-
</a>
|
|
214
|
-
</div>
|
|
67
|
+

|
|
68
|
+

|
|
69
|
+

|
|
70
|
+

|
|
215
71
|
|
|
216
|
-
|
|
217
|
-
<a
|
|
218
|
-
href="https://react-pakistan.github.io/react-native-commons-collection"
|
|
219
|
-
target="_blank"
|
|
220
|
-
>
|
|
221
|
-
<img
|
|
222
|
-
alt="React Pakistan - React Native Commons Collection"
|
|
223
|
-
src="https://res.cloudinary.com/dq6hflqwx/image/upload/v1672213225/React%20Pakistan/react-native-commons-collection.jpg"
|
|
224
|
-
width="70%"
|
|
225
|
-
/>
|
|
226
|
-
</a>
|
|
227
|
-
<a
|
|
228
|
-
href="https://www.npmjs.com/package/@react-pakistan/react-native-commons-collection"
|
|
229
|
-
target="_blank"
|
|
230
|
-
>
|
|
231
|
-
<img
|
|
232
|
-
alt="React Pakistan - React Native Commons Collection - NPM Package"
|
|
233
|
-
src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQY1K6JwhYEBfsv52nUT30dAIjoFyp252cH6VVkhXB_Gq1bUSz-"
|
|
234
|
-
width="20%"
|
|
235
|
-
/>
|
|
236
|
-
</a>
|
|
237
|
-
</div>
|
|
72
|
+
**156 test files ยท 693 tests** โ all passing.
|
|
238
73
|
|
|
239
|
-
|
|
240
|
-
<a
|
|
241
|
-
href="https://react-pakistan.github.io/react-native-ui-collection"
|
|
242
|
-
target="_blank"
|
|
243
|
-
>
|
|
244
|
-
<img
|
|
245
|
-
alt="React Pakistan - React Native Ui Collection"
|
|
246
|
-
src="https://res.cloudinary.com/dq6hflqwx/image/upload/v1672213225/React%20Pakistan/react-native-ui-collection.jpg"
|
|
247
|
-
width="70%"
|
|
248
|
-
/>
|
|
249
|
-
</a>
|
|
250
|
-
<a
|
|
251
|
-
href="https://www.npmjs.com/package/@react-pakistan/react-native-ui-collection"
|
|
252
|
-
target="_blank"
|
|
253
|
-
>
|
|
254
|
-
<img
|
|
255
|
-
alt="React Pakistan - React Native Ui Collection - NPM Package"
|
|
256
|
-
src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQY1K6JwhYEBfsv52nUT30dAIjoFyp252cH6VVkhXB_Gq1bUSz-"
|
|
257
|
-
width="20%"
|
|
258
|
-
/>
|
|
259
|
-
</a>
|
|
260
|
-
</div>
|
|
74
|
+
Should you like this project, please consider giving a โญ on GitHub.
|
|
261
75
|
|
|
262
|
-
|
|
263
|
-
<a
|
|
264
|
-
href="https://react-pakistan.github.io/react-native-icon-collection"
|
|
265
|
-
target="_blank"
|
|
266
|
-
>
|
|
267
|
-
<img
|
|
268
|
-
alt="React Pakistan - React Native Icon Collection"
|
|
269
|
-
src="https://res.cloudinary.com/dq6hflqwx/image/upload/v1672213225/React%20Pakistan/react-native-icon-collection.jpg"
|
|
270
|
-
width="70%"
|
|
271
|
-
/>
|
|
272
|
-
</a>
|
|
273
|
-
<a
|
|
274
|
-
href="https://www.npmjs.com/package/@react-pakistan/react-native-icon-collection"
|
|
275
|
-
target="_blank"
|
|
276
|
-
>
|
|
277
|
-
<img
|
|
278
|
-
alt="React Pakistan - React Native Icon Collection - NPM Package"
|
|
279
|
-
src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQY1K6JwhYEBfsv52nUT30dAIjoFyp252cH6VVkhXB_Gq1bUSz-"
|
|
280
|
-
width="20%"
|
|
281
|
-
/>
|
|
282
|
-
</a>
|
|
283
|
-
</div>
|
|
76
|
+
## Contributors
|
|
284
77
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
target="_blank"
|
|
289
|
-
>
|
|
290
|
-
<img
|
|
291
|
-
alt="React Pakistan - React Native Logo Collection"
|
|
292
|
-
src="https://res.cloudinary.com/dq6hflqwx/image/upload/v1672213225/React%20Pakistan/react-native-logo-collection.jpg"
|
|
293
|
-
width="70%"
|
|
294
|
-
/>
|
|
295
|
-
</a>
|
|
296
|
-
<a
|
|
297
|
-
href="https://www.npmjs.com/package/@react-pakistan/react-native-logo-collection"
|
|
298
|
-
target="_blank"
|
|
299
|
-
>
|
|
300
|
-
<img
|
|
301
|
-
alt="React Pakistan - React Native Logo Collection - NPM Package"
|
|
302
|
-
src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQY1K6JwhYEBfsv52nUT30dAIjoFyp252cH6VVkhXB_Gq1bUSz-"
|
|
303
|
-
width="20%"
|
|
304
|
-
/>
|
|
305
|
-
</a>
|
|
306
|
-
</div>
|
|
78
|
+
| Contributor | GitHub | Role |
|
|
79
|
+
|------------|--------|------|
|
|
80
|
+
| <img src="https://avatars0.githubusercontent.com/u/27800340?s=40&v=4" width="32" height="32" /> | [Taimoor Khan](https://github.com/taimoormk) | Maintainer |
|
|
307
81
|
|
|
308
|
-
|
|
309
|
-
<a
|
|
310
|
-
href="https://react-pakistan.github.io/react-native-emoji-collection"
|
|
311
|
-
target="_blank"
|
|
312
|
-
>
|
|
313
|
-
<img
|
|
314
|
-
alt="React Pakistan - React Native Emoji Collection"
|
|
315
|
-
src="https://res.cloudinary.com/dq6hflqwx/image/upload/v1672213225/React%20Pakistan/react-native-emoji-collection.jpg"
|
|
316
|
-
width="70%"
|
|
317
|
-
/>
|
|
318
|
-
</a>
|
|
319
|
-
<a
|
|
320
|
-
href="https://www.npmjs.com/package/@react-pakistan/react-native-emoji-collection"
|
|
321
|
-
target="_blank"
|
|
322
|
-
>
|
|
323
|
-
<img
|
|
324
|
-
alt="React Pakistan - React Native Emoji Collection - NPM Package"
|
|
325
|
-
src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQY1K6JwhYEBfsv52nUT30dAIjoFyp252cH6VVkhXB_Gq1bUSz-"
|
|
326
|
-
width="20%"
|
|
327
|
-
/>
|
|
328
|
-
</a>
|
|
329
|
-
</div>
|
|
82
|
+
## Ecosystem
|
|
330
83
|
|
|
331
|
-
|
|
84
|
+
| Library | Storybook | npm |
|
|
85
|
+
|---------|-----------|-----|
|
|
86
|
+
| React Commons Collection | [storybook](https://react-commons-collection.surge.sh) | [npm](https://www.npmjs.com/package/@react-pakistan/react-commons-collection) |
|
|
87
|
+
| React UI Collection | [storybook](https://react-ui-collection.surge.sh) | [npm](https://www.npmjs.com/package/@react-pakistan/react-ui-collection) |
|
|
88
|
+
| React Icon Collection | [storybook](https://react-pakistan.github.io/react-icon-collection) | [npm](https://www.npmjs.com/package/@react-pakistan/react-icon-collection) |
|
|
89
|
+
| React Logo Collection | [storybook](https://react-pakistan.github.io/react-logo-collection) | [npm](https://www.npmjs.com/package/@react-pakistan/react-logo-collection) |
|
|
90
|
+
| React Emoji Collection | [storybook](https://react-pakistan.github.io/react-emoji-collection) | [npm](https://www.npmjs.com/package/@react-pakistan/react-emoji-collection) |
|
|
91
|
+
| React Native Commons Collection | [docs](https://react-pakistan.github.io/react-native-commons-collection) | [npm](https://www.npmjs.com/package/@react-pakistan/react-native-commons-collection) |
|
|
92
|
+
| React Native UI Collection | [docs](https://react-pakistan.github.io/react-native-ui-collection) | [npm](https://www.npmjs.com/package/@react-pakistan/react-native-ui-collection) |
|
|
93
|
+
| React Native Icon Collection | [docs](https://react-pakistan.github.io/react-native-icon-collection) | [npm](https://www.npmjs.com/package/@react-pakistan/react-native-icon-collection) |
|
|
94
|
+
| React Native Logo Collection | [docs](https://react-pakistan.github.io/react-native-logo-collection) | [npm](https://www.npmjs.com/package/@react-pakistan/react-native-logo-collection) |
|
|
95
|
+
| React Native Emoji Collection | [docs](https://react-pakistan.github.io/react-native-emoji-collection) | [npm](https://www.npmjs.com/package/@react-pakistan/react-native-emoji-collection) |
|
|
332
96
|
|
|
333
|
-
|
|
97
|
+
## Support
|
|
334
98
|
|
|
335
|
-
|
|
99
|
+
Join the community on [React Pakistan Slack](https://reactpakistan.slack.com).
|
|
336
100
|
|
|
337
|
-
|
|
101
|
+
**Contact** โ [Taimoor Khan](https://taimoor.io) ยท [email](mailto:react.pakistan14@gmail.com)
|
|
338
102
|
|
|
339
|
-
|
|
103
|
+
---
|
|
340
104
|
|
|
341
|
-
<a
|
|
342
|
-
|
|
343
|
-
target="_blank">
|
|
344
|
-
<img
|
|
345
|
-
alt="Buy Me A Coffee"
|
|
346
|
-
src="https://bmc-cdn.nyc3.digitaloceanspaces.com/BMC-button-images/custom_images/yellow_img.png"
|
|
347
|
-
/>
|
|
105
|
+
<a href="https://www.buymeacoffee.com/60whp8FM3">
|
|
106
|
+
<img src="https://bmc-cdn.nyc3.digitaloceanspaces.com/BMC-button-images/custom_images/yellow_img.png" alt="Buy Me A Coffee" width="180" />
|
|
348
107
|
</a>
|
package/constants/api-methods.js
CHANGED
|
@@ -1,15 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.API_METHODS = void 0;
|
|
4
|
-
var API_METHODS;
|
|
5
|
-
(function (API_METHODS) {
|
|
6
|
-
API_METHODS["CONNECT"] = "CONNECT";
|
|
7
|
-
API_METHODS["DELETE"] = "DELETE";
|
|
8
|
-
API_METHODS["GET"] = "GET";
|
|
9
|
-
API_METHODS["HEAD"] = "HEAD";
|
|
10
|
-
API_METHODS["OPTIONS"] = "OPTIONS";
|
|
11
|
-
API_METHODS["PATCH"] = "PATCH";
|
|
12
|
-
API_METHODS["POST"] = "POST";
|
|
13
|
-
API_METHODS["PUT"] = "PUT";
|
|
14
|
-
API_METHODS["TRACE"] = "TRACE";
|
|
15
|
-
})(API_METHODS || (exports.API_METHODS = API_METHODS = {}));
|
|
1
|
+
var G=Object.defineProperty;var U=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var o=(N,C)=>{for(var e in C)G(N,e,{get:C[e],enumerable:!0})},p=(N,C,e,L)=>{if(C&&typeof C=="object"||typeof C=="function")for(let E of m(C))!n.call(N,E)&&E!==e&&G(N,E,{get:()=>C[E],enumerable:!(L=U(C,E))||L.enumerable});return N};var r=N=>p(G({},"__esModule",{value:!0}),N);var t={};o(t,{API_METHODS:()=>R});module.exports=r(t);var R=(T=>(T.CONNECT="CONNECT",T.DELETE="DELETE",T.GET="GET",T.HEAD="HEAD",T.OPTIONS="OPTIONS",T.PATCH="PATCH",T.POST="POST",T.PUT="PUT",T.TRACE="TRACE",T))(R||{});0&&(module.exports={API_METHODS});
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
declare const ONE_DAY_IN_MS: number;
|
|
2
|
+
declare const ONE_WEEK_IN_MS: number;
|
|
3
|
+
declare const ONE_MONTH_IN_MS: number;
|
|
4
|
+
declare const SIX_MONTHS_IN_MS: number;
|
|
5
|
+
declare const ONE_YEAR_IN_MS: number;
|
|
6
|
+
|
|
7
|
+
export { ONE_DAY_IN_MS, ONE_MONTH_IN_MS, ONE_WEEK_IN_MS, ONE_YEAR_IN_MS, SIX_MONTHS_IN_MS };
|
package/constants/cache-time.js
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ONE_YEAR_IN_MS = exports.SIX_MONTHS_IN_MS = exports.ONE_MONTH_IN_MS = exports.ONE_WEEK_IN_MS = exports.ONE_DAY_IN_MS = void 0;
|
|
4
|
-
exports.ONE_DAY_IN_MS = 1 * 24 * 60 * 60 * 1000; // 1 day in milliseconds
|
|
5
|
-
exports.ONE_WEEK_IN_MS = 7 * 24 * 60 * 60 * 1000; // 1 week in milliseconds
|
|
6
|
-
exports.ONE_MONTH_IN_MS = 30 * 24 * 60 * 60 * 1000; // 1 month in milliseconds
|
|
7
|
-
exports.SIX_MONTHS_IN_MS = 6 * 30 * 24 * 60 * 60 * 1000; // 6 months in milliseconds
|
|
8
|
-
exports.ONE_YEAR_IN_MS = 12 * 30 * 24 * 60 * 60 * 1000; // 1 year in milliseconds
|
|
1
|
+
var E=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var O=Object.prototype.hasOwnProperty;var c=(N,_)=>{for(var t in _)E(N,t,{get:_[t],enumerable:!0})},e=(N,_,t,M)=>{if(_&&typeof _=="object"||typeof _=="function")for(let o of I(_))!O.call(N,o)&&o!==t&&E(N,o,{get:()=>_[o],enumerable:!(M=S(_,o))||M.enumerable});return N};var n=N=>e(E({},"__esModule",{value:!0}),N);var H={};c(H,{ONE_DAY_IN_MS:()=>p,ONE_MONTH_IN_MS:()=>s,ONE_WEEK_IN_MS:()=>r,ONE_YEAR_IN_MS:()=>A,SIX_MONTHS_IN_MS:()=>x});module.exports=n(H);const p=864e5,r=6048e5,s=2592e6,x=15552e6,A=31104e6;0&&(module.exports={ONE_DAY_IN_MS,ONE_MONTH_IN_MS,ONE_WEEK_IN_MS,ONE_YEAR_IN_MS,SIX_MONTHS_IN_MS});
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
type Country = {
|
|
2
2
|
id: string;
|
|
3
3
|
name: string;
|
|
4
4
|
timezones: Array<string>;
|
|
5
5
|
};
|
|
6
|
-
|
|
6
|
+
declare const countriesTimeZones: Array<Country>;
|
|
7
|
+
|
|
8
|
+
export { type Country, countriesTimeZones };
|