@jnrs/shared 1.0.17 → 1.1.1
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/LICENSE +21 -0
- package/README.md +9 -21
- package/dist/date-fns.cjs +11 -0
- package/dist/date-fns.cjs.map +1 -0
- package/dist/date-fns.d.ts +2 -0
- package/dist/date-fns.d.ts.map +1 -0
- package/dist/date-fns.js +2 -0
- package/dist/date-fns.js.map +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/lodash.d.ts +5 -1
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/defaultOptions.cjs +10 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/defaultOptions.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/defaultOptions.js +8 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/defaultOptions.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/normalizeDates.cjs +14 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/normalizeDates.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/normalizeDates.js +12 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/normalizeDates.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constants.cjs +35 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constants.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constants.js +33 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constants.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constructFrom.cjs +55 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constructFrom.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constructFrom.js +50 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constructFrom.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isSameWeek.cjs +57 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isSameWeek.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isSameWeek.js +52 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isSameWeek.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.cjs +13 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +11 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.cjs +67 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +65 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchFn.cjs +62 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchFn.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchFn.js +60 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchFn.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.cjs +25 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +23 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/de/_lib/formatDistance.cjs +201 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/de/_lib/formatDistance.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/de/_lib/formatDistance.js +199 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/de/_lib/formatDistance.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/de/_lib/formatLong.cjs +45 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/de/_lib/formatLong.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/de/_lib/formatLong.js +43 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/de/_lib/formatLong.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/de/_lib/formatRelative.cjs +16 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/de/_lib/formatRelative.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/de/_lib/formatRelative.js +14 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/de/_lib/formatRelative.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/de/_lib/localize.cjs +196 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/de/_lib/localize.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/de/_lib/localize.js +194 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/de/_lib/localize.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/de/_lib/match.cjs +139 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/de/_lib/match.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/de/_lib/match.js +137 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/de/_lib/match.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/de.cjs +37 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/de.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/de.js +32 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/de.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.cjs +106 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +104 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatLong.cjs +44 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatLong.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatLong.js +42 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatLong.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.cjs +16 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +14 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/localize.cjs +192 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/localize.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/localize.js +190 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/localize.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/match.cjs +137 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/match.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/match.js +135 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/match.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US.cjs +34 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US.js +29 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/es/_lib/formatDistance.cjs +106 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/es/_lib/formatDistance.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/es/_lib/formatDistance.js +104 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/es/_lib/formatDistance.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/es/_lib/formatLong.cjs +44 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/es/_lib/formatLong.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/es/_lib/formatLong.js +42 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/es/_lib/formatLong.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/es/_lib/formatRelative.cjs +30 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/es/_lib/formatRelative.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/es/_lib/formatRelative.js +28 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/es/_lib/formatRelative.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/es/_lib/localize.cjs +169 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/es/_lib/localize.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/es/_lib/localize.js +167 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/es/_lib/localize.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/es/_lib/match.cjs +143 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/es/_lib/match.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/es/_lib/match.js +141 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/es/_lib/match.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/es.cjs +37 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/es.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/es.js +32 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/es.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatDistance.cjs +105 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatDistance.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatDistance.js +103 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatDistance.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatLong.cjs +44 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatLong.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatLong.js +42 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatLong.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatRelative.cjs +16 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatRelative.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatRelative.js +14 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatRelative.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/localize.cjs +170 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/localize.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/localize.js +168 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/localize.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/match.cjs +138 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/match.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/match.js +136 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/match.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr.cjs +34 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr.js +29 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ja/_lib/formatDistance.cjs +120 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ja/_lib/formatDistance.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ja/_lib/formatDistance.js +118 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ja/_lib/formatDistance.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ja/_lib/formatLong.cjs +44 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ja/_lib/formatLong.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ja/_lib/formatLong.js +42 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ja/_lib/formatLong.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ja/_lib/formatRelative.cjs +17 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ja/_lib/formatRelative.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ja/_lib/formatRelative.js +15 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ja/_lib/formatRelative.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ja/_lib/localize.cjs +182 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ja/_lib/localize.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ja/_lib/localize.js +180 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ja/_lib/localize.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ja/_lib/match.cjs +123 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ja/_lib/match.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ja/_lib/match.js +121 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ja/_lib/match.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ja.cjs +37 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ja.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ja.js +32 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ja.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ko/_lib/formatDistance.cjs +106 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ko/_lib/formatDistance.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ko/_lib/formatDistance.js +104 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ko/_lib/formatDistance.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ko/_lib/formatLong.cjs +44 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ko/_lib/formatLong.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ko/_lib/formatLong.js +42 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ko/_lib/formatLong.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ko/_lib/formatRelative.cjs +16 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ko/_lib/formatRelative.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ko/_lib/formatRelative.js +14 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ko/_lib/formatRelative.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ko/_lib/localize.cjs +172 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ko/_lib/localize.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ko/_lib/localize.js +170 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ko/_lib/localize.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ko/_lib/match.cjs +120 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ko/_lib/match.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ko/_lib/match.js +118 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ko/_lib/match.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ko.cjs +35 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ko.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ko.js +30 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ko.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ru/_lib/formatDistance.cjs +251 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ru/_lib/formatDistance.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ru/_lib/formatDistance.js +249 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ru/_lib/formatDistance.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ru/_lib/formatLong.cjs +41 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ru/_lib/formatLong.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ru/_lib/formatLong.js +39 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ru/_lib/formatLong.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ru/_lib/formatRelative.cjs +93 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ru/_lib/formatRelative.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ru/_lib/formatRelative.js +91 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ru/_lib/formatRelative.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ru/_lib/localize.cjs +215 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ru/_lib/localize.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ru/_lib/localize.js +213 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ru/_lib/localize.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ru/_lib/match.cjs +143 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ru/_lib/match.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ru/_lib/match.js +141 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ru/_lib/match.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ru.cjs +34 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ru.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ru.js +29 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/ru.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/zh-CN/_lib/formatDistance.cjs +106 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/zh-CN/_lib/formatDistance.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/zh-CN/_lib/formatDistance.js +104 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/zh-CN/_lib/formatDistance.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/zh-CN/_lib/formatLong.cjs +44 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/zh-CN/_lib/formatLong.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/zh-CN/_lib/formatLong.js +42 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/zh-CN/_lib/formatLong.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/zh-CN/_lib/formatRelative.cjs +36 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/zh-CN/_lib/formatRelative.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/zh-CN/_lib/formatRelative.js +34 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/zh-CN/_lib/formatRelative.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/zh-CN/_lib/localize.cjs +188 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/zh-CN/_lib/localize.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/zh-CN/_lib/localize.js +186 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/zh-CN/_lib/localize.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/zh-CN/_lib/match.cjs +135 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/zh-CN/_lib/match.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/zh-CN/_lib/match.js +133 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/zh-CN/_lib/match.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/zh-CN.cjs +37 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/zh-CN.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/zh-CN.js +32 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/zh-CN.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfWeek.cjs +59 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfWeek.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfWeek.js +54 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfWeek.js.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/toDate.cjs +52 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/toDate.cjs.map +1 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/toDate.js +47 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/toDate.js.map +1 -0
- package/dist/utils/date.cjs +16 -9
- package/dist/utils/date.cjs.map +1 -1
- package/dist/utils/date.d.ts +10 -12
- package/dist/utils/date.js +8 -1
- package/dist/utils/date.js.map +1 -1
- package/dist/utils/fullscreen.d.ts +2 -3
- package/dist/uuid.d.ts +3 -1
- package/package.json +18 -9
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 JNRS Tech Co., Ltd.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,41 +1,29 @@
|
|
|
1
1
|
# @jnrs/shared
|
|
2
2
|
|
|
3
|
-
##
|
|
4
|
-
|
|
5
|
-
- [目录](#目录)
|
|
6
|
-
- [介绍](#介绍)
|
|
7
|
-
- [软件架构](#软件架构)
|
|
8
|
-
- [安装教程](#安装教程)
|
|
9
|
-
- [使用示例](#使用示例)
|
|
10
|
-
- [API](#api)
|
|
11
|
-
- [@jnrs/core 模块](#jnrscore-模块)
|
|
12
|
-
- [@jnrs/core/lodash 模块](#jnrscorelodash-模块)
|
|
13
|
-
- [@jnrs/core/uuid 模块](#jnrscoreuuid-模块)
|
|
3
|
+
## ✨ 介绍
|
|
4
|
+
巨能前端工程化开发,通用工具包
|
|
14
5
|
|
|
15
|
-
|
|
16
|
-
|
|
6
|
+
## 💻 技术栈
|
|
7
|
+
TypeScript
|
|
17
8
|
|
|
18
|
-
|
|
19
|
-
jnrs-monorepo-frontend
|
|
20
|
-
|
|
21
|
-
#### 安装教程
|
|
9
|
+
## 🧩 安装教程
|
|
22
10
|
```shell
|
|
23
11
|
pnpm add @jnrs/shared
|
|
24
12
|
```
|
|
25
13
|
|
|
26
|
-
|
|
14
|
+
## 🔍 使用示例
|
|
27
15
|
```typescript
|
|
28
16
|
import { Fullscreen } from '@jnrs/shared'
|
|
29
17
|
import { debounce } from '@jnrs/shared/lodash'
|
|
30
18
|
import { uuidv4 } from '@jnrs/shared/uuid'
|
|
31
19
|
```
|
|
32
20
|
|
|
33
|
-
## API
|
|
21
|
+
## 📋 API
|
|
34
22
|
|
|
35
23
|
#### @jnrs/core 模块
|
|
36
|
-
|
|
24
|
+
类
|
|
37
25
|
- Fullscreen
|
|
38
|
-
|
|
26
|
+
函数
|
|
39
27
|
- setDefaultLocale
|
|
40
28
|
- formatDateTime
|
|
41
29
|
- formatWeekday
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-fns.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-fns.d.ts","sourceRoot":"","sources":["../src/date-fns.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA"}
|
package/dist/date-fns.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-fns.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export * from './utils/date';
|
|
2
|
+
export * from './utils/fullscreen';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/lodash.d.ts
CHANGED
|
@@ -1 +1,5 @@
|
|
|
1
|
-
export { debounce,
|
|
1
|
+
export { debounce, throttle, once } from 'lodash-es';
|
|
2
|
+
export { get, set, has } from 'lodash-es';
|
|
3
|
+
export { omit, pick, isEmpty } from 'lodash-es';
|
|
4
|
+
export { isNil, noop } from 'lodash-es';
|
|
5
|
+
//# sourceMappingURL=lodash.d.ts.map
|
package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/defaultOptions.cjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaultOptions.cjs","sources":["../../../../../../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/defaultOptions.js"],"sourcesContent":["let defaultOptions = {};\n\nexport function getDefaultOptions() {\n return defaultOptions;\n}\n\nexport function setDefaultOptions(newOptions) {\n defaultOptions = newOptions;\n}\n"],"names":[],"mappings":";;AAAA,IAAI,cAAc,GAAG,EAAE;;AAEhB,SAAS,iBAAiB,GAAG;AACpC,EAAE,OAAO,cAAc;AACvB;;;;","x_google_ignoreList":[0]}
|
package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/defaultOptions.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaultOptions.js","sources":["../../../../../../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/defaultOptions.js"],"sourcesContent":["let defaultOptions = {};\n\nexport function getDefaultOptions() {\n return defaultOptions;\n}\n\nexport function setDefaultOptions(newOptions) {\n defaultOptions = newOptions;\n}\n"],"names":[],"mappings":"AAAA,IAAI,cAAc,GAAG,EAAE;;AAEhB,SAAS,iBAAiB,GAAG;AACpC,EAAE,OAAO,cAAc;AACvB;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var constructFrom = require('../constructFrom.cjs');
|
|
4
|
+
|
|
5
|
+
function normalizeDates(context, ...dates) {
|
|
6
|
+
const normalize = constructFrom.constructFrom.bind(
|
|
7
|
+
null,
|
|
8
|
+
context || dates.find((date) => typeof date === "object"),
|
|
9
|
+
);
|
|
10
|
+
return dates.map(normalize);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
exports.normalizeDates = normalizeDates;
|
|
14
|
+
//# sourceMappingURL=normalizeDates.cjs.map
|
package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/normalizeDates.cjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizeDates.cjs","sources":["../../../../../../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/normalizeDates.js"],"sourcesContent":["import { constructFrom } from \"../constructFrom.js\";\n\nexport function normalizeDates(context, ...dates) {\n const normalize = constructFrom.bind(\n null,\n context || dates.find((date) => typeof date === \"object\"),\n );\n return dates.map(normalize);\n}\n"],"names":["constructFrom"],"mappings":";;;;AAEO,SAAS,cAAc,CAAC,OAAO,EAAE,GAAG,KAAK,EAAE;AAClD,EAAE,MAAM,SAAS,GAAGA,2BAAa,CAAC,IAAI;AACtC,IAAI,IAAI;AACR,IAAI,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,OAAO,IAAI,KAAK,QAAQ,CAAC;AAC7D,GAAG;AACH,EAAE,OAAO,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC;AAC7B;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { constructFrom } from '../constructFrom.js';
|
|
2
|
+
|
|
3
|
+
function normalizeDates(context, ...dates) {
|
|
4
|
+
const normalize = constructFrom.bind(
|
|
5
|
+
null,
|
|
6
|
+
context || dates.find((date) => typeof date === "object"),
|
|
7
|
+
);
|
|
8
|
+
return dates.map(normalize);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { normalizeDates };
|
|
12
|
+
//# sourceMappingURL=normalizeDates.js.map
|
package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/normalizeDates.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizeDates.js","sources":["../../../../../../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/normalizeDates.js"],"sourcesContent":["import { constructFrom } from \"../constructFrom.js\";\n\nexport function normalizeDates(context, ...dates) {\n const normalize = constructFrom.bind(\n null,\n context || dates.find((date) => typeof date === \"object\"),\n );\n return dates.map(normalize);\n}\n"],"names":[],"mappings":";;AAEO,SAAS,cAAc,CAAC,OAAO,EAAE,GAAG,KAAK,EAAE;AAClD,EAAE,MAAM,SAAS,GAAG,aAAa,CAAC,IAAI;AACtC,IAAI,IAAI;AACR,IAAI,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,OAAO,IAAI,KAAK,QAAQ,CAAC;AAC7D,GAAG;AACH,EAAE,OAAO,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC;AAC7B;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @module constants
|
|
5
|
+
* @summary Useful constants
|
|
6
|
+
* @description
|
|
7
|
+
* Collection of useful date constants.
|
|
8
|
+
*
|
|
9
|
+
* The constants could be imported from `date-fns/constants`:
|
|
10
|
+
*
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { maxTime, minTime } from "./constants/date-fns/constants";
|
|
13
|
+
*
|
|
14
|
+
* function isAllowedTime(time) {
|
|
15
|
+
* return time <= maxTime && time >= minTime;
|
|
16
|
+
* }
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @constant
|
|
23
|
+
* @name constructFromSymbol
|
|
24
|
+
* @summary Symbol enabling Date extensions to inherit properties from the reference date.
|
|
25
|
+
*
|
|
26
|
+
* The symbol is used to enable the `constructFrom` function to construct a date
|
|
27
|
+
* using a reference date and a value. It allows to transfer extra properties
|
|
28
|
+
* from the reference date to the new date. It's useful for extensions like
|
|
29
|
+
* [`TZDate`](https://github.com/date-fns/tz) that accept a time zone as
|
|
30
|
+
* a constructor argument.
|
|
31
|
+
*/
|
|
32
|
+
const constructFromSymbol = Symbol.for("constructDateFrom");
|
|
33
|
+
|
|
34
|
+
exports.constructFromSymbol = constructFromSymbol;
|
|
35
|
+
//# sourceMappingURL=constants.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.cjs","sources":["../../../../../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constants.js"],"sourcesContent":["/**\n * @module constants\n * @summary Useful constants\n * @description\n * Collection of useful date constants.\n *\n * The constants could be imported from `date-fns/constants`:\n *\n * ```ts\n * import { maxTime, minTime } from \"./constants/date-fns/constants\";\n *\n * function isAllowedTime(time) {\n * return time <= maxTime && time >= minTime;\n * }\n * ```\n */\n\n/**\n * @constant\n * @name daysInWeek\n * @summary Days in 1 week.\n */\nexport const daysInWeek = 7;\n\n/**\n * @constant\n * @name daysInYear\n * @summary Days in 1 year.\n *\n * @description\n * How many days in a year.\n *\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occurs every 4 years, except for years that are divisible by 100 and not divisible by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n */\nexport const daysInYear = 365.2425;\n\n/**\n * @constant\n * @name maxTime\n * @summary Maximum allowed time.\n *\n * @example\n * import { maxTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = 8640000000000001 <= maxTime;\n * //=> false\n *\n * new Date(8640000000000001);\n * //=> Invalid Date\n */\nexport const maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n\n/**\n * @constant\n * @name minTime\n * @summary Minimum allowed time.\n *\n * @example\n * import { minTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = -8640000000000001 >= minTime;\n * //=> false\n *\n * new Date(-8640000000000001)\n * //=> Invalid Date\n */\nexport const minTime = -maxTime;\n\n/**\n * @constant\n * @name millisecondsInWeek\n * @summary Milliseconds in 1 week.\n */\nexport const millisecondsInWeek = 604800000;\n\n/**\n * @constant\n * @name millisecondsInDay\n * @summary Milliseconds in 1 day.\n */\nexport const millisecondsInDay = 86400000;\n\n/**\n * @constant\n * @name millisecondsInMinute\n * @summary Milliseconds in 1 minute\n */\nexport const millisecondsInMinute = 60000;\n\n/**\n * @constant\n * @name millisecondsInHour\n * @summary Milliseconds in 1 hour\n */\nexport const millisecondsInHour = 3600000;\n\n/**\n * @constant\n * @name millisecondsInSecond\n * @summary Milliseconds in 1 second\n */\nexport const millisecondsInSecond = 1000;\n\n/**\n * @constant\n * @name minutesInYear\n * @summary Minutes in 1 year.\n */\nexport const minutesInYear = 525600;\n\n/**\n * @constant\n * @name minutesInMonth\n * @summary Minutes in 1 month.\n */\nexport const minutesInMonth = 43200;\n\n/**\n * @constant\n * @name minutesInDay\n * @summary Minutes in 1 day.\n */\nexport const minutesInDay = 1440;\n\n/**\n * @constant\n * @name minutesInHour\n * @summary Minutes in 1 hour.\n */\nexport const minutesInHour = 60;\n\n/**\n * @constant\n * @name monthsInQuarter\n * @summary Months in 1 quarter.\n */\nexport const monthsInQuarter = 3;\n\n/**\n * @constant\n * @name monthsInYear\n * @summary Months in 1 year.\n */\nexport const monthsInYear = 12;\n\n/**\n * @constant\n * @name quartersInYear\n * @summary Quarters in 1 year\n */\nexport const quartersInYear = 4;\n\n/**\n * @constant\n * @name secondsInHour\n * @summary Seconds in 1 hour.\n */\nexport const secondsInHour = 3600;\n\n/**\n * @constant\n * @name secondsInMinute\n * @summary Seconds in 1 minute.\n */\nexport const secondsInMinute = 60;\n\n/**\n * @constant\n * @name secondsInDay\n * @summary Seconds in 1 day.\n */\nexport const secondsInDay = secondsInHour * 24;\n\n/**\n * @constant\n * @name secondsInWeek\n * @summary Seconds in 1 week.\n */\nexport const secondsInWeek = secondsInDay * 7;\n\n/**\n * @constant\n * @name secondsInYear\n * @summary Seconds in 1 year.\n */\nexport const secondsInYear = secondsInDay * daysInYear;\n\n/**\n * @constant\n * @name secondsInMonth\n * @summary Seconds in 1 month\n */\nexport const secondsInMonth = secondsInYear / 12;\n\n/**\n * @constant\n * @name secondsInQuarter\n * @summary Seconds in 1 quarter.\n */\nexport const secondsInQuarter = secondsInMonth * 3;\n\n/**\n * @constant\n * @name constructFromSymbol\n * @summary Symbol enabling Date extensions to inherit properties from the reference date.\n *\n * The symbol is used to enable the `constructFrom` function to construct a date\n * using a reference date and a value. It allows to transfer extra properties\n * from the reference date to the new date. It's useful for extensions like\n * [`TZDate`](https://github.com/date-fns/tz) that accept a time zone as\n * a constructor argument.\n */\nexport const constructFromSymbol = Symbol.for(\"constructDateFrom\");\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AA6LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAC,mBAAmB;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module constants
|
|
3
|
+
* @summary Useful constants
|
|
4
|
+
* @description
|
|
5
|
+
* Collection of useful date constants.
|
|
6
|
+
*
|
|
7
|
+
* The constants could be imported from `date-fns/constants`:
|
|
8
|
+
*
|
|
9
|
+
* ```ts
|
|
10
|
+
* import { maxTime, minTime } from "./constants/date-fns/constants";
|
|
11
|
+
*
|
|
12
|
+
* function isAllowedTime(time) {
|
|
13
|
+
* return time <= maxTime && time >= minTime;
|
|
14
|
+
* }
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @constant
|
|
21
|
+
* @name constructFromSymbol
|
|
22
|
+
* @summary Symbol enabling Date extensions to inherit properties from the reference date.
|
|
23
|
+
*
|
|
24
|
+
* The symbol is used to enable the `constructFrom` function to construct a date
|
|
25
|
+
* using a reference date and a value. It allows to transfer extra properties
|
|
26
|
+
* from the reference date to the new date. It's useful for extensions like
|
|
27
|
+
* [`TZDate`](https://github.com/date-fns/tz) that accept a time zone as
|
|
28
|
+
* a constructor argument.
|
|
29
|
+
*/
|
|
30
|
+
const constructFromSymbol = Symbol.for("constructDateFrom");
|
|
31
|
+
|
|
32
|
+
export { constructFromSymbol };
|
|
33
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constants.js"],"sourcesContent":["/**\n * @module constants\n * @summary Useful constants\n * @description\n * Collection of useful date constants.\n *\n * The constants could be imported from `date-fns/constants`:\n *\n * ```ts\n * import { maxTime, minTime } from \"./constants/date-fns/constants\";\n *\n * function isAllowedTime(time) {\n * return time <= maxTime && time >= minTime;\n * }\n * ```\n */\n\n/**\n * @constant\n * @name daysInWeek\n * @summary Days in 1 week.\n */\nexport const daysInWeek = 7;\n\n/**\n * @constant\n * @name daysInYear\n * @summary Days in 1 year.\n *\n * @description\n * How many days in a year.\n *\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occurs every 4 years, except for years that are divisible by 100 and not divisible by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n */\nexport const daysInYear = 365.2425;\n\n/**\n * @constant\n * @name maxTime\n * @summary Maximum allowed time.\n *\n * @example\n * import { maxTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = 8640000000000001 <= maxTime;\n * //=> false\n *\n * new Date(8640000000000001);\n * //=> Invalid Date\n */\nexport const maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n\n/**\n * @constant\n * @name minTime\n * @summary Minimum allowed time.\n *\n * @example\n * import { minTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = -8640000000000001 >= minTime;\n * //=> false\n *\n * new Date(-8640000000000001)\n * //=> Invalid Date\n */\nexport const minTime = -maxTime;\n\n/**\n * @constant\n * @name millisecondsInWeek\n * @summary Milliseconds in 1 week.\n */\nexport const millisecondsInWeek = 604800000;\n\n/**\n * @constant\n * @name millisecondsInDay\n * @summary Milliseconds in 1 day.\n */\nexport const millisecondsInDay = 86400000;\n\n/**\n * @constant\n * @name millisecondsInMinute\n * @summary Milliseconds in 1 minute\n */\nexport const millisecondsInMinute = 60000;\n\n/**\n * @constant\n * @name millisecondsInHour\n * @summary Milliseconds in 1 hour\n */\nexport const millisecondsInHour = 3600000;\n\n/**\n * @constant\n * @name millisecondsInSecond\n * @summary Milliseconds in 1 second\n */\nexport const millisecondsInSecond = 1000;\n\n/**\n * @constant\n * @name minutesInYear\n * @summary Minutes in 1 year.\n */\nexport const minutesInYear = 525600;\n\n/**\n * @constant\n * @name minutesInMonth\n * @summary Minutes in 1 month.\n */\nexport const minutesInMonth = 43200;\n\n/**\n * @constant\n * @name minutesInDay\n * @summary Minutes in 1 day.\n */\nexport const minutesInDay = 1440;\n\n/**\n * @constant\n * @name minutesInHour\n * @summary Minutes in 1 hour.\n */\nexport const minutesInHour = 60;\n\n/**\n * @constant\n * @name monthsInQuarter\n * @summary Months in 1 quarter.\n */\nexport const monthsInQuarter = 3;\n\n/**\n * @constant\n * @name monthsInYear\n * @summary Months in 1 year.\n */\nexport const monthsInYear = 12;\n\n/**\n * @constant\n * @name quartersInYear\n * @summary Quarters in 1 year\n */\nexport const quartersInYear = 4;\n\n/**\n * @constant\n * @name secondsInHour\n * @summary Seconds in 1 hour.\n */\nexport const secondsInHour = 3600;\n\n/**\n * @constant\n * @name secondsInMinute\n * @summary Seconds in 1 minute.\n */\nexport const secondsInMinute = 60;\n\n/**\n * @constant\n * @name secondsInDay\n * @summary Seconds in 1 day.\n */\nexport const secondsInDay = secondsInHour * 24;\n\n/**\n * @constant\n * @name secondsInWeek\n * @summary Seconds in 1 week.\n */\nexport const secondsInWeek = secondsInDay * 7;\n\n/**\n * @constant\n * @name secondsInYear\n * @summary Seconds in 1 year.\n */\nexport const secondsInYear = secondsInDay * daysInYear;\n\n/**\n * @constant\n * @name secondsInMonth\n * @summary Seconds in 1 month\n */\nexport const secondsInMonth = secondsInYear / 12;\n\n/**\n * @constant\n * @name secondsInQuarter\n * @summary Seconds in 1 quarter.\n */\nexport const secondsInQuarter = secondsInMonth * 3;\n\n/**\n * @constant\n * @name constructFromSymbol\n * @summary Symbol enabling Date extensions to inherit properties from the reference date.\n *\n * The symbol is used to enable the `constructFrom` function to construct a date\n * using a reference date and a value. It allows to transfer extra properties\n * from the reference date to the new date. It's useful for extensions like\n * [`TZDate`](https://github.com/date-fns/tz) that accept a time zone as\n * a constructor argument.\n */\nexport const constructFromSymbol = Symbol.for(\"constructDateFrom\");\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AA6LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAC,mBAAmB;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var constants = require('./constants.cjs');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @name constructFrom
|
|
9
|
+
* @category Generic Helpers
|
|
10
|
+
* @summary Constructs a date using the reference date and the value
|
|
11
|
+
*
|
|
12
|
+
* @description
|
|
13
|
+
* The function constructs a new date using the constructor from the reference
|
|
14
|
+
* date and the given value. It helps to build generic functions that accept
|
|
15
|
+
* date extensions.
|
|
16
|
+
*
|
|
17
|
+
* It defaults to `Date` if the passed reference date is a number or a string.
|
|
18
|
+
*
|
|
19
|
+
* Starting from v3.7.0, it allows to construct a date using `[Symbol.for("constructDateFrom")]`
|
|
20
|
+
* enabling to transfer extra properties from the reference date to the new date.
|
|
21
|
+
* It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)
|
|
22
|
+
* that accept a time zone as a constructor argument.
|
|
23
|
+
*
|
|
24
|
+
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
25
|
+
*
|
|
26
|
+
* @param date - The reference date to take constructor from
|
|
27
|
+
* @param value - The value to create the date
|
|
28
|
+
*
|
|
29
|
+
* @returns Date initialized using the given date and value
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* import { constructFrom } from "./constructFrom/date-fns";
|
|
33
|
+
*
|
|
34
|
+
* // A function that clones a date preserving the original type
|
|
35
|
+
* function cloneDate<DateType extends Date>(date: DateType): DateType {
|
|
36
|
+
* return constructFrom(
|
|
37
|
+
* date, // Use constructor from the given date
|
|
38
|
+
* date.getTime() // Use the date value to create a new date
|
|
39
|
+
* );
|
|
40
|
+
* }
|
|
41
|
+
*/
|
|
42
|
+
function constructFrom(date, value) {
|
|
43
|
+
if (typeof date === "function") return date(value);
|
|
44
|
+
|
|
45
|
+
if (date && typeof date === "object" && constants.constructFromSymbol in date)
|
|
46
|
+
return date[constants.constructFromSymbol](value);
|
|
47
|
+
|
|
48
|
+
if (date instanceof Date) return new date.constructor(value);
|
|
49
|
+
|
|
50
|
+
return new Date(value);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
exports.constructFrom = constructFrom;
|
|
54
|
+
exports.default = constructFrom;
|
|
55
|
+
//# sourceMappingURL=constructFrom.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constructFrom.cjs","sources":["../../../../../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constructFrom.js"],"sourcesContent":["import { constructFromSymbol } from \"./constants.js\";\n\n/**\n * @name constructFrom\n * @category Generic Helpers\n * @summary Constructs a date using the reference date and the value\n *\n * @description\n * The function constructs a new date using the constructor from the reference\n * date and the given value. It helps to build generic functions that accept\n * date extensions.\n *\n * It defaults to `Date` if the passed reference date is a number or a string.\n *\n * Starting from v3.7.0, it allows to construct a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The reference date to take constructor from\n * @param value - The value to create the date\n *\n * @returns Date initialized using the given date and value\n *\n * @example\n * import { constructFrom } from \"./constructFrom/date-fns\";\n *\n * // A function that clones a date preserving the original type\n * function cloneDate<DateType extends Date>(date: DateType): DateType {\n * return constructFrom(\n * date, // Use constructor from the given date\n * date.getTime() // Use the date value to create a new date\n * );\n * }\n */\nexport function constructFrom(date, value) {\n if (typeof date === \"function\") return date(value);\n\n if (date && typeof date === \"object\" && constructFromSymbol in date)\n return date[constructFromSymbol](value);\n\n if (date instanceof Date) return new date.constructor(value);\n\n return new Date(value);\n}\n\n// Fallback for modularized imports:\nexport default constructFrom;\n"],"names":["constructFromSymbol"],"mappings":";;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,aAAa,CAAC,IAAI,EAAE,KAAK,EAAE;AAC3C,EAAE,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC;;AAEpD,EAAE,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAIA,6BAAmB,IAAI,IAAI;AACrE,IAAI,OAAO,IAAI,CAACA,6BAAmB,CAAC,CAAC,KAAK,CAAC;;AAE3C,EAAE,IAAI,IAAI,YAAY,IAAI,EAAE,OAAO,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;;AAE9D,EAAE,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC;AACxB;;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { constructFromSymbol } from './constants.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @name constructFrom
|
|
5
|
+
* @category Generic Helpers
|
|
6
|
+
* @summary Constructs a date using the reference date and the value
|
|
7
|
+
*
|
|
8
|
+
* @description
|
|
9
|
+
* The function constructs a new date using the constructor from the reference
|
|
10
|
+
* date and the given value. It helps to build generic functions that accept
|
|
11
|
+
* date extensions.
|
|
12
|
+
*
|
|
13
|
+
* It defaults to `Date` if the passed reference date is a number or a string.
|
|
14
|
+
*
|
|
15
|
+
* Starting from v3.7.0, it allows to construct a date using `[Symbol.for("constructDateFrom")]`
|
|
16
|
+
* enabling to transfer extra properties from the reference date to the new date.
|
|
17
|
+
* It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)
|
|
18
|
+
* that accept a time zone as a constructor argument.
|
|
19
|
+
*
|
|
20
|
+
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
21
|
+
*
|
|
22
|
+
* @param date - The reference date to take constructor from
|
|
23
|
+
* @param value - The value to create the date
|
|
24
|
+
*
|
|
25
|
+
* @returns Date initialized using the given date and value
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* import { constructFrom } from "./constructFrom/date-fns";
|
|
29
|
+
*
|
|
30
|
+
* // A function that clones a date preserving the original type
|
|
31
|
+
* function cloneDate<DateType extends Date>(date: DateType): DateType {
|
|
32
|
+
* return constructFrom(
|
|
33
|
+
* date, // Use constructor from the given date
|
|
34
|
+
* date.getTime() // Use the date value to create a new date
|
|
35
|
+
* );
|
|
36
|
+
* }
|
|
37
|
+
*/
|
|
38
|
+
function constructFrom(date, value) {
|
|
39
|
+
if (typeof date === "function") return date(value);
|
|
40
|
+
|
|
41
|
+
if (date && typeof date === "object" && constructFromSymbol in date)
|
|
42
|
+
return date[constructFromSymbol](value);
|
|
43
|
+
|
|
44
|
+
if (date instanceof Date) return new date.constructor(value);
|
|
45
|
+
|
|
46
|
+
return new Date(value);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { constructFrom, constructFrom as default };
|
|
50
|
+
//# sourceMappingURL=constructFrom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constructFrom.js","sources":["../../../../../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constructFrom.js"],"sourcesContent":["import { constructFromSymbol } from \"./constants.js\";\n\n/**\n * @name constructFrom\n * @category Generic Helpers\n * @summary Constructs a date using the reference date and the value\n *\n * @description\n * The function constructs a new date using the constructor from the reference\n * date and the given value. It helps to build generic functions that accept\n * date extensions.\n *\n * It defaults to `Date` if the passed reference date is a number or a string.\n *\n * Starting from v3.7.0, it allows to construct a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The reference date to take constructor from\n * @param value - The value to create the date\n *\n * @returns Date initialized using the given date and value\n *\n * @example\n * import { constructFrom } from \"./constructFrom/date-fns\";\n *\n * // A function that clones a date preserving the original type\n * function cloneDate<DateType extends Date>(date: DateType): DateType {\n * return constructFrom(\n * date, // Use constructor from the given date\n * date.getTime() // Use the date value to create a new date\n * );\n * }\n */\nexport function constructFrom(date, value) {\n if (typeof date === \"function\") return date(value);\n\n if (date && typeof date === \"object\" && constructFromSymbol in date)\n return date[constructFromSymbol](value);\n\n if (date instanceof Date) return new date.constructor(value);\n\n return new Date(value);\n}\n\n// Fallback for modularized imports:\nexport default constructFrom;\n"],"names":[],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,aAAa,CAAC,IAAI,EAAE,KAAK,EAAE;AAC3C,EAAE,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC;;AAEpD,EAAE,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,mBAAmB,IAAI,IAAI;AACrE,IAAI,OAAO,IAAI,CAAC,mBAAmB,CAAC,CAAC,KAAK,CAAC;;AAE3C,EAAE,IAAI,IAAI,YAAY,IAAI,EAAE,OAAO,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;;AAE9D,EAAE,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC;AACxB;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var normalizeDates = require('./_lib/normalizeDates.cjs');
|
|
6
|
+
var startOfWeek = require('./startOfWeek.cjs');
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The {@link isSameWeek} function options.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @name isSameWeek
|
|
14
|
+
* @category Week Helpers
|
|
15
|
+
* @summary Are the given dates in the same week (and month and year)?
|
|
16
|
+
*
|
|
17
|
+
* @description
|
|
18
|
+
* Are the given dates in the same week (and month and year)?
|
|
19
|
+
*
|
|
20
|
+
* @param laterDate - The first date to check
|
|
21
|
+
* @param earlierDate - The second date to check
|
|
22
|
+
* @param options - An object with options
|
|
23
|
+
*
|
|
24
|
+
* @returns The dates are in the same week (and month and year)
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* // Are 31 August 2014 and 4 September 2014 in the same week?
|
|
28
|
+
* const result = isSameWeek(new Date(2014, 7, 31), new Date(2014, 8, 4))
|
|
29
|
+
* //=> true
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* // If week starts with Monday,
|
|
33
|
+
* // are 31 August 2014 and 4 September 2014 in the same week?
|
|
34
|
+
* const result = isSameWeek(new Date(2014, 7, 31), new Date(2014, 8, 4), {
|
|
35
|
+
* weekStartsOn: 1
|
|
36
|
+
* })
|
|
37
|
+
* //=> false
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* // Are 1 January 2014 and 1 January 2015 in the same week?
|
|
41
|
+
* const result = isSameWeek(new Date(2014, 0, 1), new Date(2015, 0, 1))
|
|
42
|
+
* //=> false
|
|
43
|
+
*/
|
|
44
|
+
function isSameWeek(laterDate, earlierDate, options) {
|
|
45
|
+
const [laterDate_, earlierDate_] = normalizeDates.normalizeDates(
|
|
46
|
+
options?.in,
|
|
47
|
+
laterDate,
|
|
48
|
+
earlierDate,
|
|
49
|
+
);
|
|
50
|
+
return (
|
|
51
|
+
+startOfWeek.startOfWeek(laterDate_, options) === +startOfWeek.startOfWeek(earlierDate_, options)
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
exports.default = isSameWeek;
|
|
56
|
+
exports.isSameWeek = isSameWeek;
|
|
57
|
+
//# sourceMappingURL=isSameWeek.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isSameWeek.cjs","sources":["../../../../../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isSameWeek.js"],"sourcesContent":["import { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link isSameWeek} function options.\n */\n\n/**\n * @name isSameWeek\n * @category Week Helpers\n * @summary Are the given dates in the same week (and month and year)?\n *\n * @description\n * Are the given dates in the same week (and month and year)?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n * @param options - An object with options\n *\n * @returns The dates are in the same week (and month and year)\n *\n * @example\n * // Are 31 August 2014 and 4 September 2014 in the same week?\n * const result = isSameWeek(new Date(2014, 7, 31), new Date(2014, 8, 4))\n * //=> true\n *\n * @example\n * // If week starts with Monday,\n * // are 31 August 2014 and 4 September 2014 in the same week?\n * const result = isSameWeek(new Date(2014, 7, 31), new Date(2014, 8, 4), {\n * weekStartsOn: 1\n * })\n * //=> false\n *\n * @example\n * // Are 1 January 2014 and 1 January 2015 in the same week?\n * const result = isSameWeek(new Date(2014, 0, 1), new Date(2015, 0, 1))\n * //=> false\n */\nexport function isSameWeek(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n return (\n +startOfWeek(laterDate_, options) === +startOfWeek(earlierDate_, options)\n );\n}\n\n// Fallback for modularized imports:\nexport default isSameWeek;\n"],"names":["normalizeDates","startOfWeek"],"mappings":";;;;;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,UAAU,CAAC,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE;AAC5D,EAAE,MAAM,CAAC,UAAU,EAAE,YAAY,CAAC,GAAGA,6BAAc;AACnD,IAAI,OAAO,EAAE,EAAE;AACf,IAAI,SAAS;AACb,IAAI,WAAW;AACf,GAAG;AACH,EAAE;AACF,IAAI,CAACC,uBAAW,CAAC,UAAU,EAAE,OAAO,CAAC,KAAK,CAACA,uBAAW,CAAC,YAAY,EAAE,OAAO;AAC5E;AACA;;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { normalizeDates } from './_lib/normalizeDates.js';
|
|
2
|
+
import { startOfWeek } from './startOfWeek.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The {@link isSameWeek} function options.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @name isSameWeek
|
|
10
|
+
* @category Week Helpers
|
|
11
|
+
* @summary Are the given dates in the same week (and month and year)?
|
|
12
|
+
*
|
|
13
|
+
* @description
|
|
14
|
+
* Are the given dates in the same week (and month and year)?
|
|
15
|
+
*
|
|
16
|
+
* @param laterDate - The first date to check
|
|
17
|
+
* @param earlierDate - The second date to check
|
|
18
|
+
* @param options - An object with options
|
|
19
|
+
*
|
|
20
|
+
* @returns The dates are in the same week (and month and year)
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* // Are 31 August 2014 and 4 September 2014 in the same week?
|
|
24
|
+
* const result = isSameWeek(new Date(2014, 7, 31), new Date(2014, 8, 4))
|
|
25
|
+
* //=> true
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* // If week starts with Monday,
|
|
29
|
+
* // are 31 August 2014 and 4 September 2014 in the same week?
|
|
30
|
+
* const result = isSameWeek(new Date(2014, 7, 31), new Date(2014, 8, 4), {
|
|
31
|
+
* weekStartsOn: 1
|
|
32
|
+
* })
|
|
33
|
+
* //=> false
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* // Are 1 January 2014 and 1 January 2015 in the same week?
|
|
37
|
+
* const result = isSameWeek(new Date(2014, 0, 1), new Date(2015, 0, 1))
|
|
38
|
+
* //=> false
|
|
39
|
+
*/
|
|
40
|
+
function isSameWeek(laterDate, earlierDate, options) {
|
|
41
|
+
const [laterDate_, earlierDate_] = normalizeDates(
|
|
42
|
+
options?.in,
|
|
43
|
+
laterDate,
|
|
44
|
+
earlierDate,
|
|
45
|
+
);
|
|
46
|
+
return (
|
|
47
|
+
+startOfWeek(laterDate_, options) === +startOfWeek(earlierDate_, options)
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export { isSameWeek as default, isSameWeek };
|
|
52
|
+
//# sourceMappingURL=isSameWeek.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isSameWeek.js","sources":["../../../../../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isSameWeek.js"],"sourcesContent":["import { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link isSameWeek} function options.\n */\n\n/**\n * @name isSameWeek\n * @category Week Helpers\n * @summary Are the given dates in the same week (and month and year)?\n *\n * @description\n * Are the given dates in the same week (and month and year)?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n * @param options - An object with options\n *\n * @returns The dates are in the same week (and month and year)\n *\n * @example\n * // Are 31 August 2014 and 4 September 2014 in the same week?\n * const result = isSameWeek(new Date(2014, 7, 31), new Date(2014, 8, 4))\n * //=> true\n *\n * @example\n * // If week starts with Monday,\n * // are 31 August 2014 and 4 September 2014 in the same week?\n * const result = isSameWeek(new Date(2014, 7, 31), new Date(2014, 8, 4), {\n * weekStartsOn: 1\n * })\n * //=> false\n *\n * @example\n * // Are 1 January 2014 and 1 January 2015 in the same week?\n * const result = isSameWeek(new Date(2014, 0, 1), new Date(2015, 0, 1))\n * //=> false\n */\nexport function isSameWeek(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n return (\n +startOfWeek(laterDate_, options) === +startOfWeek(earlierDate_, options)\n );\n}\n\n// Fallback for modularized imports:\nexport default isSameWeek;\n"],"names":[],"mappings":";;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,UAAU,CAAC,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE;AAC5D,EAAE,MAAM,CAAC,UAAU,EAAE,YAAY,CAAC,GAAG,cAAc;AACnD,IAAI,OAAO,EAAE,EAAE;AACf,IAAI,SAAS;AACb,IAAI,WAAW;AACf,GAAG;AACH,EAAE;AACF,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,YAAY,EAAE,OAAO;AAC5E;AACA;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function buildFormatLongFn(args) {
|
|
4
|
+
return (options = {}) => {
|
|
5
|
+
// TODO: Remove String()
|
|
6
|
+
const width = options.width ? String(options.width) : args.defaultWidth;
|
|
7
|
+
const format = args.formats[width] || args.formats[args.defaultWidth];
|
|
8
|
+
return format;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
exports.buildFormatLongFn = buildFormatLongFn;
|
|
13
|
+
//# sourceMappingURL=buildFormatLongFn.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildFormatLongFn.cjs","sources":["../../../../../../../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js"],"sourcesContent":["export function buildFormatLongFn(args) {\n return (options = {}) => {\n // TODO: Remove String()\n const width = options.width ? String(options.width) : args.defaultWidth;\n const format = args.formats[width] || args.formats[args.defaultWidth];\n return format;\n };\n}\n"],"names":[],"mappings":";;AAAO,SAAS,iBAAiB,CAAC,IAAI,EAAE;AACxC,EAAE,OAAO,CAAC,OAAO,GAAG,EAAE,KAAK;AAC3B;AACA,IAAI,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,YAAY;AAC3E,IAAI,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC;AACzE,IAAI,OAAO,MAAM;AACjB,EAAE,CAAC;AACH;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
function buildFormatLongFn(args) {
|
|
2
|
+
return (options = {}) => {
|
|
3
|
+
// TODO: Remove String()
|
|
4
|
+
const width = options.width ? String(options.width) : args.defaultWidth;
|
|
5
|
+
const format = args.formats[width] || args.formats[args.defaultWidth];
|
|
6
|
+
return format;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { buildFormatLongFn };
|
|
11
|
+
//# sourceMappingURL=buildFormatLongFn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildFormatLongFn.js","sources":["../../../../../../../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js"],"sourcesContent":["export function buildFormatLongFn(args) {\n return (options = {}) => {\n // TODO: Remove String()\n const width = options.width ? String(options.width) : args.defaultWidth;\n const format = args.formats[width] || args.formats[args.defaultWidth];\n return format;\n };\n}\n"],"names":[],"mappings":"AAAO,SAAS,iBAAiB,CAAC,IAAI,EAAE;AACxC,EAAE,OAAO,CAAC,OAAO,GAAG,EAAE,KAAK;AAC3B;AACA,IAAI,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,YAAY;AAC3E,IAAI,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC;AACzE,IAAI,OAAO,MAAM;AACjB,EAAE,CAAC;AACH;;;;","x_google_ignoreList":[0]}
|
package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.cjs
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The localize function argument callback which allows to convert raw value to
|
|
5
|
+
* the actual type.
|
|
6
|
+
*
|
|
7
|
+
* @param value - The value to convert
|
|
8
|
+
*
|
|
9
|
+
* @returns The converted value
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The map of localized values for each width.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The index type of the locale unit value. It types conversion of units of
|
|
18
|
+
* values that don't start at 0 (i.e. quarters).
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Converts the unit value to the tuple of values.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The tuple of localized era values. The first element represents BC,
|
|
27
|
+
* the second element represents AD.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The tuple of localized quarter values. The first element represents Q1.
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The tuple of localized day values. The first element represents Sunday.
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* The tuple of localized month values. The first element represents January.
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
function buildLocalizeFn(args) {
|
|
43
|
+
return (value, options) => {
|
|
44
|
+
const context = options?.context ? String(options.context) : "standalone";
|
|
45
|
+
|
|
46
|
+
let valuesArray;
|
|
47
|
+
if (context === "formatting" && args.formattingValues) {
|
|
48
|
+
const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
49
|
+
const width = options?.width ? String(options.width) : defaultWidth;
|
|
50
|
+
|
|
51
|
+
valuesArray =
|
|
52
|
+
args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
53
|
+
} else {
|
|
54
|
+
const defaultWidth = args.defaultWidth;
|
|
55
|
+
const width = options?.width ? String(options.width) : args.defaultWidth;
|
|
56
|
+
|
|
57
|
+
valuesArray = args.values[width] || args.values[defaultWidth];
|
|
58
|
+
}
|
|
59
|
+
const index = args.argumentCallback ? args.argumentCallback(value) : value;
|
|
60
|
+
|
|
61
|
+
// @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!
|
|
62
|
+
return valuesArray[index];
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
exports.buildLocalizeFn = buildLocalizeFn;
|
|
67
|
+
//# sourceMappingURL=buildLocalizeFn.cjs.map
|