javascript-time-ago 2.6.2 → 2.6.4
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/CHANGELOG.md +5 -0
- package/README.md +19 -24
- package/bundle/javascript-time-ago.js +1 -1
- package/bundle/javascript-time-ago.js.map +1 -1
- package/bundle/javascript-time-ago.min.js +1 -1
- package/bundle/javascript-time-ago.min.js.map +1 -1
- package/commonjs/FullDateFormatter.test.js +11 -9
- package/commonjs/FullDateFormatter.test.js.map +1 -1
- package/commonjs/TimeAgo.js +1 -0
- package/commonjs/TimeAgo.js.map +1 -1
- package/commonjs/TimeAgo.test.js +249 -236
- package/commonjs/TimeAgo.test.js.map +1 -1
- package/commonjs/cache.test.js +8 -6
- package/commonjs/cache.test.js.map +1 -1
- package/commonjs/isStyleObject.test.js +21 -19
- package/commonjs/isStyleObject.test.js.map +1 -1
- package/commonjs/locale.test.js +16 -14
- package/commonjs/locale.test.js.map +1 -1
- package/commonjs/steps/approximate.test.js +26 -24
- package/commonjs/steps/approximate.test.js.map +1 -1
- package/commonjs/steps/getStep.test.js +20 -18
- package/commonjs/steps/getStep.test.js.map +1 -1
- package/commonjs/steps/getStepDenominator.test.js +9 -7
- package/commonjs/steps/getStepDenominator.test.js.map +1 -1
- package/commonjs/steps/getStepMinTime.test.js +9 -7
- package/commonjs/steps/getStepMinTime.test.js.map +1 -1
- package/commonjs/steps/getTimeToNextUpdate.test.js +56 -54
- package/commonjs/steps/getTimeToNextUpdate.test.js.map +1 -1
- package/commonjs/steps/getTimeToNextUpdateForUnit.test.js +20 -18
- package/commonjs/steps/getTimeToNextUpdateForUnit.test.js.map +1 -1
- package/commonjs/steps/helpers.test.js +6 -4
- package/commonjs/steps/helpers.test.js.map +1 -1
- package/commonjs/steps/renameLegacyProperties.test.js +12 -10
- package/commonjs/steps/renameLegacyProperties.test.js.map +1 -1
- package/commonjs/steps/round.test.js +27 -25
- package/commonjs/steps/round.test.js.map +1 -1
- package/commonjs/style/approximateTime.test.js +6 -5
- package/commonjs/style/approximateTime.test.js.map +1 -1
- package/commonjs/style/mini.test.js +62 -60
- package/commonjs/style/mini.test.js.map +1 -1
- package/commonjs/style/miniMinute.test.js +27 -25
- package/commonjs/style/miniMinute.test.js.map +1 -1
- package/commonjs/style/miniMinuteNow.test.js +27 -25
- package/commonjs/style/miniMinuteNow.test.js.map +1 -1
- package/commonjs/style/miniNow.test.js +27 -25
- package/commonjs/style/miniNow.test.js.map +1 -1
- package/commonjs/style/renameLegacyProperties.test.js +9 -7
- package/commonjs/style/renameLegacyProperties.test.js.map +1 -1
- package/commonjs/style/round.test.js +81 -79
- package/commonjs/style/round.test.js.map +1 -1
- package/commonjs/style/roundMinute.test.js +50 -48
- package/commonjs/style/roundMinute.test.js.map +1 -1
- package/commonjs/style/twitter.test.js +86 -84
- package/commonjs/style/twitter.test.js.map +1 -1
- package/commonjs/style/twitterFirstMinute.test.js +33 -31
- package/commonjs/style/twitterFirstMinute.test.js.map +1 -1
- package/commonjs/style/twitterMinute.test.js +32 -30
- package/commonjs/style/twitterMinute.test.js.map +1 -1
- package/commonjs/style/twitterMinuteNow.test.js +32 -30
- package/commonjs/style/twitterMinuteNow.test.js.map +1 -1
- package/commonjs/style/twitterNow.test.js +34 -32
- package/commonjs/style/twitterNow.test.js.map +1 -1
- package/load-all-locales/index.cjs +15 -0
- package/load-all-locales/index.cjs.js +15 -0
- package/load-all-locales/index.d.ts +0 -0
- package/load-all-locales/index.js +30 -0
- package/locale/af/index.cjs +7 -0
- package/locale/af/index.js +6 -0
- package/locale/af/package.json +5 -5
- package/locale/ak/index.cjs +7 -0
- package/locale/ak/index.js +6 -0
- package/locale/ak/package.json +5 -5
- package/locale/ak.json +8 -26
- package/locale/ak.json.js +8 -26
- package/locale/am/index.cjs +7 -0
- package/locale/am/index.js +6 -0
- package/locale/am/package.json +5 -5
- package/locale/am.json +3 -3
- package/locale/am.json.js +3 -3
- package/locale/ar/index.cjs +7 -0
- package/locale/ar/index.js +6 -0
- package/locale/ar/package.json +5 -5
- package/locale/ar-AE/index.cjs +7 -0
- package/locale/ar-AE/index.js +6 -0
- package/locale/ar-AE/package.json +5 -5
- package/locale/as/index.cjs +7 -0
- package/locale/as/index.js +6 -0
- package/locale/as/package.json +5 -5
- package/locale/ast/index.cjs +7 -0
- package/locale/ast/index.js +6 -0
- package/locale/ast/package.json +5 -5
- package/locale/az/index.cjs +7 -0
- package/locale/az/index.js +6 -0
- package/locale/az/package.json +5 -5
- package/locale/ba/index.cjs +7 -0
- package/locale/ba/index.js +6 -0
- package/locale/ba/package.json +16 -0
- package/locale/ba.json +159 -0
- package/locale/ba.json.d.ts +4 -0
- package/locale/ba.json.js +159 -0
- package/locale/bal-Latn/index.cjs +7 -0
- package/locale/bal-Latn/index.js +6 -0
- package/locale/bal-Latn/package.json +5 -5
- package/locale/be/index.cjs +7 -0
- package/locale/be/index.js +6 -0
- package/locale/be/package.json +5 -5
- package/locale/be-tarask/index.cjs +7 -0
- package/locale/be-tarask/index.js +6 -0
- package/locale/be-tarask/package.json +5 -5
- package/locale/be-tarask.json +4 -4
- package/locale/be-tarask.json.js +4 -4
- package/locale/be.json +4 -4
- package/locale/be.json.js +4 -4
- package/locale/bg/index.cjs +7 -0
- package/locale/bg/index.js +6 -0
- package/locale/bg/package.json +5 -5
- package/locale/bgc/index.cjs +7 -0
- package/locale/bgc/index.js +6 -0
- package/locale/bgc/package.json +5 -5
- package/locale/blo/index.cjs +7 -0
- package/locale/blo/index.js +6 -0
- package/locale/blo/package.json +5 -5
- package/locale/bn/index.cjs +7 -0
- package/locale/bn/index.js +6 -0
- package/locale/bn/package.json +5 -5
- package/locale/bn.json +6 -6
- package/locale/bn.json.js +6 -6
- package/locale/br/index.cjs +7 -0
- package/locale/br/index.js +6 -0
- package/locale/br/package.json +5 -5
- package/locale/brx/index.cjs +7 -0
- package/locale/brx/index.js +6 -0
- package/locale/brx/package.json +5 -5
- package/locale/bs/index.cjs +7 -0
- package/locale/bs/index.js +6 -0
- package/locale/bs/package.json +5 -5
- package/locale/bs-Cyrl/index.cjs +7 -0
- package/locale/bs-Cyrl/index.js +6 -0
- package/locale/bs-Cyrl/package.json +5 -5
- package/locale/bs.json +36 -30
- package/locale/bs.json.js +36 -30
- package/locale/bua/index.cjs +7 -0
- package/locale/bua/index.js +6 -0
- package/locale/bua/package.json +16 -0
- package/locale/bua.json +159 -0
- package/locale/bua.json.d.ts +4 -0
- package/locale/bua.json.js +159 -0
- package/locale/ca/index.cjs +7 -0
- package/locale/ca/index.js +6 -0
- package/locale/ca/package.json +5 -5
- package/locale/ccp/index.cjs +7 -0
- package/locale/ccp/index.js +6 -0
- package/locale/ccp/package.json +5 -5
- package/locale/ce/index.cjs +7 -0
- package/locale/ce/index.js +6 -0
- package/locale/ce/package.json +5 -5
- package/locale/ceb/index.cjs +7 -0
- package/locale/ceb/index.js +6 -0
- package/locale/ceb/package.json +5 -5
- package/locale/chr/index.cjs +7 -0
- package/locale/chr/index.js +6 -0
- package/locale/chr/package.json +5 -5
- package/locale/cs/index.cjs +7 -0
- package/locale/cs/index.js +6 -0
- package/locale/cs/package.json +5 -5
- package/locale/csw/index.cjs +7 -0
- package/locale/csw/index.js +6 -0
- package/locale/csw/package.json +5 -5
- package/locale/cv/index.cjs +7 -0
- package/locale/cv/index.js +6 -0
- package/locale/cv/package.json +5 -5
- package/locale/cv.json +134 -82
- package/locale/cv.json.js +134 -82
- package/locale/cy/index.cjs +7 -0
- package/locale/cy/index.js +6 -0
- package/locale/cy/package.json +5 -5
- package/locale/da/index.cjs +7 -0
- package/locale/da/index.js +6 -0
- package/locale/da/package.json +5 -5
- package/locale/de/index.cjs +7 -0
- package/locale/de/index.js +6 -0
- package/locale/de/package.json +5 -5
- package/locale/doi/index.cjs +7 -0
- package/locale/doi/index.js +6 -0
- package/locale/doi/package.json +5 -5
- package/locale/dsb/index.cjs +7 -0
- package/locale/dsb/index.js +6 -0
- package/locale/dsb/package.json +5 -5
- package/locale/dz/index.cjs +7 -0
- package/locale/dz/index.js +6 -0
- package/locale/dz/package.json +5 -5
- package/locale/ee/index.cjs +7 -0
- package/locale/ee/index.js +6 -0
- package/locale/ee/package.json +5 -5
- package/locale/el/index.cjs +7 -0
- package/locale/el/index.js +6 -0
- package/locale/el/package.json +5 -5
- package/locale/en/index.cjs +7 -0
- package/locale/en/index.js +6 -0
- package/locale/en/package.json +5 -5
- package/locale/en-001/index.cjs +7 -0
- package/locale/en-001/index.js +6 -0
- package/locale/en-001/package.json +5 -5
- package/locale/en-150/index.cjs +7 -0
- package/locale/en-150/index.js +6 -0
- package/locale/en-150/package.json +5 -5
- package/locale/en-AG/index.cjs +7 -0
- package/locale/en-AG/index.js +6 -0
- package/locale/en-AG/package.json +5 -5
- package/locale/en-AI/index.cjs +7 -0
- package/locale/en-AI/index.js +6 -0
- package/locale/en-AI/package.json +5 -5
- package/locale/en-AT/index.cjs +7 -0
- package/locale/en-AT/index.js +6 -0
- package/locale/en-AT/package.json +5 -5
- package/locale/en-AU/index.cjs +7 -0
- package/locale/en-AU/index.js +6 -0
- package/locale/en-AU/package.json +5 -5
- package/locale/en-BB/index.cjs +7 -0
- package/locale/en-BB/index.js +6 -0
- package/locale/en-BB/package.json +5 -5
- package/locale/en-BE/index.cjs +7 -0
- package/locale/en-BE/index.js +6 -0
- package/locale/en-BE/package.json +5 -5
- package/locale/en-BM/index.cjs +7 -0
- package/locale/en-BM/index.js +6 -0
- package/locale/en-BM/package.json +5 -5
- package/locale/en-BS/index.cjs +7 -0
- package/locale/en-BS/index.js +6 -0
- package/locale/en-BS/package.json +5 -5
- package/locale/en-BW/index.cjs +7 -0
- package/locale/en-BW/index.js +6 -0
- package/locale/en-BW/package.json +5 -5
- package/locale/en-BZ/index.cjs +7 -0
- package/locale/en-BZ/index.js +6 -0
- package/locale/en-BZ/package.json +5 -5
- package/locale/en-CA/index.cjs +7 -0
- package/locale/en-CA/index.js +6 -0
- package/locale/en-CA/package.json +5 -5
- package/locale/en-CC/index.cjs +7 -0
- package/locale/en-CC/index.js +6 -0
- package/locale/en-CC/package.json +5 -5
- package/locale/en-CH/index.cjs +7 -0
- package/locale/en-CH/index.js +6 -0
- package/locale/en-CH/package.json +5 -5
- package/locale/en-CK/index.cjs +7 -0
- package/locale/en-CK/index.js +6 -0
- package/locale/en-CK/package.json +5 -5
- package/locale/en-CM/index.cjs +7 -0
- package/locale/en-CM/index.js +6 -0
- package/locale/en-CM/package.json +5 -5
- package/locale/en-CX/index.cjs +7 -0
- package/locale/en-CX/index.js +6 -0
- package/locale/en-CX/package.json +5 -5
- package/locale/en-CY/index.cjs +7 -0
- package/locale/en-CY/index.js +6 -0
- package/locale/en-CY/package.json +5 -5
- package/locale/en-CZ/index.cjs +7 -0
- package/locale/en-CZ/index.js +6 -0
- package/locale/en-CZ/package.json +5 -5
- package/locale/en-DE/index.cjs +7 -0
- package/locale/en-DE/index.js +6 -0
- package/locale/en-DE/package.json +5 -5
- package/locale/en-DG/index.cjs +7 -0
- package/locale/en-DG/index.js +6 -0
- package/locale/en-DG/package.json +5 -5
- package/locale/en-DK/index.cjs +7 -0
- package/locale/en-DK/index.js +6 -0
- package/locale/en-DK/package.json +5 -5
- package/locale/en-DM/index.cjs +7 -0
- package/locale/en-DM/index.js +6 -0
- package/locale/en-DM/package.json +5 -5
- package/locale/en-EE/index.cjs +7 -0
- package/locale/en-EE/index.js +6 -0
- package/locale/en-EE/package.json +16 -0
- package/locale/en-EE.json +219 -0
- package/locale/en-EE.json.d.ts +4 -0
- package/locale/en-EE.json.js +219 -0
- package/locale/en-ER/index.cjs +7 -0
- package/locale/en-ER/index.js +6 -0
- package/locale/en-ER/package.json +5 -5
- package/locale/en-ES/index.cjs +7 -0
- package/locale/en-ES/index.js +6 -0
- package/locale/en-ES/package.json +5 -5
- package/locale/en-FI/index.cjs +7 -0
- package/locale/en-FI/index.js +6 -0
- package/locale/en-FI/package.json +5 -5
- package/locale/en-FJ/index.cjs +7 -0
- package/locale/en-FJ/index.js +6 -0
- package/locale/en-FJ/package.json +5 -5
- package/locale/en-FK/index.cjs +7 -0
- package/locale/en-FK/index.js +6 -0
- package/locale/en-FK/package.json +5 -5
- package/locale/en-FM/index.cjs +7 -0
- package/locale/en-FM/index.js +6 -0
- package/locale/en-FM/package.json +5 -5
- package/locale/en-FR/index.cjs +7 -0
- package/locale/en-FR/index.js +6 -0
- package/locale/en-FR/package.json +5 -5
- package/locale/en-GB/index.cjs +7 -0
- package/locale/en-GB/index.js +6 -0
- package/locale/en-GB/package.json +5 -5
- package/locale/en-GD/index.cjs +7 -0
- package/locale/en-GD/index.js +6 -0
- package/locale/en-GD/package.json +5 -5
- package/locale/en-GE/index.cjs +7 -0
- package/locale/en-GE/index.js +6 -0
- package/locale/en-GE/package.json +16 -0
- package/locale/en-GE.json +219 -0
- package/locale/en-GE.json.d.ts +4 -0
- package/locale/en-GE.json.js +219 -0
- package/locale/en-GG/index.cjs +7 -0
- package/locale/en-GG/index.js +6 -0
- package/locale/en-GG/package.json +5 -5
- package/locale/en-GH/index.cjs +7 -0
- package/locale/en-GH/index.js +6 -0
- package/locale/en-GH/package.json +5 -5
- package/locale/en-GI/index.cjs +7 -0
- package/locale/en-GI/index.js +6 -0
- package/locale/en-GI/package.json +5 -5
- package/locale/en-GM/index.cjs +7 -0
- package/locale/en-GM/index.js +6 -0
- package/locale/en-GM/package.json +5 -5
- package/locale/en-GS/index.cjs +7 -0
- package/locale/en-GS/index.js +6 -0
- package/locale/en-GS/package.json +5 -5
- package/locale/en-GY/index.cjs +7 -0
- package/locale/en-GY/index.js +6 -0
- package/locale/en-GY/package.json +5 -5
- package/locale/en-HK/index.cjs +7 -0
- package/locale/en-HK/index.js +6 -0
- package/locale/en-HK/package.json +5 -5
- package/locale/en-HU/index.cjs +7 -0
- package/locale/en-HU/index.js +6 -0
- package/locale/en-HU/package.json +5 -5
- package/locale/en-ID/index.cjs +7 -0
- package/locale/en-ID/index.js +6 -0
- package/locale/en-ID/package.json +5 -5
- package/locale/en-IE/index.cjs +7 -0
- package/locale/en-IE/index.js +6 -0
- package/locale/en-IE/package.json +5 -5
- package/locale/en-IL/index.cjs +7 -0
- package/locale/en-IL/index.js +6 -0
- package/locale/en-IL/package.json +5 -5
- package/locale/en-IM/index.cjs +7 -0
- package/locale/en-IM/index.js +6 -0
- package/locale/en-IM/package.json +5 -5
- package/locale/en-IN/index.cjs +7 -0
- package/locale/en-IN/index.js +6 -0
- package/locale/en-IN/package.json +5 -5
- package/locale/en-IO/index.cjs +7 -0
- package/locale/en-IO/index.js +6 -0
- package/locale/en-IO/package.json +5 -5
- package/locale/en-IT/index.cjs +7 -0
- package/locale/en-IT/index.js +6 -0
- package/locale/en-IT/package.json +5 -5
- package/locale/en-JE/index.cjs +7 -0
- package/locale/en-JE/index.js +6 -0
- package/locale/en-JE/package.json +5 -5
- package/locale/en-JM/index.cjs +7 -0
- package/locale/en-JM/index.js +6 -0
- package/locale/en-JM/package.json +5 -5
- package/locale/en-KE/index.cjs +7 -0
- package/locale/en-KE/index.js +6 -0
- package/locale/en-KE/package.json +5 -5
- package/locale/en-KI/index.cjs +7 -0
- package/locale/en-KI/index.js +6 -0
- package/locale/en-KI/package.json +5 -5
- package/locale/en-KN/index.cjs +7 -0
- package/locale/en-KN/index.js +6 -0
- package/locale/en-KN/package.json +5 -5
- package/locale/en-KY/index.cjs +7 -0
- package/locale/en-KY/index.js +6 -0
- package/locale/en-KY/package.json +5 -5
- package/locale/en-LC/index.cjs +7 -0
- package/locale/en-LC/index.js +6 -0
- package/locale/en-LC/package.json +5 -5
- package/locale/en-LR/index.cjs +7 -0
- package/locale/en-LR/index.js +6 -0
- package/locale/en-LR/package.json +5 -5
- package/locale/en-LS/index.cjs +7 -0
- package/locale/en-LS/index.js +6 -0
- package/locale/en-LS/package.json +5 -5
- package/locale/en-LT/index.cjs +7 -0
- package/locale/en-LT/index.js +6 -0
- package/locale/en-LT/package.json +16 -0
- package/locale/en-LT.json +219 -0
- package/locale/en-LT.json.d.ts +4 -0
- package/locale/en-LT.json.js +219 -0
- package/locale/en-LV/index.cjs +7 -0
- package/locale/en-LV/index.js +6 -0
- package/locale/en-LV/package.json +16 -0
- package/locale/en-LV.json +219 -0
- package/locale/en-LV.json.d.ts +4 -0
- package/locale/en-LV.json.js +219 -0
- package/locale/en-MG/index.cjs +7 -0
- package/locale/en-MG/index.js +6 -0
- package/locale/en-MG/package.json +5 -5
- package/locale/en-MO/index.cjs +7 -0
- package/locale/en-MO/index.js +6 -0
- package/locale/en-MO/package.json +5 -5
- package/locale/en-MS/index.cjs +7 -0
- package/locale/en-MS/index.js +6 -0
- package/locale/en-MS/package.json +5 -5
- package/locale/en-MT/index.cjs +7 -0
- package/locale/en-MT/index.js +6 -0
- package/locale/en-MT/package.json +5 -5
- package/locale/en-MU/index.cjs +7 -0
- package/locale/en-MU/index.js +6 -0
- package/locale/en-MU/package.json +5 -5
- package/locale/en-MV/index.cjs +7 -0
- package/locale/en-MV/index.js +6 -0
- package/locale/en-MV/package.json +5 -5
- package/locale/en-MW/index.cjs +7 -0
- package/locale/en-MW/index.js +6 -0
- package/locale/en-MW/package.json +5 -5
- package/locale/en-MY/index.cjs +7 -0
- package/locale/en-MY/index.js +6 -0
- package/locale/en-MY/package.json +5 -5
- package/locale/en-NA/index.cjs +7 -0
- package/locale/en-NA/index.js +6 -0
- package/locale/en-NA/package.json +5 -5
- package/locale/en-NF/index.cjs +7 -0
- package/locale/en-NF/index.js +6 -0
- package/locale/en-NF/package.json +5 -5
- package/locale/en-NG/index.cjs +7 -0
- package/locale/en-NG/index.js +6 -0
- package/locale/en-NG/package.json +5 -5
- package/locale/en-NL/index.cjs +7 -0
- package/locale/en-NL/index.js +6 -0
- package/locale/en-NL/package.json +5 -5
- package/locale/en-NO/index.cjs +7 -0
- package/locale/en-NO/index.js +6 -0
- package/locale/en-NO/package.json +5 -5
- package/locale/en-NR/index.cjs +7 -0
- package/locale/en-NR/index.js +6 -0
- package/locale/en-NR/package.json +5 -5
- package/locale/en-NU/index.cjs +7 -0
- package/locale/en-NU/index.js +6 -0
- package/locale/en-NU/package.json +5 -5
- package/locale/en-NZ/index.cjs +7 -0
- package/locale/en-NZ/index.js +6 -0
- package/locale/en-NZ/package.json +5 -5
- package/locale/en-PG/index.cjs +7 -0
- package/locale/en-PG/index.js +6 -0
- package/locale/en-PG/package.json +5 -5
- package/locale/en-PK/index.cjs +7 -0
- package/locale/en-PK/index.js +6 -0
- package/locale/en-PK/package.json +5 -5
- package/locale/en-PL/index.cjs +7 -0
- package/locale/en-PL/index.js +6 -0
- package/locale/en-PL/package.json +5 -5
- package/locale/en-PN/index.cjs +7 -0
- package/locale/en-PN/index.js +6 -0
- package/locale/en-PN/package.json +5 -5
- package/locale/en-PT/index.cjs +7 -0
- package/locale/en-PT/index.js +6 -0
- package/locale/en-PT/package.json +5 -5
- package/locale/en-PW/index.cjs +7 -0
- package/locale/en-PW/index.js +6 -0
- package/locale/en-PW/package.json +5 -5
- package/locale/en-RO/index.cjs +7 -0
- package/locale/en-RO/index.js +6 -0
- package/locale/en-RO/package.json +5 -5
- package/locale/en-RW/index.cjs +7 -0
- package/locale/en-RW/index.js +6 -0
- package/locale/en-RW/package.json +5 -5
- package/locale/en-SB/index.cjs +7 -0
- package/locale/en-SB/index.js +6 -0
- package/locale/en-SB/package.json +5 -5
- package/locale/en-SC/index.cjs +7 -0
- package/locale/en-SC/index.js +6 -0
- package/locale/en-SC/package.json +5 -5
- package/locale/en-SD/index.cjs +7 -0
- package/locale/en-SD/index.js +6 -0
- package/locale/en-SD/package.json +5 -5
- package/locale/en-SE/index.cjs +7 -0
- package/locale/en-SE/index.js +6 -0
- package/locale/en-SE/package.json +5 -5
- package/locale/en-SG/index.cjs +7 -0
- package/locale/en-SG/index.js +6 -0
- package/locale/en-SG/package.json +5 -5
- package/locale/en-SH/index.cjs +7 -0
- package/locale/en-SH/index.js +6 -0
- package/locale/en-SH/package.json +5 -5
- package/locale/en-SI/index.cjs +7 -0
- package/locale/en-SI/index.js +6 -0
- package/locale/en-SI/package.json +5 -5
- package/locale/en-SK/index.cjs +7 -0
- package/locale/en-SK/index.js +6 -0
- package/locale/en-SK/package.json +5 -5
- package/locale/en-SL/index.cjs +7 -0
- package/locale/en-SL/index.js +6 -0
- package/locale/en-SL/package.json +5 -5
- package/locale/en-SS/index.cjs +7 -0
- package/locale/en-SS/index.js +6 -0
- package/locale/en-SS/package.json +5 -5
- package/locale/en-SX/index.cjs +7 -0
- package/locale/en-SX/index.js +6 -0
- package/locale/en-SX/package.json +5 -5
- package/locale/en-SZ/index.cjs +7 -0
- package/locale/en-SZ/index.js +6 -0
- package/locale/en-SZ/package.json +5 -5
- package/locale/en-TC/index.cjs +7 -0
- package/locale/en-TC/index.js +6 -0
- package/locale/en-TC/package.json +5 -5
- package/locale/en-TK/index.cjs +7 -0
- package/locale/en-TK/index.js +6 -0
- package/locale/en-TK/package.json +5 -5
- package/locale/en-TO/index.cjs +7 -0
- package/locale/en-TO/index.js +6 -0
- package/locale/en-TO/package.json +5 -5
- package/locale/en-TT/index.cjs +7 -0
- package/locale/en-TT/index.js +6 -0
- package/locale/en-TT/package.json +5 -5
- package/locale/en-TV/index.cjs +7 -0
- package/locale/en-TV/index.js +6 -0
- package/locale/en-TV/package.json +5 -5
- package/locale/en-TZ/index.cjs +7 -0
- package/locale/en-TZ/index.js +6 -0
- package/locale/en-TZ/package.json +5 -5
- package/locale/en-UA/index.cjs +7 -0
- package/locale/en-UA/index.js +6 -0
- package/locale/en-UA/package.json +16 -0
- package/locale/en-UA.json +219 -0
- package/locale/en-UA.json.d.ts +4 -0
- package/locale/en-UA.json.js +219 -0
- package/locale/en-UG/index.cjs +7 -0
- package/locale/en-UG/index.js +6 -0
- package/locale/en-UG/package.json +5 -5
- package/locale/en-VC/index.cjs +7 -0
- package/locale/en-VC/index.js +6 -0
- package/locale/en-VC/package.json +5 -5
- package/locale/en-VG/index.cjs +7 -0
- package/locale/en-VG/index.js +6 -0
- package/locale/en-VG/package.json +5 -5
- package/locale/en-VU/index.cjs +7 -0
- package/locale/en-VU/index.js +6 -0
- package/locale/en-VU/package.json +5 -5
- package/locale/en-WS/index.cjs +7 -0
- package/locale/en-WS/index.js +6 -0
- package/locale/en-WS/package.json +5 -5
- package/locale/en-ZA/index.cjs +7 -0
- package/locale/en-ZA/index.js +6 -0
- package/locale/en-ZA/package.json +5 -5
- package/locale/en-ZM/index.cjs +7 -0
- package/locale/en-ZM/index.js +6 -0
- package/locale/en-ZM/package.json +5 -5
- package/locale/en-ZW/index.cjs +7 -0
- package/locale/en-ZW/index.js +6 -0
- package/locale/en-ZW/package.json +5 -5
- package/locale/eo/index.cjs +7 -0
- package/locale/eo/index.js +6 -0
- package/locale/eo/package.json +5 -5
- package/locale/es/index.cjs +7 -0
- package/locale/es/index.js +6 -0
- package/locale/es/package.json +5 -5
- package/locale/es-419/index.cjs +7 -0
- package/locale/es-419/index.js +6 -0
- package/locale/es-419/package.json +5 -5
- package/locale/es-AR/index.cjs +7 -0
- package/locale/es-AR/index.js +6 -0
- package/locale/es-AR/package.json +5 -5
- package/locale/es-BO/index.cjs +7 -0
- package/locale/es-BO/index.js +6 -0
- package/locale/es-BO/package.json +5 -5
- package/locale/es-BR/index.cjs +7 -0
- package/locale/es-BR/index.js +6 -0
- package/locale/es-BR/package.json +5 -5
- package/locale/es-BZ/index.cjs +7 -0
- package/locale/es-BZ/index.js +6 -0
- package/locale/es-BZ/package.json +5 -5
- package/locale/es-CL/index.cjs +7 -0
- package/locale/es-CL/index.js +6 -0
- package/locale/es-CL/package.json +5 -5
- package/locale/es-CO/index.cjs +7 -0
- package/locale/es-CO/index.js +6 -0
- package/locale/es-CO/package.json +5 -5
- package/locale/es-CR/index.cjs +7 -0
- package/locale/es-CR/index.js +6 -0
- package/locale/es-CR/package.json +5 -5
- package/locale/es-CU/index.cjs +7 -0
- package/locale/es-CU/index.js +6 -0
- package/locale/es-CU/package.json +5 -5
- package/locale/es-DO/index.cjs +7 -0
- package/locale/es-DO/index.js +6 -0
- package/locale/es-DO/package.json +5 -5
- package/locale/es-EC/index.cjs +7 -0
- package/locale/es-EC/index.js +6 -0
- package/locale/es-EC/package.json +5 -5
- package/locale/es-GT/index.cjs +7 -0
- package/locale/es-GT/index.js +6 -0
- package/locale/es-GT/package.json +5 -5
- package/locale/es-HN/index.cjs +7 -0
- package/locale/es-HN/index.js +6 -0
- package/locale/es-HN/package.json +5 -5
- package/locale/es-MX/index.cjs +7 -0
- package/locale/es-MX/index.js +6 -0
- package/locale/es-MX/package.json +5 -5
- package/locale/es-MX.json +2 -8
- package/locale/es-MX.json.js +2 -8
- package/locale/es-NI/index.cjs +7 -0
- package/locale/es-NI/index.js +6 -0
- package/locale/es-NI/package.json +5 -5
- package/locale/es-PA/index.cjs +7 -0
- package/locale/es-PA/index.js +6 -0
- package/locale/es-PA/package.json +5 -5
- package/locale/es-PE/index.cjs +7 -0
- package/locale/es-PE/index.js +6 -0
- package/locale/es-PE/package.json +5 -5
- package/locale/es-PR/index.cjs +7 -0
- package/locale/es-PR/index.js +6 -0
- package/locale/es-PR/package.json +5 -5
- package/locale/es-PY/index.cjs +7 -0
- package/locale/es-PY/index.js +6 -0
- package/locale/es-PY/package.json +5 -5
- package/locale/es-SV/index.cjs +7 -0
- package/locale/es-SV/index.js +6 -0
- package/locale/es-SV/package.json +5 -5
- package/locale/es-US/index.cjs +7 -0
- package/locale/es-US/index.js +6 -0
- package/locale/es-US/package.json +5 -5
- package/locale/es-UY/index.cjs +7 -0
- package/locale/es-UY/index.js +6 -0
- package/locale/es-UY/package.json +5 -5
- package/locale/es-VE/index.cjs +7 -0
- package/locale/es-VE/index.js +6 -0
- package/locale/es-VE/package.json +5 -5
- package/locale/et/index.cjs +7 -0
- package/locale/et/index.js +6 -0
- package/locale/et/package.json +5 -5
- package/locale/eu/index.cjs +7 -0
- package/locale/eu/index.js +6 -0
- package/locale/eu/package.json +5 -5
- package/locale/fa/index.cjs +7 -0
- package/locale/fa/index.js +6 -0
- package/locale/fa/package.json +5 -5
- package/locale/ff-Adlm/index.cjs +7 -0
- package/locale/ff-Adlm/index.js +6 -0
- package/locale/ff-Adlm/package.json +5 -5
- package/locale/fi/index.cjs +7 -0
- package/locale/fi/index.js +6 -0
- package/locale/fi/package.json +5 -5
- package/locale/fil/index.cjs +7 -0
- package/locale/fil/index.js +6 -0
- package/locale/fil/package.json +5 -5
- package/locale/fo/index.cjs +7 -0
- package/locale/fo/index.js +6 -0
- package/locale/fo/package.json +5 -5
- package/locale/fr/index.cjs +7 -0
- package/locale/fr/index.js +6 -0
- package/locale/fr/package.json +5 -5
- package/locale/fr-CA/index.cjs +7 -0
- package/locale/fr-CA/index.js +6 -0
- package/locale/fr-CA/package.json +5 -5
- package/locale/fr-CA.json +4 -4
- package/locale/fr-CA.json.js +4 -4
- package/locale/fr.json +4 -4
- package/locale/fr.json.js +4 -4
- package/locale/fur/index.cjs +7 -0
- package/locale/fur/index.js +6 -0
- package/locale/fur/package.json +5 -5
- package/locale/fy/index.cjs +7 -0
- package/locale/fy/index.js +6 -0
- package/locale/fy/package.json +5 -5
- package/locale/ga/index.cjs +7 -0
- package/locale/ga/index.js +6 -0
- package/locale/ga/package.json +5 -5
- package/locale/gd/index.cjs +7 -0
- package/locale/gd/index.js +6 -0
- package/locale/gd/package.json +5 -5
- package/locale/gl/index.cjs +7 -0
- package/locale/gl/index.js +6 -0
- package/locale/gl/package.json +5 -5
- package/locale/gu/index.cjs +7 -0
- package/locale/gu/index.js +6 -0
- package/locale/gu/package.json +5 -5
- package/locale/ha/index.cjs +7 -0
- package/locale/ha/index.js +6 -0
- package/locale/ha/package.json +5 -5
- package/locale/he/index.cjs +7 -0
- package/locale/he/index.js +6 -0
- package/locale/he/package.json +5 -5
- package/locale/he.json +74 -86
- package/locale/he.json.js +74 -86
- package/locale/hi/index.cjs +7 -0
- package/locale/hi/index.js +6 -0
- package/locale/hi/package.json +5 -5
- package/locale/hi-Latn/index.cjs +7 -0
- package/locale/hi-Latn/index.js +6 -0
- package/locale/hi-Latn/package.json +5 -5
- package/locale/hr/index.cjs +7 -0
- package/locale/hr/index.js +6 -0
- package/locale/hr/package.json +5 -5
- package/locale/hsb/index.cjs +7 -0
- package/locale/hsb/index.js +6 -0
- package/locale/hsb/package.json +5 -5
- package/locale/ht/index.cjs +7 -0
- package/locale/ht/index.js +6 -0
- package/locale/ht/package.json +5 -5
- package/locale/ht.json +4 -4
- package/locale/ht.json.js +4 -4
- package/locale/hu/index.cjs +7 -0
- package/locale/hu/index.js +6 -0
- package/locale/hu/package.json +5 -5
- package/locale/hy/index.cjs +7 -0
- package/locale/hy/index.js +6 -0
- package/locale/hy/package.json +5 -5
- package/locale/ia/index.cjs +7 -0
- package/locale/ia/index.js +6 -0
- package/locale/ia/package.json +5 -5
- package/locale/id/index.cjs +7 -0
- package/locale/id/index.js +6 -0
- package/locale/id/package.json +5 -5
- package/locale/ie/index.cjs +7 -0
- package/locale/ie/index.js +6 -0
- package/locale/ie/package.json +5 -5
- package/locale/ie.json +15 -9
- package/locale/ie.json.js +15 -9
- package/locale/ig/index.cjs +7 -0
- package/locale/ig/index.js +6 -0
- package/locale/ig/package.json +5 -5
- package/locale/ii/index.cjs +7 -0
- package/locale/ii/index.js +6 -0
- package/locale/ii/package.json +5 -5
- package/locale/is/index.cjs +7 -0
- package/locale/is/index.js +6 -0
- package/locale/is/package.json +5 -5
- package/locale/it/index.cjs +7 -0
- package/locale/it/index.js +6 -0
- package/locale/it/package.json +5 -5
- package/locale/ja/index.cjs +7 -0
- package/locale/ja/index.js +6 -0
- package/locale/ja/package.json +5 -5
- package/locale/jgo/index.cjs +7 -0
- package/locale/jgo/index.js +6 -0
- package/locale/jgo/package.json +5 -5
- package/locale/jv/index.cjs +7 -0
- package/locale/jv/index.js +6 -0
- package/locale/jv/package.json +5 -5
- package/locale/ka/index.cjs +7 -0
- package/locale/ka/index.js +6 -0
- package/locale/ka/package.json +5 -5
- package/locale/kaa/index.cjs +7 -0
- package/locale/kaa/index.js +6 -0
- package/locale/kaa/package.json +5 -5
- package/locale/kea/index.cjs +7 -0
- package/locale/kea/index.js +6 -0
- package/locale/kea/package.json +5 -5
- package/locale/kgp/index.cjs +7 -0
- package/locale/kgp/index.js +6 -0
- package/locale/kgp/package.json +5 -5
- package/locale/kk/index.cjs +7 -0
- package/locale/kk/index.js +6 -0
- package/locale/kk/package.json +5 -5
- package/locale/kk-Arab/index.cjs +7 -0
- package/locale/kk-Arab/index.js +6 -0
- package/locale/kk-Arab/package.json +16 -0
- package/locale/kk-Arab.json +159 -0
- package/locale/kk-Arab.json.d.ts +4 -0
- package/locale/kk-Arab.json.js +159 -0
- package/locale/kl/index.cjs +7 -0
- package/locale/kl/index.js +6 -0
- package/locale/kl/package.json +5 -5
- package/locale/km/index.cjs +7 -0
- package/locale/km/index.js +6 -0
- package/locale/km/package.json +5 -5
- package/locale/kn/index.cjs +7 -0
- package/locale/kn/index.js +6 -0
- package/locale/kn/package.json +5 -5
- package/locale/ko/index.cjs +7 -0
- package/locale/ko/index.js +6 -0
- package/locale/ko/package.json +5 -5
- package/locale/kok/index.cjs +7 -0
- package/locale/kok/index.js +6 -0
- package/locale/kok/package.json +5 -5
- package/locale/kok-Latn/index.cjs +7 -0
- package/locale/kok-Latn/index.js +6 -0
- package/locale/kok-Latn/package.json +5 -5
- package/locale/kok-Latn.json +138 -39
- package/locale/kok-Latn.json.js +138 -39
- package/locale/kok.json +169 -64
- package/locale/kok.json.js +169 -64
- package/locale/ks/index.cjs +7 -0
- package/locale/ks/index.js +6 -0
- package/locale/ks/package.json +5 -5
- package/locale/ksh/index.cjs +7 -0
- package/locale/ksh/index.js +6 -0
- package/locale/ksh/package.json +5 -5
- package/locale/ku/index.cjs +7 -0
- package/locale/ku/index.js +6 -0
- package/locale/ku/package.json +5 -5
- package/locale/ku.json +166 -73
- package/locale/ku.json.js +166 -73
- package/locale/ky/index.cjs +7 -0
- package/locale/ky/index.js +6 -0
- package/locale/ky/package.json +5 -5
- package/locale/lb/index.cjs +7 -0
- package/locale/lb/index.js +6 -0
- package/locale/lb/package.json +5 -5
- package/locale/lkt/index.cjs +7 -0
- package/locale/lkt/index.js +6 -0
- package/locale/lkt/package.json +5 -5
- package/locale/lld/index.cjs +7 -0
- package/locale/lld/index.js +6 -0
- package/locale/lld/package.json +5 -5
- package/locale/lo/index.cjs +7 -0
- package/locale/lo/index.js +6 -0
- package/locale/lo/package.json +5 -5
- package/locale/lt/index.cjs +7 -0
- package/locale/lt/index.js +6 -0
- package/locale/lt/package.json +5 -5
- package/locale/lv/index.cjs +7 -0
- package/locale/lv/index.js +6 -0
- package/locale/lv/package.json +5 -5
- package/locale/mai/index.cjs +7 -0
- package/locale/mai/index.js +6 -0
- package/locale/mai/package.json +5 -5
- package/locale/mi/index.cjs +7 -0
- package/locale/mi/index.js +6 -0
- package/locale/mi/package.json +5 -5
- package/locale/mk/index.cjs +7 -0
- package/locale/mk/index.js +6 -0
- package/locale/mk/package.json +5 -5
- package/locale/mk.json +20 -20
- package/locale/mk.json.js +20 -20
- package/locale/ml/index.cjs +7 -0
- package/locale/ml/index.js +6 -0
- package/locale/ml/package.json +5 -5
- package/locale/mn/index.cjs +7 -0
- package/locale/mn/index.js +6 -0
- package/locale/mn/package.json +5 -5
- package/locale/mni/index.cjs +7 -0
- package/locale/mni/index.js +6 -0
- package/locale/mni/package.json +5 -5
- package/locale/mr/index.cjs +7 -0
- package/locale/mr/index.js +6 -0
- package/locale/mr/package.json +5 -5
- package/locale/ms/index.cjs +7 -0
- package/locale/ms/index.js +6 -0
- package/locale/ms/package.json +5 -5
- package/locale/ms-Arab/index.cjs +7 -0
- package/locale/ms-Arab/index.js +6 -0
- package/locale/ms-Arab/package.json +5 -5
- package/locale/mt/index.cjs +7 -0
- package/locale/mt/index.js +6 -0
- package/locale/mt/package.json +5 -5
- package/locale/my/index.cjs +7 -0
- package/locale/my/index.js +6 -0
- package/locale/my/package.json +5 -5
- package/locale/mzn/index.cjs +7 -0
- package/locale/mzn/index.js +6 -0
- package/locale/mzn/package.json +5 -5
- package/locale/nb/index.cjs +7 -0
- package/locale/nb/index.js +6 -0
- package/locale/nb/package.json +5 -5
- package/locale/ne/index.cjs +7 -0
- package/locale/ne/index.js +6 -0
- package/locale/ne/package.json +5 -5
- package/locale/nl/index.cjs +7 -0
- package/locale/nl/index.js +6 -0
- package/locale/nl/package.json +5 -5
- package/locale/nn/index.cjs +7 -0
- package/locale/nn/index.js +6 -0
- package/locale/nn/package.json +5 -5
- package/locale/no/index.cjs +7 -0
- package/locale/no/index.js +6 -0
- package/locale/no/package.json +5 -5
- package/locale/nqo/index.cjs +7 -0
- package/locale/nqo/index.js +6 -0
- package/locale/nqo/package.json +5 -5
- package/locale/nso/index.cjs +7 -0
- package/locale/nso/index.js +6 -0
- package/locale/nso/package.json +16 -0
- package/locale/nso.json +159 -0
- package/locale/nso.json.d.ts +4 -0
- package/locale/nso.json.js +159 -0
- package/locale/om/index.cjs +7 -0
- package/locale/om/index.js +6 -0
- package/locale/om/package.json +5 -5
- package/locale/or/index.cjs +7 -0
- package/locale/or/index.js +6 -0
- package/locale/or/package.json +5 -5
- package/locale/pa/index.cjs +7 -0
- package/locale/pa/index.js +6 -0
- package/locale/pa/package.json +5 -5
- package/locale/pcm/index.cjs +7 -0
- package/locale/pcm/index.js +6 -0
- package/locale/pcm/package.json +5 -5
- package/locale/pl/index.cjs +7 -0
- package/locale/pl/index.js +6 -0
- package/locale/pl/package.json +5 -5
- package/locale/ps/index.cjs +7 -0
- package/locale/ps/index.js +6 -0
- package/locale/ps/package.json +5 -5
- package/locale/ps-PK/index.cjs +7 -0
- package/locale/ps-PK/index.js +6 -0
- package/locale/ps-PK/package.json +5 -5
- package/locale/pt/index.cjs +7 -0
- package/locale/pt/index.js +6 -0
- package/locale/pt/package.json +5 -5
- package/locale/pt-AO/index.cjs +7 -0
- package/locale/pt-AO/index.js +6 -0
- package/locale/pt-AO/package.json +5 -5
- package/locale/pt-CH/index.cjs +7 -0
- package/locale/pt-CH/index.js +6 -0
- package/locale/pt-CH/package.json +5 -5
- package/locale/pt-CV/index.cjs +7 -0
- package/locale/pt-CV/index.js +6 -0
- package/locale/pt-CV/package.json +5 -5
- package/locale/pt-GQ/index.cjs +7 -0
- package/locale/pt-GQ/index.js +6 -0
- package/locale/pt-GQ/package.json +5 -5
- package/locale/pt-GW/index.cjs +7 -0
- package/locale/pt-GW/index.js +6 -0
- package/locale/pt-GW/package.json +5 -5
- package/locale/pt-LU/index.cjs +7 -0
- package/locale/pt-LU/index.js +6 -0
- package/locale/pt-LU/package.json +5 -5
- package/locale/pt-MO/index.cjs +7 -0
- package/locale/pt-MO/index.js +6 -0
- package/locale/pt-MO/package.json +5 -5
- package/locale/pt-MZ/index.cjs +7 -0
- package/locale/pt-MZ/index.js +6 -0
- package/locale/pt-MZ/package.json +5 -5
- package/locale/pt-PT/index.cjs +7 -0
- package/locale/pt-PT/index.js +6 -0
- package/locale/pt-PT/package.json +5 -5
- package/locale/pt-ST/index.cjs +7 -0
- package/locale/pt-ST/index.js +6 -0
- package/locale/pt-ST/package.json +5 -5
- package/locale/pt-TL/index.cjs +7 -0
- package/locale/pt-TL/index.js +6 -0
- package/locale/pt-TL/package.json +5 -5
- package/locale/qu/index.cjs +7 -0
- package/locale/qu/index.js +6 -0
- package/locale/qu/package.json +5 -5
- package/locale/raj/index.cjs +7 -0
- package/locale/raj/index.js +6 -0
- package/locale/raj/package.json +5 -5
- package/locale/rhg/index.cjs +7 -0
- package/locale/rhg/index.js +6 -0
- package/locale/rhg/package.json +5 -5
- package/locale/rm/index.cjs +7 -0
- package/locale/rm/index.js +6 -0
- package/locale/rm/package.json +5 -5
- package/locale/rm.json +151 -85
- package/locale/rm.json.js +151 -85
- package/locale/ro/index.cjs +7 -0
- package/locale/ro/index.js +6 -0
- package/locale/ro/package.json +5 -5
- package/locale/ro.json +4 -2
- package/locale/ro.json.js +4 -2
- package/locale/ru/index.cjs +7 -0
- package/locale/ru/index.js +6 -0
- package/locale/ru/package.json +5 -5
- package/locale/rw/index.cjs +7 -0
- package/locale/rw/index.js +6 -0
- package/locale/rw/package.json +16 -0
- package/locale/rw.json +159 -0
- package/locale/rw.json.d.ts +4 -0
- package/locale/rw.json.js +159 -0
- package/locale/sah/index.cjs +7 -0
- package/locale/sah/index.js +6 -0
- package/locale/sah/package.json +5 -5
- package/locale/sc/index.cjs +7 -0
- package/locale/sc/index.js +6 -0
- package/locale/sc/package.json +5 -5
- package/locale/scn/index.cjs +7 -0
- package/locale/scn/index.js +6 -0
- package/locale/scn/package.json +16 -0
- package/locale/scn.json +249 -0
- package/locale/scn.json.d.ts +4 -0
- package/locale/scn.json.js +249 -0
- package/locale/sd/index.cjs +7 -0
- package/locale/sd/index.js +6 -0
- package/locale/sd/package.json +5 -5
- package/locale/sd-Deva/index.cjs +7 -0
- package/locale/sd-Deva/index.js +6 -0
- package/locale/sd-Deva/package.json +16 -0
- package/locale/sd-Deva.json +159 -0
- package/locale/sd-Deva.json.d.ts +4 -0
- package/locale/sd-Deva.json.js +159 -0
- package/locale/sd.json +77 -20
- package/locale/sd.json.js +77 -20
- package/locale/se/index.cjs +7 -0
- package/locale/se/index.js +6 -0
- package/locale/se/package.json +5 -5
- package/locale/se-FI/index.cjs +7 -0
- package/locale/se-FI/index.js +6 -0
- package/locale/se-FI/package.json +5 -5
- package/locale/shn/index.cjs +7 -0
- package/locale/shn/index.js +6 -0
- package/locale/shn/package.json +16 -0
- package/locale/shn.json +159 -0
- package/locale/shn.json.d.ts +4 -0
- package/locale/shn.json.js +159 -0
- package/locale/si/index.cjs +7 -0
- package/locale/si/index.js +6 -0
- package/locale/si/package.json +5 -5
- package/locale/sk/index.cjs +7 -0
- package/locale/sk/index.js +6 -0
- package/locale/sk/package.json +5 -5
- package/locale/sl/index.cjs +7 -0
- package/locale/sl/index.js +6 -0
- package/locale/sl/package.json +5 -5
- package/locale/so/index.cjs +7 -0
- package/locale/so/index.js +6 -0
- package/locale/so/package.json +5 -5
- package/locale/sq/index.cjs +7 -0
- package/locale/sq/index.js +6 -0
- package/locale/sq/package.json +5 -5
- package/locale/sr/index.cjs +7 -0
- package/locale/sr/index.js +6 -0
- package/locale/sr/package.json +5 -5
- package/locale/sr-Cyrl-BA/index.cjs +7 -0
- package/locale/sr-Cyrl-BA/index.js +6 -0
- package/locale/sr-Cyrl-BA/package.json +5 -5
- package/locale/sr-Latn/index.cjs +7 -0
- package/locale/sr-Latn/index.js +6 -0
- package/locale/sr-Latn/package.json +5 -5
- package/locale/sr-Latn-BA/index.cjs +7 -0
- package/locale/sr-Latn-BA/index.js +6 -0
- package/locale/sr-Latn-BA/package.json +5 -5
- package/locale/su/index.cjs +7 -0
- package/locale/su/index.js +6 -0
- package/locale/su/package.json +5 -5
- package/locale/sv/index.cjs +7 -0
- package/locale/sv/index.js +6 -0
- package/locale/sv/package.json +5 -5
- package/locale/sv.json +3 -3
- package/locale/sv.json.js +3 -3
- package/locale/sw/index.cjs +7 -0
- package/locale/sw/index.js +6 -0
- package/locale/sw/package.json +5 -5
- package/locale/syr/index.cjs +7 -0
- package/locale/syr/index.js +6 -0
- package/locale/syr/package.json +5 -5
- package/locale/syr.json +27 -27
- package/locale/syr.json.js +27 -27
- package/locale/ta/index.cjs +7 -0
- package/locale/ta/index.js +6 -0
- package/locale/ta/package.json +5 -5
- package/locale/ta.json +15 -9
- package/locale/ta.json.js +15 -9
- package/locale/te/index.cjs +7 -0
- package/locale/te/index.js +6 -0
- package/locale/te/package.json +5 -5
- package/locale/tg/index.cjs +7 -0
- package/locale/tg/index.js +6 -0
- package/locale/tg/package.json +5 -5
- package/locale/th/index.cjs +7 -0
- package/locale/th/index.js +6 -0
- package/locale/th/package.json +5 -5
- package/locale/ti/index.cjs +7 -0
- package/locale/ti/index.js +6 -0
- package/locale/ti/package.json +5 -5
- package/locale/tk/index.cjs +7 -0
- package/locale/tk/index.js +6 -0
- package/locale/tk/package.json +5 -5
- package/locale/tn/index.cjs +7 -0
- package/locale/tn/index.js +6 -0
- package/locale/tn/package.json +5 -5
- package/locale/tn.json +27 -27
- package/locale/tn.json.js +27 -27
- package/locale/to/index.cjs +7 -0
- package/locale/to/index.js +6 -0
- package/locale/to/package.json +5 -5
- package/locale/tok/index.cjs +7 -0
- package/locale/tok/index.js +6 -0
- package/locale/tok/package.json +16 -0
- package/locale/tok.json +159 -0
- package/locale/tok.json.d.ts +4 -0
- package/locale/tok.json.js +159 -0
- package/locale/tr/index.cjs +7 -0
- package/locale/tr/index.js +6 -0
- package/locale/tr/package.json +5 -5
- package/locale/tt/index.cjs +7 -0
- package/locale/tt/index.js +6 -0
- package/locale/tt/package.json +5 -5
- package/locale/tyv/index.cjs +7 -0
- package/locale/tyv/index.js +6 -0
- package/locale/tyv/package.json +16 -0
- package/locale/tyv.json +159 -0
- package/locale/tyv.json.d.ts +4 -0
- package/locale/tyv.json.js +159 -0
- package/locale/ug/index.cjs +7 -0
- package/locale/ug/index.js +6 -0
- package/locale/ug/package.json +5 -5
- package/locale/uk/index.cjs +7 -0
- package/locale/uk/index.js +6 -0
- package/locale/uk/package.json +5 -5
- package/locale/ur/index.cjs +7 -0
- package/locale/ur/index.js +6 -0
- package/locale/ur/package.json +5 -5
- package/locale/ur-IN/index.cjs +7 -0
- package/locale/ur-IN/index.js +6 -0
- package/locale/ur-IN/package.json +5 -5
- package/locale/uz/index.cjs +7 -0
- package/locale/uz/index.js +6 -0
- package/locale/uz/package.json +5 -5
- package/locale/uz-Cyrl/index.cjs +7 -0
- package/locale/uz-Cyrl/index.js +6 -0
- package/locale/uz-Cyrl/package.json +5 -5
- package/locale/vec/index.cjs +7 -0
- package/locale/vec/index.js +6 -0
- package/locale/vec/package.json +5 -5
- package/locale/vi/index.cjs +7 -0
- package/locale/vi/index.js +6 -0
- package/locale/vi/package.json +5 -5
- package/locale/wae/index.cjs +7 -0
- package/locale/wae/index.js +6 -0
- package/locale/wae/package.json +5 -5
- package/locale/wo/index.cjs +7 -0
- package/locale/wo/index.js +6 -0
- package/locale/wo/package.json +5 -5
- package/locale/xh/index.cjs +7 -0
- package/locale/xh/index.js +6 -0
- package/locale/xh/package.json +5 -5
- package/locale/xh.json +18 -18
- package/locale/xh.json.js +18 -18
- package/locale/xnr/index.cjs +7 -0
- package/locale/xnr/index.js +6 -0
- package/locale/xnr/package.json +5 -5
- package/locale/yi/index.cjs +7 -0
- package/locale/yi/index.js +6 -0
- package/locale/yi/package.json +5 -5
- package/locale/yo/index.cjs +7 -0
- package/locale/yo/index.js +6 -0
- package/locale/yo/package.json +5 -5
- package/locale/yo-BJ/index.cjs +7 -0
- package/locale/yo-BJ/index.js +6 -0
- package/locale/yo-BJ/package.json +5 -5
- package/locale/yrl/index.cjs +7 -0
- package/locale/yrl/index.js +6 -0
- package/locale/yrl/package.json +5 -5
- package/locale/yue/index.cjs +7 -0
- package/locale/yue/index.js +6 -0
- package/locale/yue/package.json +5 -5
- package/locale/yue-Hans/index.cjs +7 -0
- package/locale/yue-Hans/index.js +6 -0
- package/locale/yue-Hans/package.json +5 -5
- package/locale/zh/index.cjs +7 -0
- package/locale/zh/index.js +6 -0
- package/locale/zh/package.json +5 -5
- package/locale/zh-Hans-HK/index.cjs +7 -0
- package/locale/zh-Hans-HK/index.js +6 -0
- package/locale/zh-Hans-HK/package.json +5 -5
- package/locale/zh-Hans-MO/index.cjs +7 -0
- package/locale/zh-Hans-MO/index.js +6 -0
- package/locale/zh-Hans-MO/package.json +5 -5
- package/locale/zh-Hans-SG/index.cjs +7 -0
- package/locale/zh-Hans-SG/index.js +6 -0
- package/locale/zh-Hans-SG/package.json +5 -5
- package/locale/zh-Hant/index.cjs +7 -0
- package/locale/zh-Hant/index.js +6 -0
- package/locale/zh-Hant/package.json +5 -5
- package/locale/zh-Hant-HK/index.cjs +7 -0
- package/locale/zh-Hant-HK/index.js +6 -0
- package/locale/zh-Hant-HK/package.json +5 -5
- package/locale/zh-Hant-MO/index.cjs +7 -0
- package/locale/zh-Hant-MO/index.js +6 -0
- package/locale/zh-Hant-MO/package.json +5 -5
- package/locale/zu/index.cjs +7 -0
- package/locale/zu/index.js +6 -0
- package/locale/zu/package.json +5 -5
- package/modules/FullDateFormatter.test.js +2 -0
- package/modules/FullDateFormatter.test.js.map +1 -1
- package/modules/TimeAgo.js +1 -0
- package/modules/TimeAgo.js.map +1 -1
- package/modules/TimeAgo.test.js +202 -189
- package/modules/TimeAgo.test.js.map +1 -1
- package/modules/cache.test.js +2 -0
- package/modules/cache.test.js.map +1 -1
- package/modules/isStyleObject.test.js +19 -17
- package/modules/isStyleObject.test.js.map +1 -1
- package/modules/locale.test.js +12 -10
- package/modules/locale.test.js.map +1 -1
- package/modules/steps/approximate.test.js +2 -0
- package/modules/steps/approximate.test.js.map +1 -1
- package/modules/steps/getStep.test.js +7 -5
- package/modules/steps/getStep.test.js.map +1 -1
- package/modules/steps/getStepDenominator.test.js +6 -4
- package/modules/steps/getStepDenominator.test.js.map +1 -1
- package/modules/steps/getStepMinTime.test.js +6 -4
- package/modules/steps/getStepMinTime.test.js.map +1 -1
- package/modules/steps/getTimeToNextUpdate.test.js +36 -34
- package/modules/steps/getTimeToNextUpdate.test.js.map +1 -1
- package/modules/steps/getTimeToNextUpdateForUnit.test.js +12 -10
- package/modules/steps/getTimeToNextUpdateForUnit.test.js.map +1 -1
- package/modules/steps/helpers.test.js +4 -2
- package/modules/steps/helpers.test.js.map +1 -1
- package/modules/steps/renameLegacyProperties.test.js +8 -6
- package/modules/steps/renameLegacyProperties.test.js.map +1 -1
- package/modules/steps/round.test.js +2 -0
- package/modules/steps/round.test.js.map +1 -1
- package/modules/style/approximateTime.test.js +3 -2
- package/modules/style/approximateTime.test.js.map +1 -1
- package/modules/style/mini.test.js +58 -56
- package/modules/style/mini.test.js.map +1 -1
- package/modules/style/miniMinute.test.js +25 -23
- package/modules/style/miniMinute.test.js.map +1 -1
- package/modules/style/miniMinuteNow.test.js +25 -23
- package/modules/style/miniMinuteNow.test.js.map +1 -1
- package/modules/style/miniNow.test.js +25 -23
- package/modules/style/miniNow.test.js.map +1 -1
- package/modules/style/renameLegacyProperties.test.js +6 -4
- package/modules/style/renameLegacyProperties.test.js.map +1 -1
- package/modules/style/round.test.js +76 -74
- package/modules/style/round.test.js.map +1 -1
- package/modules/style/roundMinute.test.js +47 -45
- package/modules/style/roundMinute.test.js.map +1 -1
- package/modules/style/twitter.test.js +72 -70
- package/modules/style/twitter.test.js.map +1 -1
- package/modules/style/twitterFirstMinute.test.js +29 -27
- package/modules/style/twitterFirstMinute.test.js.map +1 -1
- package/modules/style/twitterMinute.test.js +29 -27
- package/modules/style/twitterMinute.test.js.map +1 -1
- package/modules/style/twitterMinuteNow.test.js +29 -27
- package/modules/style/twitterMinuteNow.test.js.map +1 -1
- package/modules/style/twitterNow.test.js +31 -29
- package/modules/style/twitterNow.test.js.map +1 -1
- package/package.json +1442 -648
- package/scripts/generate-load-all-locales.js +3 -0
- package/scripts/generate-locale-messages.js +70 -48
- package/steps/index.d.ts +13 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approximate.test.js","names":["
|
|
1
|
+
{"version":3,"file":"approximate.test.js","names":["_mocha","require","_chai","_getStep","_interopRequireDefault","_approximate","e","__esModule","describe","it","getStepFor","secondsPassed","getStep","steps","now","units","expect","unit","to","equal","factor","granularity","be","undefined"],"sources":["../../source/steps/approximate.test.js"],"sourcesContent":["import { describe, it } from 'mocha'\r\nimport { expect } from 'chai'\r\n\r\nimport getStep from './getStep.js'\r\nimport steps from './approximate.js'\r\n\r\ndescribe('steps/approximate', () => {\r\n\tit('should get step correctly', () => {\r\n\t\tconst getStepFor = (secondsPassed) => getStep(steps, secondsPassed, {\r\n\t\t\tnow: 0,\r\n\t\t\tunits: [\r\n\t\t\t\t'now',\r\n\t\t\t\t'second',\r\n\t\t\t\t'minute',\r\n\t\t\t\t'hour',\r\n\t\t\t\t'day',\r\n\t\t\t\t'week',\r\n\t\t\t\t'month',\r\n\t\t\t\t'year'\r\n\t\t\t]\r\n\t\t})\r\n\r\n\t\texpect(getStepFor(0).unit).to.equal('now')\r\n\t\texpect(getStepFor(1).unit).to.equal('now')\r\n\t\texpect(getStepFor(45).unit).to.equal('now')\r\n\r\n\t\texpect(getStepFor(46).unit).to.equal('minute')\r\n\t\texpect(getStepFor(46).factor).to.equal(60)\r\n\t\texpect(getStepFor(46).granularity).to.be.undefined\r\n\r\n\t\texpect(getStepFor(2.5 * 60 - 1).unit).to.equal('minute')\r\n\t\texpect(getStepFor(2.5 * 60 - 1).factor).to.equal(60)\r\n\t\texpect(getStepFor(2.5 * 60 - 1).granularity).to.be.undefined\r\n\r\n\t\texpect(getStepFor(2.5 * 60).unit).to.equal('minute')\r\n\t\texpect(getStepFor(2.5 * 60).factor).to.equal(60)\r\n\t\texpect(getStepFor(2.5 * 60).granularity).to.equal(5)\r\n\r\n\t\texpect(getStepFor(52.5 * 60 - 1).unit).to.equal('minute')\r\n\t\texpect(getStepFor(52.5 * 60 - 1).factor).to.equal(60)\r\n\t\texpect(getStepFor(52.5 * 60 - 1).granularity).to.equal(5)\r\n\r\n\t\texpect(getStepFor(52.5 * 60).unit).to.equal('hour')\r\n\t\texpect(getStepFor(52.5 * 60).factor).to.equal(60 * 60)\r\n\t})\r\n\r\n\tit('should get step correctly (\"now\" unit not allowed)', () => {\r\n\t\tconst getStepFor = (secondsPassed) => getStep(steps, secondsPassed, {\r\n\t\t\tnow: 0,\r\n\t\t\tunits: [\r\n\t\t\t\t'second',\r\n\t\t\t\t'minute',\r\n\t\t\t\t'hour',\r\n\t\t\t\t'day',\r\n\t\t\t\t'week',\r\n\t\t\t\t'month',\r\n\t\t\t\t'year'\r\n\t\t\t]\r\n\t\t})\r\n\r\n\t\texpect(getStepFor(0)).to.be.undefined\r\n\t\texpect(getStepFor(1).unit).to.equal('second')\r\n\t\texpect(getStepFor(45).unit).to.equal('second')\r\n\t\texpect(getStepFor(46).unit).to.equal('minute')\r\n\t})\r\n})"],"mappings":"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","ignoreList":[]}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _mocha = require("mocha");
|
|
4
|
+
var _chai = require("chai");
|
|
3
5
|
var _getStep = _interopRequireDefault(require("./getStep.js"));
|
|
4
6
|
var _round = _interopRequireDefault(require("./round.js"));
|
|
5
7
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
6
|
-
describe('getStep', function () {
|
|
7
|
-
it('should return nothing if no time units are supported', function () {
|
|
8
|
-
expect((0, _getStep["default"])(_round["default"], 0, {
|
|
8
|
+
(0, _mocha.describe)('getStep', function () {
|
|
9
|
+
(0, _mocha.it)('should return nothing if no time units are supported', function () {
|
|
10
|
+
(0, _chai.expect)((0, _getStep["default"])(_round["default"], 0, {
|
|
9
11
|
units: ['femtosecond']
|
|
10
12
|
})).to.be.undefined;
|
|
11
13
|
});
|
|
@@ -20,28 +22,28 @@ describe('getStep', function () {
|
|
|
20
22
|
// )
|
|
21
23
|
// })
|
|
22
24
|
|
|
23
|
-
it('should fall back to previous step if granularity is too high for the next step', function () {
|
|
25
|
+
(0, _mocha.it)('should fall back to previous step if granularity is too high for the next step', function () {
|
|
24
26
|
var steps = _round["default"].slice();
|
|
25
|
-
steps[1].formatAs.
|
|
27
|
+
(0, _chai.expect)(steps[1].formatAs).to.equal('second');
|
|
26
28
|
steps[1].granularity = 3;
|
|
27
|
-
(0, _getStep["default"])(steps, 1.49, {
|
|
29
|
+
(0, _chai.expect)((0, _getStep["default"])(steps, 1.49, {
|
|
28
30
|
now: 0,
|
|
29
31
|
units: ['now', 'second']
|
|
30
|
-
}).formatAs.
|
|
32
|
+
}).formatAs).to.equal('now');
|
|
31
33
|
|
|
32
34
|
// And if there's no previous step, then use the current one.
|
|
33
35
|
|
|
34
36
|
var firstStep = steps[0];
|
|
35
37
|
steps.splice(0, 1);
|
|
36
|
-
(0, _getStep["default"])(steps, 1.49, {
|
|
38
|
+
(0, _chai.expect)((0, _getStep["default"])(steps, 1.49, {
|
|
37
39
|
now: 0,
|
|
38
40
|
units: ['now', 'second']
|
|
39
|
-
}).formatAs.
|
|
41
|
+
}).formatAs).to.equal('second');
|
|
40
42
|
steps.unshift(firstStep);
|
|
41
43
|
delete steps[1].granularity;
|
|
42
44
|
});
|
|
43
|
-
it('should support `minTime` object', function () {
|
|
44
|
-
expect((0, _getStep["default"])([{
|
|
45
|
+
(0, _mocha.it)('should support `minTime` object', function () {
|
|
46
|
+
(0, _chai.expect)((0, _getStep["default"])([{
|
|
45
47
|
unit: 'second'
|
|
46
48
|
}, {
|
|
47
49
|
minTime: {
|
|
@@ -52,7 +54,7 @@ describe('getStep', function () {
|
|
|
52
54
|
now: 0,
|
|
53
55
|
units: ['second', 'minute']
|
|
54
56
|
}).unit).to.equal('second');
|
|
55
|
-
expect((0, _getStep["default"])([{
|
|
57
|
+
(0, _chai.expect)((0, _getStep["default"])([{
|
|
56
58
|
unit: 'second'
|
|
57
59
|
}, {
|
|
58
60
|
minTime: {
|
|
@@ -63,7 +65,7 @@ describe('getStep', function () {
|
|
|
63
65
|
now: 0,
|
|
64
66
|
units: ['second', 'minute']
|
|
65
67
|
}).unit).to.equal('minute');
|
|
66
|
-
expect((0, _getStep["default"])([{
|
|
68
|
+
(0, _chai.expect)((0, _getStep["default"])([{
|
|
67
69
|
id: 'seconds',
|
|
68
70
|
unit: 'second'
|
|
69
71
|
}, {
|
|
@@ -77,8 +79,8 @@ describe('getStep', function () {
|
|
|
77
79
|
units: ['second', 'minute']
|
|
78
80
|
}).unit).to.equal('second');
|
|
79
81
|
});
|
|
80
|
-
it('should support legacy `threshold()` function', function () {
|
|
81
|
-
expect((0, _getStep["default"])([{
|
|
82
|
+
(0, _mocha.it)('should support legacy `threshold()` function', function () {
|
|
83
|
+
(0, _chai.expect)((0, _getStep["default"])([{
|
|
82
84
|
unit: 'second'
|
|
83
85
|
}, {
|
|
84
86
|
threshold: function threshold() {
|
|
@@ -89,7 +91,7 @@ describe('getStep', function () {
|
|
|
89
91
|
now: 0,
|
|
90
92
|
units: ['second', 'minute']
|
|
91
93
|
}).unit).to.equal('second');
|
|
92
|
-
expect((0, _getStep["default"])([{
|
|
94
|
+
(0, _chai.expect)((0, _getStep["default"])([{
|
|
93
95
|
unit: 'second'
|
|
94
96
|
}, {
|
|
95
97
|
threshold: function threshold() {
|
|
@@ -101,8 +103,8 @@ describe('getStep', function () {
|
|
|
101
103
|
units: ['second', 'minute']
|
|
102
104
|
}).unit).to.equal('minute');
|
|
103
105
|
});
|
|
104
|
-
it('should stop when reaching a step that has no "minTime" and for which "minTime" could not be deduced', function () {
|
|
105
|
-
expect((0, _getStep["default"])([{
|
|
106
|
+
(0, _mocha.it)('should stop when reaching a step that has no "minTime" and for which "minTime" could not be deduced', function () {
|
|
107
|
+
(0, _chai.expect)((0, _getStep["default"])([{
|
|
106
108
|
formatAs: 'second'
|
|
107
109
|
}, {
|
|
108
110
|
formatAs: 'unsupported-time-unit'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getStep.test.js","names":["
|
|
1
|
+
{"version":3,"file":"getStep.test.js","names":["_mocha","require","_chai","_getStep","_interopRequireDefault","_round","e","__esModule","describe","it","expect","getStep","round","units","to","be","undefined","steps","slice","formatAs","equal","granularity","now","firstStep","splice","unshift","unit","minTime","id","seconds","threshold"],"sources":["../../source/steps/getStep.test.js"],"sourcesContent":["import { describe, it } from 'mocha'\r\nimport { expect } from 'chai'\r\n\r\nimport getStep from './getStep.js'\r\nimport round from './round.js'\r\n\r\ndescribe('getStep', () => {\r\n\tit('should return nothing if no time units are supported', () => {\r\n\t\texpect(getStep(round, 0, { units: ['femtosecond'] })).to.be.undefined\r\n\t})\r\n\r\n\t// it('should throw if a non-first step does not have a `minTime` or `test()`', () => {\r\n\t// \texpect(getStep([{ unit: 'second' }], 2, { units: ['second'] })).to.deep.equal({ unit: 'second' })\r\n\t//\r\n\t// \texpect(() => {\r\n\t// \t\tgetStep([{ unit: 'second' }, { unit: 'minute' }], 2, { units: ['second', 'minute'] })\r\n\t// \t}).to.throw(\r\n\t// \t\t'Each step must define either `minTime` or `test()`, except for the first one. Got \"undefined\", undefined. Step: {\"unit\":\"minute\"}'\r\n\t// \t)\r\n\t// })\r\n\r\n\tit('should fall back to previous step if granularity is too high for the next step', () => {\r\n\t\tconst steps = round.slice()\r\n\r\n\t\texpect(steps[1].formatAs).to.equal('second')\r\n\t\tsteps[1].granularity = 3\r\n\r\n\t\texpect(getStep(steps, 1.49, { now: 0, units: ['now', 'second'] }).formatAs).to.equal('now')\r\n\r\n\t\t// And if there's no previous step, then use the current one.\r\n\r\n\t\tconst firstStep = steps[0]\r\n\t\tsteps.splice(0, 1)\r\n\r\n\t\texpect(getStep(steps, 1.49, { now: 0, units: ['now', 'second'] }).formatAs).to.equal('second')\r\n\r\n\t\tsteps.unshift(firstStep)\r\n\r\n\t\tdelete steps[1].granularity\r\n\t})\r\n\r\n\tit('should support `minTime` object', () => {\r\n\t\texpect(getStep(\r\n\t\t\t[\r\n\t\t\t\t{ unit: 'second' },\r\n\t\t\t\t{\r\n\t\t\t\t\tminTime: { default: 10 },\r\n\t\t\t\t\tunit: 'minute'\r\n\t\t\t\t}\r\n\t\t\t],\r\n\t\t\t5,\r\n\t\t\t{ now: 0, units: ['second', 'minute'] }\r\n\t\t).unit).to.equal('second')\r\n\r\n\t\texpect(getStep(\r\n\t\t\t[\r\n\t\t\t\t{ unit: 'second' },\r\n\t\t\t\t{\r\n\t\t\t\t\tminTime: { default: 10 },\r\n\t\t\t\t\tunit: 'minute'\r\n\t\t\t\t}\r\n\t\t\t],\r\n\t\t\t10,\r\n\t\t\t{ now: 0, units: ['second', 'minute'] }\r\n\t\t).unit).to.equal('minute')\r\n\r\n\t\texpect(getStep(\r\n\t\t\t[\r\n\t\t\t\t{\r\n\t\t\t\t\tid: 'seconds',\r\n\t\t\t\t\tunit: 'second'\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\tminTime: {\r\n\t\t\t\t\t\tseconds: 20,\r\n\t\t\t\t\t\tdefault: 10\r\n\t\t\t\t\t},\r\n\t\t\t\t\tunit: 'minute'\r\n\t\t\t\t}\r\n\t\t\t],\r\n\t\t\t10,\r\n\t\t\t{ now: 0, units: ['second', 'minute'] }\r\n\t\t).unit).to.equal('second')\r\n\t})\r\n\r\n\tit('should support legacy `threshold()` function', () => {\r\n\t\texpect(getStep(\r\n\t\t\t[\r\n\t\t\t\t{ unit: 'second' },\r\n\t\t\t\t{\r\n\t\t\t\t\tthreshold: () => 10,\r\n\t\t\t\t\tunit: 'minute'\r\n\t\t\t\t}\r\n\t\t\t],\r\n\t\t\t5,\r\n\t\t\t{ now: 0, units: ['second', 'minute'] }\r\n\t\t).unit).to.equal('second')\r\n\r\n\t\texpect(getStep(\r\n\t\t\t[\r\n\t\t\t\t{ unit: 'second' },\r\n\t\t\t\t{\r\n\t\t\t\t\tthreshold: () => 10,\r\n\t\t\t\t\tunit: 'minute'\r\n\t\t\t\t}\r\n\t\t\t],\r\n\t\t\t10,\r\n\t\t\t{ now: 0, units: ['second', 'minute'] }\r\n\t\t).unit).to.equal('minute')\r\n\t})\r\n\r\n\tit('should stop when reaching a step that has no \"minTime\" and for which \"minTime\" could not be deduced', () => {\r\n\t\texpect(getStep(\r\n\t\t\t[\r\n\t\t\t\t{ formatAs: 'second' },\r\n\t\t\t\t{ formatAs: 'unsupported-time-unit' }\r\n\t\t\t],\r\n\t\t\t10,\r\n\t\t\t{ now: 0, units: ['second', 'unsupported-time-unit'] }\r\n\t\t).formatAs).to.equal('second')\r\n\t})\r\n})"],"mappings":"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","ignoreList":[]}
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _mocha = require("mocha");
|
|
4
|
+
var _chai = require("chai");
|
|
3
5
|
var _getStepDenominator = _interopRequireDefault(require("./getStepDenominator.js"));
|
|
4
6
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
5
|
-
describe('getStepDenominator', function () {
|
|
6
|
-
it('should support the older "unit" name', function () {
|
|
7
|
-
(0, _getStepDenominator["default"])({
|
|
7
|
+
(0, _mocha.describe)('getStepDenominator', function () {
|
|
8
|
+
(0, _mocha.it)('should support the older "unit" name', function () {
|
|
9
|
+
(0, _chai.expect)((0, _getStepDenominator["default"])({
|
|
8
10
|
unit: 'minute'
|
|
9
|
-
}).
|
|
11
|
+
})).to.equal(60);
|
|
10
12
|
});
|
|
11
|
-
it('should return 1 as a default "denominator"', function () {
|
|
12
|
-
(0, _getStepDenominator["default"])({
|
|
13
|
+
(0, _mocha.it)('should return 1 as a default "denominator"', function () {
|
|
14
|
+
(0, _chai.expect)((0, _getStepDenominator["default"])({
|
|
13
15
|
formatAs: 'exotic'
|
|
14
|
-
}).
|
|
16
|
+
})).to.equal(1);
|
|
15
17
|
});
|
|
16
18
|
});
|
|
17
19
|
//# sourceMappingURL=getStepDenominator.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getStepDenominator.test.js","names":["
|
|
1
|
+
{"version":3,"file":"getStepDenominator.test.js","names":["_mocha","require","_chai","_getStepDenominator","_interopRequireDefault","e","__esModule","describe","it","expect","getStepDenominator","unit","to","equal","formatAs"],"sources":["../../source/steps/getStepDenominator.test.js"],"sourcesContent":["import { describe, it } from 'mocha'\r\nimport { expect } from 'chai'\r\n\r\nimport getStepDenominator from './getStepDenominator.js'\r\n\r\ndescribe('getStepDenominator', () => {\r\n\tit('should support the older \"unit\" name', () => {\r\n\t\texpect(getStepDenominator({ unit: 'minute' })).to.equal(60)\r\n\t})\r\n\r\n\tit('should return 1 as a default \"denominator\"', () => {\r\n\t\texpect(getStepDenominator({ formatAs: 'exotic' })).to.equal(1)\r\n\t})\r\n})"],"mappings":";;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAEA,IAAAE,mBAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAwD,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,gBAAAA,CAAA;AAExD,IAAAE,eAAQ,EAAC,oBAAoB,EAAE,YAAM;EACpC,IAAAC,SAAE,EAAC,sCAAsC,EAAE,YAAM;IAChD,IAAAC,YAAM,EAAC,IAAAC,8BAAkB,EAAC;MAAEC,IAAI,EAAE;IAAS,CAAC,CAAC,CAAC,CAACC,EAAE,CAACC,KAAK,CAAC,EAAE,CAAC;EAC5D,CAAC,CAAC;EAEF,IAAAL,SAAE,EAAC,4CAA4C,EAAE,YAAM;IACtD,IAAAC,YAAM,EAAC,IAAAC,8BAAkB,EAAC;MAAEI,QAAQ,EAAE;IAAS,CAAC,CAAC,CAAC,CAACF,EAAE,CAACC,KAAK,CAAC,CAAC,CAAC;EAC/D,CAAC,CAAC;AACH,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _mocha = require("mocha");
|
|
4
|
+
var _chai = require("chai");
|
|
3
5
|
var _getStepMinTime = _interopRequireDefault(require("./getStepMinTime.js"));
|
|
4
6
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
5
|
-
describe('getStepMinTime', function () {
|
|
6
|
-
it('should support `step.test()` function (returns true)', function () {
|
|
7
|
-
(0, _getStepMinTime["default"])({
|
|
7
|
+
(0, _mocha.describe)('getStepMinTime', function () {
|
|
8
|
+
(0, _mocha.it)('should support `step.test()` function (returns true)', function () {
|
|
9
|
+
(0, _chai.expect)((0, _getStepMinTime["default"])({
|
|
8
10
|
test: function test() {
|
|
9
11
|
return true;
|
|
10
12
|
}
|
|
@@ -12,10 +14,10 @@ describe('getStepMinTime', function () {
|
|
|
12
14
|
prevStep: {
|
|
13
15
|
minTime: 1
|
|
14
16
|
}
|
|
15
|
-
}).
|
|
17
|
+
})).to.equal(0);
|
|
16
18
|
});
|
|
17
|
-
it('should support `step.test()` function (returns false)', function () {
|
|
18
|
-
(0, _getStepMinTime["default"])({
|
|
19
|
+
(0, _mocha.it)('should support `step.test()` function (returns false)', function () {
|
|
20
|
+
(0, _chai.expect)((0, _getStepMinTime["default"])({
|
|
19
21
|
test: function test() {
|
|
20
22
|
return false;
|
|
21
23
|
}
|
|
@@ -23,7 +25,7 @@ describe('getStepMinTime', function () {
|
|
|
23
25
|
prevStep: {
|
|
24
26
|
minTime: 1
|
|
25
27
|
}
|
|
26
|
-
}).
|
|
28
|
+
})).to.equal(9007199254740991);
|
|
27
29
|
});
|
|
28
30
|
});
|
|
29
31
|
//# sourceMappingURL=getStepMinTime.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getStepMinTime.test.js","names":["
|
|
1
|
+
{"version":3,"file":"getStepMinTime.test.js","names":["_mocha","require","_chai","_getStepMinTime","_interopRequireDefault","e","__esModule","describe","it","expect","getStepMinTime","test","prevStep","minTime","to","equal"],"sources":["../../source/steps/getStepMinTime.test.js"],"sourcesContent":["import { describe, it } from 'mocha'\r\nimport { expect } from 'chai'\r\n\r\nimport getStepMinTime from './getStepMinTime.js'\r\n\r\ndescribe('getStepMinTime', () => {\r\n\tit('should support `step.test()` function (returns true)', () => {\r\n\t\texpect(getStepMinTime({\r\n\t\t\ttest: () => true\r\n\t\t}, {\r\n\t\t\tprevStep: { minTime: 1 }\r\n\t\t})).to.equal(0)\r\n\t})\r\n\r\n\tit('should support `step.test()` function (returns false)', () => {\r\n\t\texpect(getStepMinTime({\r\n\t\t\ttest: () => false\r\n\t\t}, {\r\n\t\t\tprevStep: { minTime: 1 }\r\n\t\t})).to.equal(9007199254740991)\r\n\t})\r\n})"],"mappings":";;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAEA,IAAAE,eAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAgD,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,gBAAAA,CAAA;AAEhD,IAAAE,eAAQ,EAAC,gBAAgB,EAAE,YAAM;EAChC,IAAAC,SAAE,EAAC,sDAAsD,EAAE,YAAM;IAChE,IAAAC,YAAM,EAAC,IAAAC,0BAAc,EAAC;MACrBC,IAAI,EAAE,SAAAA,KAAA;QAAA,OAAM,IAAI;MAAA;IACjB,CAAC,EAAE;MACFC,QAAQ,EAAE;QAAEC,OAAO,EAAE;MAAE;IACxB,CAAC,CAAC,CAAC,CAACC,EAAE,CAACC,KAAK,CAAC,CAAC,CAAC;EAChB,CAAC,CAAC;EAEF,IAAAP,SAAE,EAAC,uDAAuD,EAAE,YAAM;IACjE,IAAAC,YAAM,EAAC,IAAAC,0BAAc,EAAC;MACrBC,IAAI,EAAE,SAAAA,KAAA;QAAA,OAAM,KAAK;MAAA;IAClB,CAAC,EAAE;MACFC,QAAQ,EAAE;QAAEC,OAAO,EAAE;MAAE;IACxB,CAAC,CAAC,CAAC,CAACC,EAAE,CAACC,KAAK,CAAC,gBAAgB,CAAC;EAC/B,CAAC,CAAC;AACH,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
var _mocha = require("mocha");
|
|
5
|
+
var _chai = require("chai");
|
|
4
6
|
var _getTimeToNextUpdate = _interopRequireWildcard(require("./getTimeToNextUpdate.js"));
|
|
5
7
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) { "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); } return f; })(e, t); }
|
|
6
|
-
describe('getTimeToNextUpdate', function () {
|
|
7
|
-
it('should return infinity when there are no more steps, and it does not format as a unit (past)', function () {
|
|
8
|
-
expect((0, _getTimeToNextUpdate["default"])(-4 * 60 * 1000, {
|
|
8
|
+
(0, _mocha.describe)('getTimeToNextUpdate', function () {
|
|
9
|
+
(0, _mocha.it)('should return infinity when there are no more steps, and it does not format as a unit (past)', function () {
|
|
10
|
+
(0, _chai.expect)((0, _getTimeToNextUpdate["default"])(-4 * 60 * 1000, {
|
|
9
11
|
minTime: 59.5,
|
|
10
12
|
format: function format() {
|
|
11
13
|
return '';
|
|
@@ -16,8 +18,8 @@ describe('getTimeToNextUpdate', function () {
|
|
|
16
18
|
isFirstStep: true
|
|
17
19
|
})).to.equal(_getTimeToNextUpdate.INFINITY);
|
|
18
20
|
});
|
|
19
|
-
it('should support date argument', function () {
|
|
20
|
-
expect((0, _getTimeToNextUpdate["default"])(new Date(4 * 60 * 1000), {
|
|
21
|
+
(0, _mocha.it)('should support date argument', function () {
|
|
22
|
+
(0, _chai.expect)((0, _getTimeToNextUpdate["default"])(new Date(4 * 60 * 1000), {
|
|
21
23
|
minTime: 60
|
|
22
24
|
}, {
|
|
23
25
|
now: 0,
|
|
@@ -26,8 +28,8 @@ describe('getTimeToNextUpdate', function () {
|
|
|
26
28
|
nextStep: {}
|
|
27
29
|
})).to.equal(3 * 60 * 1000 + 1);
|
|
28
30
|
});
|
|
29
|
-
it('should return this step\'s "minTime" timestamp (future)', function () {
|
|
30
|
-
expect((0, _getTimeToNextUpdate["default"])(4 * 60 * 1000, {
|
|
31
|
+
(0, _mocha.it)('should return this step\'s "minTime" timestamp (future)', function () {
|
|
32
|
+
(0, _chai.expect)((0, _getTimeToNextUpdate["default"])(4 * 60 * 1000, {
|
|
31
33
|
minTime: 60,
|
|
32
34
|
format: function format() {
|
|
33
35
|
return '';
|
|
@@ -43,8 +45,8 @@ describe('getTimeToNextUpdate', function () {
|
|
|
43
45
|
}
|
|
44
46
|
})).to.equal(3 * 60 * 1000 + 1);
|
|
45
47
|
});
|
|
46
|
-
it('should return undefined when there is a next step and time to next update can not be reliably determined (formatAs) (past)', function () {
|
|
47
|
-
expect((0, _getTimeToNextUpdate["default"])(-4 * 60 * 1000, {
|
|
48
|
+
(0, _mocha.it)('should return undefined when there is a next step and time to next update can not be reliably determined (formatAs) (past)', function () {
|
|
49
|
+
(0, _chai.expect)((0, _getTimeToNextUpdate["default"])(-4 * 60 * 1000, {
|
|
48
50
|
minTime: 60,
|
|
49
51
|
formatAs: 'minute'
|
|
50
52
|
}, {
|
|
@@ -56,28 +58,28 @@ describe('getTimeToNextUpdate', function () {
|
|
|
56
58
|
}
|
|
57
59
|
})).to.be.undefined;
|
|
58
60
|
});
|
|
59
|
-
it('should get time to next update (no next step) (past)', function () {
|
|
60
|
-
(0, _getTimeToNextUpdate["default"])(-4 * 60 * 1000, {
|
|
61
|
+
(0, _mocha.it)('should get time to next update (no next step) (past)', function () {
|
|
62
|
+
(0, _chai.expect)((0, _getTimeToNextUpdate["default"])(-4 * 60 * 1000, {
|
|
61
63
|
formatAs: 'minute',
|
|
62
64
|
minTime: 59.5
|
|
63
65
|
}, {
|
|
64
66
|
now: 0,
|
|
65
67
|
future: false,
|
|
66
68
|
isFirstStep: true
|
|
67
|
-
}).
|
|
69
|
+
})).to.equal(0.5 * 60 * 1000);
|
|
68
70
|
});
|
|
69
|
-
it('should get time to next update (no next step) (future)', function () {
|
|
70
|
-
(0, _getTimeToNextUpdate["default"])(4 * 60 * 1000, {
|
|
71
|
+
(0, _mocha.it)('should get time to next update (no next step) (future)', function () {
|
|
72
|
+
(0, _chai.expect)((0, _getTimeToNextUpdate["default"])(4 * 60 * 1000, {
|
|
71
73
|
formatAs: 'minute',
|
|
72
74
|
minTime: 59.5
|
|
73
75
|
}, {
|
|
74
76
|
now: 0,
|
|
75
77
|
future: true,
|
|
76
78
|
isFirstStep: true
|
|
77
|
-
}).
|
|
79
|
+
})).to.equal(0.5 * 60 * 1000 + 1);
|
|
78
80
|
});
|
|
79
|
-
it('should get time to next update (has prev/next step without `minTime`) (future)', function () {
|
|
80
|
-
(0, _getTimeToNextUpdate["default"])(4 * 60 * 1000, {
|
|
81
|
+
(0, _mocha.it)('should get time to next update (has prev/next step without `minTime`) (future)', function () {
|
|
82
|
+
(0, _chai.expect)((0, _getTimeToNextUpdate["default"])(4 * 60 * 1000, {
|
|
81
83
|
formatAs: 'minute',
|
|
82
84
|
minTime: 59.5
|
|
83
85
|
}, {
|
|
@@ -90,10 +92,10 @@ describe('getTimeToNextUpdate', function () {
|
|
|
90
92
|
return false;
|
|
91
93
|
}
|
|
92
94
|
}
|
|
93
|
-
}).
|
|
95
|
+
})).to.equal(0.5 * 60 * 1000 + 1);
|
|
94
96
|
});
|
|
95
|
-
it('should get time to next update (has `getTimeToNextUpdate`) (past)', function () {
|
|
96
|
-
(0, _getTimeToNextUpdate["default"])(-4 * 60 * 1000, {
|
|
97
|
+
(0, _mocha.it)('should get time to next update (has `getTimeToNextUpdate`) (past)', function () {
|
|
98
|
+
(0, _chai.expect)((0, _getTimeToNextUpdate["default"])(-4 * 60 * 1000, {
|
|
97
99
|
formatAs: 'minute',
|
|
98
100
|
minTime: 59.5,
|
|
99
101
|
getTimeToNextUpdate: function getTimeToNextUpdate() {
|
|
@@ -103,10 +105,10 @@ describe('getTimeToNextUpdate', function () {
|
|
|
103
105
|
now: 0,
|
|
104
106
|
future: false,
|
|
105
107
|
isFirstStep: true
|
|
106
|
-
}).
|
|
108
|
+
})).to.equal(0.25 * 60 * 1000);
|
|
107
109
|
});
|
|
108
|
-
it('should get time to next update (has `getTimeToNextUpdate`) (future)', function () {
|
|
109
|
-
(0, _getTimeToNextUpdate["default"])(4 * 60 * 1000, {
|
|
110
|
+
(0, _mocha.it)('should get time to next update (has `getTimeToNextUpdate`) (future)', function () {
|
|
111
|
+
(0, _chai.expect)((0, _getTimeToNextUpdate["default"])(4 * 60 * 1000, {
|
|
110
112
|
formatAs: 'minute',
|
|
111
113
|
minTime: 59.5,
|
|
112
114
|
getTimeToNextUpdate: function getTimeToNextUpdate() {
|
|
@@ -116,10 +118,10 @@ describe('getTimeToNextUpdate', function () {
|
|
|
116
118
|
now: 0,
|
|
117
119
|
future: true,
|
|
118
120
|
isFirstStep: true
|
|
119
|
-
}).
|
|
121
|
+
})).to.equal(0.25 * 60 * 1000);
|
|
120
122
|
});
|
|
121
|
-
it('should get time to next update (has both unit and prev/next steps with `minTime`) (returns time to "minTime" of next step) (past)', function () {
|
|
122
|
-
(0, _getTimeToNextUpdate["default"])(-59 * 60 * 1000, {
|
|
123
|
+
(0, _mocha.it)('should get time to next update (has both unit and prev/next steps with `minTime`) (returns time to "minTime" of next step) (past)', function () {
|
|
124
|
+
(0, _chai.expect)((0, _getTimeToNextUpdate["default"])(-59 * 60 * 1000, {
|
|
123
125
|
formatAs: 'minute',
|
|
124
126
|
minTime: 59.5
|
|
125
127
|
}, {
|
|
@@ -130,10 +132,10 @@ describe('getTimeToNextUpdate', function () {
|
|
|
130
132
|
formatAs: 'hour',
|
|
131
133
|
minTime: 59.5 * 60
|
|
132
134
|
}
|
|
133
|
-
}).
|
|
135
|
+
})).to.equal(0.5 * 60 * 1000);
|
|
134
136
|
});
|
|
135
|
-
it('should get time to next update (has no unit but has prev/next step with `minTime`) (returns time to "minTime" of next step) (past)', function () {
|
|
136
|
-
(0, _getTimeToNextUpdate["default"])(-59 * 60 * 1000, {
|
|
137
|
+
(0, _mocha.it)('should get time to next update (has no unit but has prev/next step with `minTime`) (returns time to "minTime" of next step) (past)', function () {
|
|
138
|
+
(0, _chai.expect)((0, _getTimeToNextUpdate["default"])(-59 * 60 * 1000, {
|
|
137
139
|
format: function format() {},
|
|
138
140
|
minTime: 59.5
|
|
139
141
|
}, {
|
|
@@ -144,67 +146,67 @@ describe('getTimeToNextUpdate', function () {
|
|
|
144
146
|
formatAs: 'hour',
|
|
145
147
|
minTime: 59.5 * 60
|
|
146
148
|
}
|
|
147
|
-
}).
|
|
149
|
+
})).to.equal(0.5 * 60 * 1000);
|
|
148
150
|
});
|
|
149
|
-
it('should get time to next update (will be outside of the first step) (future)', function () {
|
|
150
|
-
(0, _getTimeToNextUpdate["default"])(60 * 60 * 1000, {
|
|
151
|
+
(0, _mocha.it)('should get time to next update (will be outside of the first step) (future)', function () {
|
|
152
|
+
(0, _chai.expect)((0, _getTimeToNextUpdate["default"])(60 * 60 * 1000, {
|
|
151
153
|
formatAs: 'hour',
|
|
152
154
|
minTime: 60 * 60
|
|
153
155
|
}, {
|
|
154
156
|
now: 0,
|
|
155
157
|
future: true,
|
|
156
158
|
isFirstStep: true
|
|
157
|
-
}).
|
|
159
|
+
})).to.equal(1);
|
|
158
160
|
});
|
|
159
161
|
});
|
|
160
|
-
describe('getStepChangesAt', function () {
|
|
161
|
-
it('should work for "round" steps', function () {
|
|
162
|
+
(0, _mocha.describe)('getStepChangesAt', function () {
|
|
163
|
+
(0, _mocha.it)('should work for "round" steps', function () {
|
|
162
164
|
// Future.
|
|
163
165
|
// Is at zero point.
|
|
164
166
|
// No next step.
|
|
165
167
|
// No tickable unit.
|
|
166
168
|
// Doesn't update.
|
|
167
|
-
(0, _getTimeToNextUpdate.getStepChangesAt)({
|
|
169
|
+
(0, _chai.expect)((0, _getTimeToNextUpdate.getStepChangesAt)({
|
|
168
170
|
unit: 'now'
|
|
169
171
|
}, 0, {
|
|
170
172
|
now: 0,
|
|
171
173
|
future: false,
|
|
172
174
|
prevStep: undefined
|
|
173
|
-
}).
|
|
175
|
+
})).to.equal(_getTimeToNextUpdate.INFINITY);
|
|
174
176
|
|
|
175
177
|
// Past.
|
|
176
178
|
// Is at zero point.
|
|
177
179
|
// The next step is seconds.
|
|
178
180
|
// Updates at the next step.
|
|
179
|
-
(0, _getTimeToNextUpdate.getStepChangesAt)({
|
|
181
|
+
(0, _chai.expect)((0, _getTimeToNextUpdate.getStepChangesAt)({
|
|
180
182
|
unit: 'second',
|
|
181
183
|
minTime: 1
|
|
182
184
|
}, 0, {
|
|
183
185
|
now: 0,
|
|
184
186
|
future: false,
|
|
185
187
|
prevStep: {}
|
|
186
|
-
}).
|
|
188
|
+
})).to.equal(1 * 1000);
|
|
187
189
|
|
|
188
190
|
// Future.
|
|
189
191
|
// Inside the first step.
|
|
190
192
|
// Updates after zero point.
|
|
191
|
-
(0, _getTimeToNextUpdate.getStepChangesAt)({
|
|
193
|
+
(0, _chai.expect)((0, _getTimeToNextUpdate.getStepChangesAt)({
|
|
192
194
|
unit: 'now'
|
|
193
195
|
}, 0.9 * 1000, {
|
|
194
196
|
now: 0,
|
|
195
197
|
future: true,
|
|
196
198
|
prevStep: undefined
|
|
197
|
-
}).
|
|
199
|
+
})).to.equal(0.9 * 1000 + 1);
|
|
198
200
|
|
|
199
201
|
// Future.
|
|
200
202
|
// The first step doesn't start at 0.
|
|
201
203
|
// Outside of the first step.
|
|
202
204
|
// Updates right after zero point.
|
|
203
|
-
(0, _getTimeToNextUpdate.getTimeToStepChange)(undefined, 0.9 * 1000, {
|
|
205
|
+
(0, _chai.expect)((0, _getTimeToNextUpdate.getTimeToStepChange)(undefined, 0.9 * 1000, {
|
|
204
206
|
now: 0,
|
|
205
207
|
future: true,
|
|
206
208
|
prevStep: undefined
|
|
207
|
-
}).
|
|
209
|
+
})).to.equal(0.9 * 1000 + 1);
|
|
208
210
|
|
|
209
211
|
// Past.
|
|
210
212
|
// The current step is `undefined`.
|
|
@@ -212,32 +214,32 @@ describe('getStepChangesAt', function () {
|
|
|
212
214
|
// The first step doesn't start at 0.
|
|
213
215
|
// Outside of the first step.
|
|
214
216
|
// Updates at entering the first step.
|
|
215
|
-
(0, _getTimeToNextUpdate.getStepChangesAt)({
|
|
217
|
+
(0, _chai.expect)((0, _getTimeToNextUpdate.getStepChangesAt)({
|
|
216
218
|
minTime: 1,
|
|
217
219
|
unit: 'second'
|
|
218
220
|
}, -0.9 * 1000, {
|
|
219
221
|
now: 0,
|
|
220
222
|
future: false,
|
|
221
223
|
prevStep: {}
|
|
222
|
-
}).
|
|
224
|
+
})).to.equal(0.1 * 1000);
|
|
223
225
|
|
|
224
226
|
// Future.
|
|
225
227
|
// The first step doesn't start at 0.
|
|
226
228
|
// Will output empty string after it exits the current step.
|
|
227
|
-
(0, _getTimeToNextUpdate.getStepChangesAt)({
|
|
229
|
+
(0, _chai.expect)((0, _getTimeToNextUpdate.getStepChangesAt)({
|
|
228
230
|
minTime: 1,
|
|
229
231
|
unit: 'second'
|
|
230
232
|
}, 1.1 * 1000, {
|
|
231
233
|
now: 0,
|
|
232
234
|
future: true,
|
|
233
235
|
prevStep: undefined
|
|
234
|
-
}).
|
|
236
|
+
})).to.equal(0.1 * 1000 + 1);
|
|
235
237
|
|
|
236
238
|
// Past.
|
|
237
239
|
// Next step is seconds.
|
|
238
240
|
// The "next" step doesn't have `minTime`,
|
|
239
241
|
// so "time to next update" couldn't be determined.
|
|
240
|
-
expect((0, _getTimeToNextUpdate.getStepChangesAt)({
|
|
242
|
+
(0, _chai.expect)((0, _getTimeToNextUpdate.getStepChangesAt)({
|
|
241
243
|
unit: 'unknown-time-unit'
|
|
242
244
|
}, 0, {
|
|
243
245
|
now: 0,
|
|
@@ -248,34 +250,34 @@ describe('getStepChangesAt', function () {
|
|
|
248
250
|
// Past.
|
|
249
251
|
// No next step.
|
|
250
252
|
// The last step never changes.
|
|
251
|
-
(0, _getTimeToNextUpdate.getTimeToStepChange)(undefined, 0, {
|
|
253
|
+
(0, _chai.expect)((0, _getTimeToNextUpdate.getTimeToStepChange)(undefined, 0, {
|
|
252
254
|
now: 0,
|
|
253
255
|
future: false,
|
|
254
256
|
isFirstStep: undefined
|
|
255
|
-
}).
|
|
257
|
+
})).to.equal(_getTimeToNextUpdate.INFINITY);
|
|
256
258
|
|
|
257
259
|
// Future.
|
|
258
260
|
// Current step is seconds.
|
|
259
261
|
// Updates after zero point.
|
|
260
|
-
(0, _getTimeToNextUpdate.getStepChangesAt)({
|
|
262
|
+
(0, _chai.expect)((0, _getTimeToNextUpdate.getStepChangesAt)({
|
|
261
263
|
unit: 'second'
|
|
262
264
|
}, 0, {
|
|
263
265
|
now: 0,
|
|
264
266
|
future: true,
|
|
265
267
|
prevStep: undefined
|
|
266
|
-
}).
|
|
268
|
+
})).to.equal(1);
|
|
267
269
|
|
|
268
270
|
// Past.
|
|
269
271
|
// Next step is minutes.
|
|
270
272
|
// Already at zero point, so no need to update at zero point.
|
|
271
|
-
(0, _getTimeToNextUpdate.getStepChangesAt)({
|
|
273
|
+
(0, _chai.expect)((0, _getTimeToNextUpdate.getStepChangesAt)({
|
|
272
274
|
minTime: 60,
|
|
273
275
|
formatAs: 'minute'
|
|
274
276
|
}, 0, {
|
|
275
277
|
now: 0,
|
|
276
278
|
future: false,
|
|
277
279
|
prevStep: {}
|
|
278
|
-
}).
|
|
280
|
+
})).to.equal(60 * 1000);
|
|
279
281
|
});
|
|
280
282
|
});
|
|
281
283
|
//# sourceMappingURL=getTimeToNextUpdate.test.js.map
|