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
package/commonjs/TimeAgo.test.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _mocha = require("mocha");
|
|
4
|
+
var _chai = require("chai");
|
|
3
5
|
var _TimeAgo = _interopRequireDefault(require("./TimeAgo.js"));
|
|
4
|
-
var _LocaleDataStore = require("./LocaleDataStore.js");
|
|
5
6
|
var _en = _interopRequireDefault(require("../locale/en.json"));
|
|
6
7
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
7
8
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
@@ -12,22 +13,22 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
12
13
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } // Load locale specific relative date/time messages
|
|
13
14
|
// Just so this function code is covered.
|
|
14
15
|
_TimeAgo["default"].setDefaultLocale('en');
|
|
15
|
-
describe("javascript-time-ago", function () {
|
|
16
|
-
it('should default to "round-minute" style', function () {
|
|
16
|
+
(0, _mocha.describe)("javascript-time-ago", function () {
|
|
17
|
+
(0, _mocha.it)('should default to "round-minute" style', function () {
|
|
17
18
|
var timeAgo = new _TimeAgo["default"]('en');
|
|
18
|
-
timeAgo.format(Date.now()).
|
|
19
|
-
timeAgo.format(Date.now() + 20 * 1000).
|
|
20
|
-
timeAgo.format(Date.now() + 1 * 60 * 1000).
|
|
21
|
-
timeAgo.format(Date.now() + 4 * 60 * 1000).
|
|
19
|
+
(0, _chai.expect)(timeAgo.format(Date.now())).to.equal('just now');
|
|
20
|
+
(0, _chai.expect)(timeAgo.format(Date.now() + 20 * 1000)).to.equal('in a moment');
|
|
21
|
+
(0, _chai.expect)(timeAgo.format(Date.now() + 1 * 60 * 1000)).to.equal('in 1 minute');
|
|
22
|
+
(0, _chai.expect)(timeAgo.format(Date.now() + 4 * 60 * 1000)).to.equal('in 4 minutes');
|
|
22
23
|
});
|
|
23
|
-
it('should tell `options` argument from `style` argument', function () {
|
|
24
|
+
(0, _mocha.it)('should tell `options` argument from `style` argument', function () {
|
|
24
25
|
var timeAgo = new _TimeAgo["default"]('en');
|
|
25
|
-
timeAgo.format(Date.now(), 'mini-now').
|
|
26
|
-
timeAgo.format(0, {
|
|
26
|
+
(0, _chai.expect)(timeAgo.format(Date.now(), 'mini-now')).to.equal('now');
|
|
27
|
+
(0, _chai.expect)(timeAgo.format(0, {
|
|
27
28
|
future: true,
|
|
28
29
|
now: 0
|
|
29
|
-
}).
|
|
30
|
-
timeAgo.format(0, {
|
|
30
|
+
})).to.equal('in a moment');
|
|
31
|
+
(0, _chai.expect)(timeAgo.format(0, {
|
|
31
32
|
labels: 'mini',
|
|
32
33
|
steps: [{
|
|
33
34
|
formatAs: 'now'
|
|
@@ -37,8 +38,8 @@ describe("javascript-time-ago", function () {
|
|
|
37
38
|
}, {
|
|
38
39
|
future: true,
|
|
39
40
|
now: 0
|
|
40
|
-
}).
|
|
41
|
-
timeAgo.format(0, {
|
|
41
|
+
})).to.equal('now');
|
|
42
|
+
(0, _chai.expect)(timeAgo.format(0, {
|
|
42
43
|
labels: ['mini'],
|
|
43
44
|
steps: [{
|
|
44
45
|
formatAs: 'now'
|
|
@@ -48,95 +49,95 @@ describe("javascript-time-ago", function () {
|
|
|
48
49
|
}, {
|
|
49
50
|
future: true,
|
|
50
51
|
now: 0
|
|
51
|
-
}).
|
|
52
|
+
})).to.equal('now');
|
|
52
53
|
// `flavour` is a legacy name of `labels` property.
|
|
53
|
-
timeAgo.format(0, {
|
|
54
|
+
(0, _chai.expect)(timeAgo.format(0, {
|
|
54
55
|
flavour: 'mini'
|
|
55
56
|
}, {
|
|
56
57
|
future: true,
|
|
57
58
|
now: 0
|
|
58
|
-
}).
|
|
59
|
-
timeAgo.format(0, {
|
|
59
|
+
})).to.equal('now');
|
|
60
|
+
(0, _chai.expect)(timeAgo.format(0, {
|
|
60
61
|
flavour: ['mini']
|
|
61
62
|
}, {
|
|
62
63
|
future: true,
|
|
63
64
|
now: 0
|
|
64
|
-
}).
|
|
65
|
-
timeAgo.format(0, {
|
|
65
|
+
})).to.equal('now');
|
|
66
|
+
(0, _chai.expect)(timeAgo.format(0, {
|
|
66
67
|
steps: [{
|
|
67
68
|
formatAs: 'minute'
|
|
68
69
|
}]
|
|
69
70
|
}, {
|
|
70
71
|
future: true,
|
|
71
72
|
now: 0
|
|
72
|
-
}).
|
|
73
|
+
})).to.equal('in 0 minutes');
|
|
73
74
|
// `gradation` is a legacy name of `steps` property.
|
|
74
|
-
timeAgo.format(0, {
|
|
75
|
+
(0, _chai.expect)(timeAgo.format(0, {
|
|
75
76
|
gradation: [{
|
|
76
77
|
formatAs: 'minute'
|
|
77
78
|
}]
|
|
78
79
|
}, {
|
|
79
80
|
future: true,
|
|
80
81
|
now: 0
|
|
81
|
-
}).
|
|
82
|
+
})).to.equal('in 0 minutes');
|
|
82
83
|
});
|
|
83
|
-
it('should try various label types until an appropriate one is found', function () {
|
|
84
|
+
(0, _mocha.it)('should try various label types until an appropriate one is found', function () {
|
|
84
85
|
var timeAgo = new _TimeAgo["default"]('en');
|
|
85
|
-
timeAgo.format(Date.now(), {
|
|
86
|
+
(0, _chai.expect)(timeAgo.format(Date.now(), {
|
|
86
87
|
labels: ['exotic', 'short']
|
|
87
|
-
}).
|
|
88
|
+
})).to.equal('just now');
|
|
88
89
|
});
|
|
89
|
-
it('should support the legacy name "flavour" of "labels"', function () {
|
|
90
|
+
(0, _mocha.it)('should support the legacy name "flavour" of "labels"', function () {
|
|
90
91
|
var timeAgo = new _TimeAgo["default"]('en');
|
|
91
|
-
timeAgo.format(Date.now(), {
|
|
92
|
+
(0, _chai.expect)(timeAgo.format(Date.now(), {
|
|
92
93
|
labels: ['exotic', 'short']
|
|
93
|
-
}).
|
|
94
|
+
})).to.equal('just now');
|
|
94
95
|
});
|
|
95
|
-
it('should fallback to "second.current" for "now" when "now" is not defined', function () {
|
|
96
|
+
(0, _mocha.it)('should fallback to "second.current" for "now" when "now" is not defined', function () {
|
|
96
97
|
var timeAgo = new _TimeAgo["default"]('en');
|
|
97
98
|
var englishNow = _en["default"].now;
|
|
98
99
|
delete _en["default"].now;
|
|
99
100
|
_TimeAgo["default"].addLocale(_en["default"]);
|
|
100
101
|
_en["default"].now = undefined;
|
|
101
|
-
timeAgo.format(Date.now(), {
|
|
102
|
+
(0, _chai.expect)(timeAgo.format(Date.now(), {
|
|
102
103
|
labels: 'long'
|
|
103
|
-
}).
|
|
104
|
+
})).to.equal('now');
|
|
104
105
|
_en["default"].now = englishNow;
|
|
105
|
-
timeAgo.format(Date.now(), {
|
|
106
|
+
(0, _chai.expect)(timeAgo.format(Date.now(), {
|
|
106
107
|
labels: 'long'
|
|
107
|
-
}).
|
|
108
|
+
})).to.equal('just now');
|
|
108
109
|
});
|
|
109
|
-
it('should not use Intl.NumberFormat if it is not available', function () {
|
|
110
|
+
(0, _mocha.it)('should not use Intl.NumberFormat if it is not available', function () {
|
|
110
111
|
var NumberFormat = Intl.NumberFormat;
|
|
111
112
|
delete Intl.NumberFormat;
|
|
112
113
|
var timeAgo = new _TimeAgo["default"]('en');
|
|
113
|
-
timeAgo.format(Date.now() + 60 * 1000, {
|
|
114
|
+
(0, _chai.expect)(timeAgo.format(Date.now() + 60 * 1000, {
|
|
114
115
|
labels: 'long-time'
|
|
115
|
-
}).
|
|
116
|
+
})).to.equal('1 minute');
|
|
116
117
|
Intl.NumberFormat = NumberFormat;
|
|
117
118
|
});
|
|
118
|
-
it('should work when "past"/"future" messages are same for all quantifiers', function () {
|
|
119
|
+
(0, _mocha.it)('should work when "past"/"future" messages are same for all quantifiers', function () {
|
|
119
120
|
var timeAgo = new _TimeAgo["default"]('en');
|
|
120
|
-
timeAgo.format(Date.now() + 365 * 24 * 60 * 60 * 1000, {
|
|
121
|
+
(0, _chai.expect)(timeAgo.format(Date.now() + 365 * 24 * 60 * 60 * 1000, {
|
|
121
122
|
labels: 'short'
|
|
122
|
-
}).
|
|
123
|
+
})).to.equal('in 1 yr.');
|
|
123
124
|
});
|
|
124
|
-
it('should work when "now" is a string (does not differentiate between "past" and "future")', function () {
|
|
125
|
+
(0, _mocha.it)('should work when "now" is a string (does not differentiate between "past" and "future")', function () {
|
|
125
126
|
var timeAgo = new _TimeAgo["default"]('en');
|
|
126
127
|
var englishNow = _en["default"].now;
|
|
127
128
|
_en["default"].now = {
|
|
128
129
|
now: 'now'
|
|
129
130
|
};
|
|
130
131
|
_TimeAgo["default"].addLocale(_en["default"]);
|
|
131
|
-
timeAgo.format(Date.now(), {
|
|
132
|
+
(0, _chai.expect)(timeAgo.format(Date.now(), {
|
|
132
133
|
labels: 'long'
|
|
133
|
-
}).
|
|
134
|
+
})).to.equal('now');
|
|
134
135
|
_en["default"].now = englishNow;
|
|
135
|
-
timeAgo.format(Date.now(), {
|
|
136
|
+
(0, _chai.expect)(timeAgo.format(Date.now(), {
|
|
136
137
|
labels: 'long'
|
|
137
|
-
}).
|
|
138
|
+
})).to.equal('just now');
|
|
138
139
|
});
|
|
139
|
-
it('should work when a unit has formatting rules for "past" and "future" which are strings (style: not "long", not "short", not "narrow")', function () {
|
|
140
|
+
(0, _mocha.it)('should work when a unit has formatting rules for "past" and "future" which are strings (style: not "long", not "short", not "narrow")', function () {
|
|
140
141
|
var timeAgo = new _TimeAgo["default"]('en');
|
|
141
142
|
var englishLongTimeMinute = _en["default"]['long-time'].minute;
|
|
142
143
|
_en["default"]['long-time'].minute = {
|
|
@@ -145,96 +146,96 @@ describe("javascript-time-ago", function () {
|
|
|
145
146
|
};
|
|
146
147
|
_TimeAgo["default"].addLocale(_en["default"]);
|
|
147
148
|
// Past.
|
|
148
|
-
timeAgo.format(Date.now() - 60 * 1000, {
|
|
149
|
+
(0, _chai.expect)(timeAgo.format(Date.now() - 60 * 1000, {
|
|
149
150
|
labels: 'long-time'
|
|
150
|
-
}).
|
|
151
|
+
})).to.equal('1 minute(s) ago');
|
|
151
152
|
// Future (covers an "else" branch).
|
|
152
|
-
timeAgo.format(Date.now() + 60 * 1000, {
|
|
153
|
+
(0, _chai.expect)(timeAgo.format(Date.now() + 60 * 1000, {
|
|
153
154
|
labels: 'long-time'
|
|
154
|
-
}).
|
|
155
|
+
})).to.equal('in 1 minute(s)');
|
|
155
156
|
// Undo.
|
|
156
157
|
_en["default"]['long-time'].minute = englishLongTimeMinute;
|
|
157
|
-
timeAgo.format(Date.now() - 60 * 1000, {
|
|
158
|
+
(0, _chai.expect)(timeAgo.format(Date.now() - 60 * 1000, {
|
|
158
159
|
labels: 'long-time'
|
|
159
|
-
}).
|
|
160
|
+
})).to.equal('1 minute');
|
|
160
161
|
});
|
|
161
|
-
it("should format \"now\" for \"past\" time", function () {
|
|
162
|
+
(0, _mocha.it)("should format \"now\" for \"past\" time", function () {
|
|
162
163
|
var timeAgo = new _TimeAgo["default"]('en');
|
|
163
|
-
timeAgo.format(Date.now() + 10, {
|
|
164
|
+
(0, _chai.expect)(timeAgo.format(Date.now() + 10, {
|
|
164
165
|
labels: ['long']
|
|
165
|
-
}).
|
|
166
|
+
})).to.equal('in a moment');
|
|
166
167
|
});
|
|
167
|
-
it('should accept a string style name argument', function () {
|
|
168
|
+
(0, _mocha.it)('should accept a string style name argument', function () {
|
|
168
169
|
var timeAgo = new _TimeAgo["default"]('en');
|
|
169
170
|
// "mini".
|
|
170
|
-
timeAgo.format(Date.now() - 0 * 1000, 'mini').
|
|
171
|
-
timeAgo.format(Date.now() - 1 * 1000, 'mini').
|
|
171
|
+
(0, _chai.expect)(timeAgo.format(Date.now() - 0 * 1000, 'mini')).to.equal('0s');
|
|
172
|
+
(0, _chai.expect)(timeAgo.format(Date.now() - 1 * 1000, 'mini')).to.equal('1s');
|
|
172
173
|
// "mini-now".
|
|
173
|
-
timeAgo.format(Date.now() - 0 * 1000, 'mini-now').
|
|
174
|
-
timeAgo.format(Date.now() - 1 * 1000, 'mini-now').
|
|
174
|
+
(0, _chai.expect)(timeAgo.format(Date.now() - 0 * 1000, 'mini-now')).to.equal('now');
|
|
175
|
+
(0, _chai.expect)(timeAgo.format(Date.now() - 1 * 1000, 'mini-now')).to.equal('1s');
|
|
175
176
|
// "mini-minute-now".
|
|
176
|
-
timeAgo.format(Date.now() - 29 * 1000, 'mini-minute-now').
|
|
177
|
-
timeAgo.format(Date.now() - 60 * 1000, 'mini-minute-now').
|
|
177
|
+
(0, _chai.expect)(timeAgo.format(Date.now() - 29 * 1000, 'mini-minute-now')).to.equal('now');
|
|
178
|
+
(0, _chai.expect)(timeAgo.format(Date.now() - 60 * 1000, 'mini-minute-now')).to.equal('1m');
|
|
178
179
|
// "mini-minute".
|
|
179
|
-
timeAgo.format(Date.now() - 29 * 1000, 'mini-minute').
|
|
180
|
-
timeAgo.format(Date.now() - 60 * 1000, 'mini-minute').
|
|
180
|
+
(0, _chai.expect)(timeAgo.format(Date.now() - 29 * 1000, 'mini-minute')).to.equal('0m');
|
|
181
|
+
(0, _chai.expect)(timeAgo.format(Date.now() - 60 * 1000, 'mini-minute')).to.equal('1m');
|
|
181
182
|
// "twitter".
|
|
182
|
-
timeAgo.format(Date.now() - 0 * 1000, 'twitter').
|
|
183
|
-
timeAgo.format(Date.now() - 1 * 1000, 'twitter').
|
|
183
|
+
(0, _chai.expect)(timeAgo.format(Date.now() - 0 * 1000, 'twitter')).to.equal('0s');
|
|
184
|
+
(0, _chai.expect)(timeAgo.format(Date.now() - 1 * 1000, 'twitter')).to.equal('1s');
|
|
184
185
|
// "twitter-now".
|
|
185
|
-
timeAgo.format(Date.now() - 0 * 1000, 'twitter-now').
|
|
186
|
-
timeAgo.format(Date.now() - 1 * 1000, 'twitter-now').
|
|
186
|
+
(0, _chai.expect)(timeAgo.format(Date.now() - 0 * 1000, 'twitter-now')).to.equal('now');
|
|
187
|
+
(0, _chai.expect)(timeAgo.format(Date.now() - 1 * 1000, 'twitter-now')).to.equal('1s');
|
|
187
188
|
// "twitter-minute-now".
|
|
188
|
-
timeAgo.format(Date.now() - 29 * 1000, 'twitter-minute-now').
|
|
189
|
-
timeAgo.format(Date.now() - 60 * 1000, 'twitter-minute-now').
|
|
189
|
+
(0, _chai.expect)(timeAgo.format(Date.now() - 29 * 1000, 'twitter-minute-now')).to.equal('now');
|
|
190
|
+
(0, _chai.expect)(timeAgo.format(Date.now() - 60 * 1000, 'twitter-minute-now')).to.equal('1m');
|
|
190
191
|
// "twitter-minute".
|
|
191
|
-
timeAgo.format(Date.now() - 29 * 1000, 'twitter-minute').
|
|
192
|
-
timeAgo.format(Date.now() - 60 * 1000, 'twitter-minute').
|
|
192
|
+
(0, _chai.expect)(timeAgo.format(Date.now() - 29 * 1000, 'twitter-minute')).to.equal('0m');
|
|
193
|
+
(0, _chai.expect)(timeAgo.format(Date.now() - 60 * 1000, 'twitter-minute')).to.equal('1m');
|
|
193
194
|
// "twitter-first-minute".
|
|
194
|
-
timeAgo.format(Date.now() - 29 * 1000, 'twitter-first-minute').
|
|
195
|
-
timeAgo.format(Date.now() - 60 * 1000, 'twitter-first-minute').
|
|
195
|
+
(0, _chai.expect)(timeAgo.format(Date.now() - 29 * 1000, 'twitter-first-minute')).to.equal('');
|
|
196
|
+
(0, _chai.expect)(timeAgo.format(Date.now() - 60 * 1000, 'twitter-first-minute')).to.equal('1m');
|
|
196
197
|
// "approximate".
|
|
197
|
-
timeAgo.format(Date.now() - 45 * 1000, 'approximate').
|
|
198
|
+
(0, _chai.expect)(timeAgo.format(Date.now() - 45 * 1000, 'approximate')).to.equal('just now');
|
|
198
199
|
// "convenient" style was renamed to "approximate".
|
|
199
|
-
timeAgo.format(Date.now() - 45 * 1000, 'convenient').
|
|
200
|
-
timeAgo.format(Date.now() - 45 * 1000, 'round').
|
|
200
|
+
(0, _chai.expect)(timeAgo.format(Date.now() - 45 * 1000, 'convenient')).to.equal('just now');
|
|
201
|
+
(0, _chai.expect)(timeAgo.format(Date.now() - 45 * 1000, 'round')).to.equal('45 seconds ago');
|
|
201
202
|
// "default" style was renamed to "round".
|
|
202
|
-
timeAgo.format(Date.now() - 45 * 1000, 'default').
|
|
203
|
-
timeAgo.format(Date.now() - 29 * 1000, 'round-minute').
|
|
203
|
+
(0, _chai.expect)(timeAgo.format(Date.now() - 45 * 1000, 'default')).to.equal('45 seconds ago');
|
|
204
|
+
(0, _chai.expect)(timeAgo.format(Date.now() - 29 * 1000, 'round-minute')).to.equal('just now');
|
|
204
205
|
// "time" style was renamed to "approximate-time".
|
|
205
|
-
timeAgo.format(Date.now() - 2 * 60 * 1000, 'time').
|
|
206
|
-
timeAgo.format(Date.now() - 2 * 60 * 1000, 'approximate-time').
|
|
207
|
-
timeAgo.format(Date.now(), 'exotic').
|
|
206
|
+
(0, _chai.expect)(timeAgo.format(Date.now() - 2 * 60 * 1000, 'time')).to.equal('2 minutes');
|
|
207
|
+
(0, _chai.expect)(timeAgo.format(Date.now() - 2 * 60 * 1000, 'approximate-time')).to.equal('2 minutes');
|
|
208
|
+
(0, _chai.expect)(timeAgo.format(Date.now(), 'exotic')).to.equal('just now');
|
|
208
209
|
});
|
|
209
|
-
it('should accept empty constructor parameters', function () {
|
|
210
|
+
(0, _mocha.it)('should accept empty constructor parameters', function () {
|
|
210
211
|
var timeAgo = new _TimeAgo["default"]();
|
|
211
|
-
timeAgo.format(new Date()).
|
|
212
|
+
(0, _chai.expect)(timeAgo.format(new Date())).to.equal('just now');
|
|
212
213
|
});
|
|
213
|
-
it('should accept "mocked" Dates when testing', function () {
|
|
214
|
+
(0, _mocha.it)('should accept "mocked" Dates when testing', function () {
|
|
214
215
|
var timeAgo = new _TimeAgo["default"]('en');
|
|
215
216
|
var mockedDate = {
|
|
216
217
|
getTime: function getTime() {
|
|
217
218
|
return Date.now();
|
|
218
219
|
}
|
|
219
220
|
};
|
|
220
|
-
timeAgo.format(mockedDate).
|
|
221
|
+
(0, _chai.expect)(timeAgo.format(mockedDate)).to.equal('just now');
|
|
221
222
|
});
|
|
222
|
-
it('should not accept anything but Dates and timestamps', function () {
|
|
223
|
+
(0, _mocha.it)('should not accept anything but Dates and timestamps', function () {
|
|
223
224
|
var timeAgo = new _TimeAgo["default"]('en');
|
|
224
225
|
var thrower = function thrower() {
|
|
225
226
|
return timeAgo.format('Jan 14, 2017');
|
|
226
227
|
};
|
|
227
|
-
thrower.
|
|
228
|
+
(0, _chai.expect)(thrower).to["throw"]('Unsupported relative time formatter input: string, Jan 14, 2017');
|
|
228
229
|
});
|
|
229
|
-
it('should return an empty string if the specified units are not available in locale data', function () {
|
|
230
|
+
(0, _mocha.it)('should return an empty string if the specified units are not available in locale data', function () {
|
|
230
231
|
var timeAgo = new _TimeAgo["default"]('en');
|
|
231
|
-
timeAgo.format(Date.now(), {
|
|
232
|
+
(0, _chai.expect)(timeAgo.format(Date.now(), {
|
|
232
233
|
units: ['femtosecond']
|
|
233
|
-
}).
|
|
234
|
+
})).to.equal('');
|
|
234
235
|
});
|
|
235
|
-
it('should format for a style with "custom" function', function () {
|
|
236
|
+
(0, _mocha.it)('should format for a style with "custom" function', function () {
|
|
236
237
|
var timeAgo = new _TimeAgo["default"]('en');
|
|
237
|
-
timeAgo.format(Date.now(), {
|
|
238
|
+
(0, _chai.expect)(timeAgo.format(Date.now(), {
|
|
238
239
|
// `custom` returns a string
|
|
239
240
|
custom: function custom(_ref) {
|
|
240
241
|
var now = _ref.now,
|
|
@@ -243,8 +244,8 @@ describe("javascript-time-ago", function () {
|
|
|
243
244
|
locale = _ref.locale;
|
|
244
245
|
return locale;
|
|
245
246
|
}
|
|
246
|
-
}).
|
|
247
|
-
timeAgo.format(Date.now(), {
|
|
247
|
+
})).to.equal('en');
|
|
248
|
+
(0, _chai.expect)(timeAgo.format(Date.now(), {
|
|
248
249
|
// `custom` returns `undefined`
|
|
249
250
|
custom: function custom(_ref2) {
|
|
250
251
|
var now = _ref2.now,
|
|
@@ -253,11 +254,11 @@ describe("javascript-time-ago", function () {
|
|
|
253
254
|
locale = _ref2.locale;
|
|
254
255
|
return;
|
|
255
256
|
}
|
|
256
|
-
}).
|
|
257
|
+
})).to.equal('just now');
|
|
257
258
|
});
|
|
258
|
-
it('should throw an error when formating for a style with "custom" function and `getTimeToNextUpdate: true` parameter is passed', function () {
|
|
259
|
+
(0, _mocha.it)('should throw an error when formating for a style with "custom" function and `getTimeToNextUpdate: true` parameter is passed', function () {
|
|
259
260
|
var timeAgo = new _TimeAgo["default"]('en');
|
|
260
|
-
expect(function () {
|
|
261
|
+
(0, _chai.expect)(function () {
|
|
261
262
|
timeAgo.format(Date.now(), {
|
|
262
263
|
// `custom` returns a string.
|
|
263
264
|
custom: function custom(_ref3) {
|
|
@@ -272,16 +273,16 @@ describe("javascript-time-ago", function () {
|
|
|
272
273
|
});
|
|
273
274
|
}).to["throw"]('not supported');
|
|
274
275
|
});
|
|
275
|
-
it('should format future dates', function () {
|
|
276
|
-
new _TimeAgo["default"]('en').format(Date.now() + 60 * 60 * 1000).
|
|
277
|
-
new _TimeAgo["default"]('ru').format(Date.now() + 60 * 1000).
|
|
276
|
+
(0, _mocha.it)('should format future dates', function () {
|
|
277
|
+
(0, _chai.expect)(new _TimeAgo["default"]('en').format(Date.now() + 60 * 60 * 1000)).to.equal('in 1 hour');
|
|
278
|
+
(0, _chai.expect)(new _TimeAgo["default"]('ru').format(Date.now() + 60 * 1000)).to.equal('через 1 минуту');
|
|
278
279
|
});
|
|
279
|
-
it('should accept "future" option', function () {
|
|
280
|
+
(0, _mocha.it)('should accept "future" option', function () {
|
|
280
281
|
// "now" unit.
|
|
281
|
-
new _TimeAgo["default"]('en').format(Date.now()).
|
|
282
|
-
new _TimeAgo["default"]('en').format(Date.now(), 'approximate', {
|
|
282
|
+
(0, _chai.expect)(new _TimeAgo["default"]('en').format(Date.now())).to.equal('just now');
|
|
283
|
+
(0, _chai.expect)(new _TimeAgo["default"]('en').format(Date.now(), 'approximate', {
|
|
283
284
|
future: true
|
|
284
|
-
}).
|
|
285
|
+
})).to.equal('in a moment');
|
|
285
286
|
|
|
286
287
|
// Non-"now" unit, "long" style.
|
|
287
288
|
// const style = {
|
|
@@ -291,8 +292,8 @@ describe("javascript-time-ago", function () {
|
|
|
291
292
|
// }],
|
|
292
293
|
// labels: 'long'
|
|
293
294
|
// }
|
|
294
|
-
// new TimeAgo('en').format(Date.now(), style).
|
|
295
|
-
// new TimeAgo('en').format(Date.now(), style, { future: true }).
|
|
295
|
+
// expect(new TimeAgo('en').format(Date.now(), style)).to.equal('0 seconds ago')
|
|
296
|
+
// expect(new TimeAgo('en').format(Date.now(), style, { future: true })).to.equal('in 0 seconds')
|
|
296
297
|
|
|
297
298
|
// Non-"now" unit, "mini" style.
|
|
298
299
|
var style2 = {
|
|
@@ -301,12 +302,12 @@ describe("javascript-time-ago", function () {
|
|
|
301
302
|
}],
|
|
302
303
|
labels: 'mini'
|
|
303
304
|
};
|
|
304
|
-
new _TimeAgo["default"]('ru').format(Date.now() - 5 * 365 * 24 * 60 * 60 * 1000, style2).
|
|
305
|
-
new _TimeAgo["default"]('ru').format(Date.now() - 5 * 365 * 24 * 60 * 60 * 1000, style2, {
|
|
305
|
+
(0, _chai.expect)(new _TimeAgo["default"]('ru').format(Date.now() - 5 * 365 * 24 * 60 * 60 * 1000, style2)).to.equal('5 л');
|
|
306
|
+
(0, _chai.expect)(new _TimeAgo["default"]('ru').format(Date.now() - 5 * 365 * 24 * 60 * 60 * 1000, style2, {
|
|
306
307
|
future: true
|
|
307
|
-
}).
|
|
308
|
+
})).to.equal('5 л');
|
|
308
309
|
});
|
|
309
|
-
it('should support the legacy properties: "gradation", "flavour", "factor", "unit", "\'tiny\'" labels style', function () {
|
|
310
|
+
(0, _mocha.it)('should support the legacy properties: "gradation", "flavour", "factor", "unit", "\'tiny\'" labels style', function () {
|
|
310
311
|
// Non-"now" unit, "tiny" style.
|
|
311
312
|
var style = {
|
|
312
313
|
gradation: [{
|
|
@@ -315,34 +316,34 @@ describe("javascript-time-ago", function () {
|
|
|
315
316
|
}],
|
|
316
317
|
flavour: 'tiny'
|
|
317
318
|
};
|
|
318
|
-
new _TimeAgo["default"]('ru').format(Date.now() - 10 * 1000, style).
|
|
319
|
-
new _TimeAgo["default"]('ru').format(Date.now() - 10 * 1000, style, {
|
|
319
|
+
(0, _chai.expect)(new _TimeAgo["default"]('ru').format(Date.now() - 10 * 1000, style)).to.equal('2 г');
|
|
320
|
+
(0, _chai.expect)(new _TimeAgo["default"]('ru').format(Date.now() - 10 * 1000, style, {
|
|
320
321
|
future: true
|
|
321
|
-
}).
|
|
322
|
+
})).to.equal('2 г');
|
|
322
323
|
});
|
|
323
|
-
it('should have generated missing quantifier functions for locales that do not have it in CLDR data', function () {
|
|
324
|
-
new _TimeAgo["default"]('ccp').format(Date.now() + 60 * 1000).
|
|
324
|
+
(0, _mocha.it)('should have generated missing quantifier functions for locales that do not have it in CLDR data', function () {
|
|
325
|
+
(0, _chai.expect)(new _TimeAgo["default"]('ccp').format(Date.now() + 60 * 1000)).to.include(' 𑄟𑄨𑄚𑄨𑄘𑄬');
|
|
325
326
|
});
|
|
326
|
-
it('should throw for non-existing locales', function () {
|
|
327
|
-
(function () {
|
|
327
|
+
(0, _mocha.it)('should throw for non-existing locales', function () {
|
|
328
|
+
(0, _chai.expect)(function () {
|
|
328
329
|
return _TimeAgo["default"].addLocale();
|
|
329
|
-
}).
|
|
330
|
+
}).to["throw"]('No locale data passed');
|
|
330
331
|
});
|
|
331
|
-
it('should choose "future" variant of a label for `0` if "future: true" option is passed', function () {
|
|
332
|
+
(0, _mocha.it)('should choose "future" variant of a label for `0` if "future: true" option is passed', function () {
|
|
332
333
|
_TimeAgo["default"].addLocale(_en["default"]);
|
|
333
334
|
var secondLabels = _en["default"]['mini'].second;
|
|
334
335
|
_en["default"]['mini'].second = {
|
|
335
336
|
past: '{0} seconds ago',
|
|
336
337
|
future: 'in {0} seconds'
|
|
337
338
|
};
|
|
338
|
-
new _TimeAgo["default"]('en').format(Date.now(), {
|
|
339
|
+
(0, _chai.expect)(new _TimeAgo["default"]('en').format(Date.now(), {
|
|
339
340
|
steps: [{
|
|
340
341
|
unit: 'second'
|
|
341
342
|
}],
|
|
342
343
|
// Uses "mini" labels so that it doesn't use `Intl.RelativeTimeFormat`.
|
|
343
344
|
labels: 'mini'
|
|
344
|
-
}).
|
|
345
|
-
new _TimeAgo["default"]('en').format(Date.now(), {
|
|
345
|
+
})).to.equal('0 seconds ago');
|
|
346
|
+
(0, _chai.expect)(new _TimeAgo["default"]('en').format(Date.now(), {
|
|
346
347
|
steps: [{
|
|
347
348
|
unit: 'second'
|
|
348
349
|
}],
|
|
@@ -350,17 +351,29 @@ describe("javascript-time-ago", function () {
|
|
|
350
351
|
labels: 'mini'
|
|
351
352
|
}, {
|
|
352
353
|
future: true
|
|
353
|
-
}).
|
|
354
|
+
})).to.equal('in 0 seconds');
|
|
354
355
|
_en["default"]['mini'].second = secondLabels;
|
|
355
356
|
});
|
|
356
|
-
it('should refresh the label when `refresh` parameter is passed', function () {
|
|
357
|
+
(0, _mocha.it)('should refresh the label when `refresh` parameter is passed', function () {
|
|
357
358
|
var refreshedTimes = 0;
|
|
358
359
|
var timeAgo = new _TimeAgo["default"]('en');
|
|
359
360
|
// in 1 second -> in 0 seconds.
|
|
360
361
|
var _timeAgo$format = timeAgo.format(1000, 'twitter', {
|
|
361
362
|
refresh: function refresh(text) {
|
|
362
363
|
if (refreshedTimes === 0) {
|
|
363
|
-
|
|
364
|
+
// This test sometimes throws an error for an unknown weird reason:
|
|
365
|
+
//
|
|
366
|
+
// "AssertionError: expected '1s' to equal '0s'".
|
|
367
|
+
//
|
|
368
|
+
// "Error: done() called multiple times in test <javascript-time-ago
|
|
369
|
+
// should refresh the label when `refresh` parameter is passed> of file
|
|
370
|
+
// c:\dev\javascript-time-ago\source\TimeAgo.test.js; in addition,
|
|
371
|
+
// done() received error: AssertionError: expected +0 to equal 1"
|
|
372
|
+
//
|
|
373
|
+
// In case it does that, just re-run the tests and somehow the error is gone.
|
|
374
|
+
// I didn't bother debugging the error because it's not clear how it's reproduced.
|
|
375
|
+
//
|
|
376
|
+
(0, _chai.expect)(text).to.equal('0s');
|
|
364
377
|
} else {
|
|
365
378
|
throw new Error('Refresh should have been cancelled');
|
|
366
379
|
}
|
|
@@ -372,171 +385,171 @@ describe("javascript-time-ago", function () {
|
|
|
372
385
|
_timeAgo$format2 = _slicedToArray(_timeAgo$format, 2),
|
|
373
386
|
text = _timeAgo$format2[0],
|
|
374
387
|
cancelRefresh = _timeAgo$format2[1];
|
|
375
|
-
expect(text).to.equal('1s');
|
|
376
|
-
expect(cancelRefresh).to.be.a('function');
|
|
388
|
+
(0, _chai.expect)(text).to.equal('1s');
|
|
389
|
+
(0, _chai.expect)(cancelRefresh).to.be.a('function');
|
|
377
390
|
// Sidenote: `timeToNextUpdate` is `1`.
|
|
378
391
|
var timeToNextUpdate = 1;
|
|
379
392
|
return delay(timeToNextUpdate + 1).then(function () {
|
|
380
|
-
expect(refreshedTimes).to.equal(1);
|
|
393
|
+
(0, _chai.expect)(refreshedTimes).to.equal(1);
|
|
381
394
|
cancelRefresh();
|
|
382
395
|
});
|
|
383
396
|
});
|
|
384
|
-
it('should get time to next update (capped)', function () {
|
|
397
|
+
(0, _mocha.it)('should get time to next update (capped)', function () {
|
|
385
398
|
var timeAgo = new _TimeAgo["default"]('en');
|
|
386
399
|
// in 1 second -> in 0 seconds.
|
|
387
|
-
timeAgo.format(0.5 * 365 * 24 * 60 * 60 * 1000, 'twitter', {
|
|
400
|
+
(0, _chai.expect)(timeAgo.format(0.5 * 365 * 24 * 60 * 60 * 1000, 'twitter', {
|
|
388
401
|
getTimeToNextUpdate: true,
|
|
389
402
|
now: 0,
|
|
390
403
|
round: 'floor'
|
|
391
|
-
}).
|
|
404
|
+
})).to.deep.equal(['Jul 2', 2147483647]);
|
|
392
405
|
});
|
|
393
|
-
it('should get time to next update (capped)', function () {
|
|
406
|
+
(0, _mocha.it)('should get time to next update (capped)', function () {
|
|
394
407
|
var timeAgo = new _TimeAgo["default"]('en');
|
|
395
408
|
// in 1 second -> in 0 seconds.
|
|
396
|
-
timeAgo.format(0.5 * 365 * 24 * 60 * 60 * 1000, 'twitter', {
|
|
409
|
+
(0, _chai.expect)(timeAgo.format(0.5 * 365 * 24 * 60 * 60 * 1000, 'twitter', {
|
|
397
410
|
getTimeToNextUpdate: true,
|
|
398
411
|
getTimeToNextUpdateUncapped: true,
|
|
399
412
|
now: 0,
|
|
400
413
|
round: 'floor'
|
|
401
|
-
}).
|
|
414
|
+
})).to.deep.equal(['Jul 2', 15681600001]);
|
|
402
415
|
});
|
|
403
|
-
it('should get time to next update (uncapped)', function () {
|
|
416
|
+
(0, _mocha.it)('should get time to next update (uncapped)', function () {
|
|
404
417
|
var timeAgo = new _TimeAgo["default"]('en');
|
|
405
418
|
// in 1 second -> in 0 seconds.
|
|
406
|
-
timeAgo.format(1000, 'twitter', {
|
|
419
|
+
(0, _chai.expect)(timeAgo.format(1000, 'twitter', {
|
|
407
420
|
getTimeToNextUpdate: true,
|
|
408
421
|
now: 0,
|
|
409
422
|
round: 'floor'
|
|
410
|
-
}).
|
|
423
|
+
})).to.deep.equal(['1s', 1]);
|
|
411
424
|
});
|
|
412
|
-
it('should get time to next update (round: "floor")', function () {
|
|
425
|
+
(0, _mocha.it)('should get time to next update (round: "floor")', function () {
|
|
413
426
|
var timeAgo = new _TimeAgo["default"]('en');
|
|
414
427
|
// in 1 second -> in 0 seconds.
|
|
415
|
-
timeAgo.format(1000, 'twitter', {
|
|
428
|
+
(0, _chai.expect)(timeAgo.format(1000, 'twitter', {
|
|
416
429
|
getTimeToNextUpdate: true,
|
|
417
430
|
now: 0,
|
|
418
431
|
round: 'floor'
|
|
419
|
-
}).
|
|
432
|
+
})).to.deep.equal(['1s', 1]);
|
|
420
433
|
});
|
|
421
|
-
it('should get time to next update (round: "round")', function () {
|
|
434
|
+
(0, _mocha.it)('should get time to next update (round: "round")', function () {
|
|
422
435
|
var timeAgo = new _TimeAgo["default"]('en');
|
|
423
436
|
// in 1 second -> in 0 seconds.
|
|
424
|
-
timeAgo.format(1000, 'twitter', {
|
|
437
|
+
(0, _chai.expect)(timeAgo.format(1000, 'twitter', {
|
|
425
438
|
getTimeToNextUpdate: true,
|
|
426
439
|
now: 0
|
|
427
|
-
}).
|
|
440
|
+
})).to.deep.equal(['1s', 501]);
|
|
428
441
|
});
|
|
429
|
-
it('should get time to next update ("mini-now" style) (round: "floor")', function () {
|
|
442
|
+
(0, _mocha.it)('should get time to next update ("mini-now" style) (round: "floor")', function () {
|
|
430
443
|
var timeAgo = new _TimeAgo["default"]('en');
|
|
431
444
|
// In 1 minute.
|
|
432
|
-
timeAgo.format(60 * 1000, 'mini-now', {
|
|
445
|
+
(0, _chai.expect)(timeAgo.format(60 * 1000, 'mini-now', {
|
|
433
446
|
getTimeToNextUpdate: true,
|
|
434
447
|
now: 0,
|
|
435
448
|
round: 'floor'
|
|
436
|
-
}).
|
|
449
|
+
})).to.deep.equal(['1m', 1]);
|
|
437
450
|
// Almost in 1 minute.
|
|
438
|
-
timeAgo.format(60 * 1000, 'mini-now', {
|
|
451
|
+
(0, _chai.expect)(timeAgo.format(60 * 1000, 'mini-now', {
|
|
439
452
|
getTimeToNextUpdate: true,
|
|
440
453
|
now: 1,
|
|
441
454
|
round: 'floor'
|
|
442
|
-
}).
|
|
455
|
+
})).to.deep.equal(['59s', 1000]);
|
|
443
456
|
// In 1 second.
|
|
444
|
-
timeAgo.format(60 * 1000, 'mini-now', {
|
|
457
|
+
(0, _chai.expect)(timeAgo.format(60 * 1000, 'mini-now', {
|
|
445
458
|
getTimeToNextUpdate: true,
|
|
446
459
|
now: 59 * 1000,
|
|
447
460
|
round: 'floor'
|
|
448
|
-
}).
|
|
461
|
+
})).to.deep.equal(['1s', 1]);
|
|
449
462
|
// Almost in 1 second.
|
|
450
|
-
timeAgo.format(60 * 1000, 'mini-now', {
|
|
463
|
+
(0, _chai.expect)(timeAgo.format(60 * 1000, 'mini-now', {
|
|
451
464
|
getTimeToNextUpdate: true,
|
|
452
465
|
now: 59 * 1000 + 1,
|
|
453
466
|
round: 'floor'
|
|
454
|
-
}).
|
|
467
|
+
})).to.deep.equal(['now',
|
|
455
468
|
// Right after zero point.
|
|
456
469
|
1000]);
|
|
457
470
|
// Zero point (future to past).
|
|
458
471
|
// `future: true`.
|
|
459
|
-
timeAgo.format(60 * 1000, 'mini-now', {
|
|
472
|
+
(0, _chai.expect)(timeAgo.format(60 * 1000, 'mini-now', {
|
|
460
473
|
getTimeToNextUpdate: true,
|
|
461
474
|
now: 60 * 1000,
|
|
462
475
|
future: true,
|
|
463
476
|
round: 'floor'
|
|
464
|
-
}).
|
|
477
|
+
})).to.deep.equal(['now', 1]);
|
|
465
478
|
// Zero point (future to past).
|
|
466
479
|
// `future: false`.
|
|
467
|
-
timeAgo.format(60 * 1000, 'mini-now', {
|
|
480
|
+
(0, _chai.expect)(timeAgo.format(60 * 1000, 'mini-now', {
|
|
468
481
|
getTimeToNextUpdate: true,
|
|
469
482
|
now: 60 * 1000,
|
|
470
483
|
round: 'floor'
|
|
471
|
-
}).
|
|
484
|
+
})).to.deep.equal(['now', 1000]);
|
|
472
485
|
// Right after zero point (past).
|
|
473
|
-
timeAgo.format(60 * 1000, 'mini-now', {
|
|
486
|
+
(0, _chai.expect)(timeAgo.format(60 * 1000, 'mini-now', {
|
|
474
487
|
getTimeToNextUpdate: true,
|
|
475
488
|
now: 60 * 1000 + 1,
|
|
476
489
|
round: 'floor'
|
|
477
|
-
}).
|
|
490
|
+
})).to.deep.equal(['now', 1000 - 1]);
|
|
478
491
|
// 1 second ago.
|
|
479
|
-
timeAgo.format(60 * 1000, 'mini-now', {
|
|
492
|
+
(0, _chai.expect)(timeAgo.format(60 * 1000, 'mini-now', {
|
|
480
493
|
getTimeToNextUpdate: true,
|
|
481
494
|
now: 60 * 1000 + 1000,
|
|
482
495
|
round: 'floor'
|
|
483
|
-
}).
|
|
496
|
+
})).to.deep.equal(['1s', 1000]);
|
|
484
497
|
});
|
|
485
|
-
it('should get time to next update ("mini-now" style) (round: "round")', function () {
|
|
498
|
+
(0, _mocha.it)('should get time to next update ("mini-now" style) (round: "round")', function () {
|
|
486
499
|
var timeAgo = new _TimeAgo["default"]('en');
|
|
487
500
|
// In 1 minute.
|
|
488
|
-
timeAgo.format(60 * 1000, 'mini-now', {
|
|
501
|
+
(0, _chai.expect)(timeAgo.format(60 * 1000, 'mini-now', {
|
|
489
502
|
getTimeToNextUpdate: true,
|
|
490
503
|
now: 0
|
|
491
|
-
}).
|
|
504
|
+
})).to.deep.equal(['1m', 500 + 1]);
|
|
492
505
|
// Almost in 1 minute.
|
|
493
|
-
timeAgo.format(60 * 1000, 'mini-now', {
|
|
506
|
+
(0, _chai.expect)(timeAgo.format(60 * 1000, 'mini-now', {
|
|
494
507
|
getTimeToNextUpdate: true,
|
|
495
508
|
now: 500 + 1
|
|
496
|
-
}).
|
|
509
|
+
})).to.deep.equal(['59s', 1000]);
|
|
497
510
|
// In 1 second.
|
|
498
|
-
timeAgo.format(60 * 1000, 'mini-now', {
|
|
511
|
+
(0, _chai.expect)(timeAgo.format(60 * 1000, 'mini-now', {
|
|
499
512
|
getTimeToNextUpdate: true,
|
|
500
513
|
now: 59.5 * 1000
|
|
501
|
-
}).
|
|
514
|
+
})).to.deep.equal(['1s', 1]);
|
|
502
515
|
// Almost in 1 second.
|
|
503
|
-
timeAgo.format(60 * 1000, 'mini-now', {
|
|
516
|
+
(0, _chai.expect)(timeAgo.format(60 * 1000, 'mini-now', {
|
|
504
517
|
getTimeToNextUpdate: true,
|
|
505
518
|
now: 59.5 * 1000 + 1
|
|
506
|
-
}).
|
|
519
|
+
})).to.deep.equal(['now',
|
|
507
520
|
// Right after zero point.
|
|
508
521
|
500]);
|
|
509
522
|
// Zero point (future to past).
|
|
510
523
|
// `future: true`.
|
|
511
|
-
timeAgo.format(60 * 1000, 'mini-now', {
|
|
524
|
+
(0, _chai.expect)(timeAgo.format(60 * 1000, 'mini-now', {
|
|
512
525
|
getTimeToNextUpdate: true,
|
|
513
526
|
now: 60 * 1000,
|
|
514
527
|
future: true
|
|
515
|
-
}).
|
|
528
|
+
})).to.deep.equal(['now', 1]);
|
|
516
529
|
// Zero point (future to past).
|
|
517
530
|
// `future: false`.
|
|
518
|
-
timeAgo.format(60 * 1000, 'mini-now', {
|
|
531
|
+
(0, _chai.expect)(timeAgo.format(60 * 1000, 'mini-now', {
|
|
519
532
|
getTimeToNextUpdate: true,
|
|
520
533
|
now: 60 * 1000
|
|
521
|
-
}).
|
|
534
|
+
})).to.deep.equal(['now', 500]);
|
|
522
535
|
// Right after zero point (past).
|
|
523
|
-
timeAgo.format(60 * 1000, 'mini-now', {
|
|
536
|
+
(0, _chai.expect)(timeAgo.format(60 * 1000, 'mini-now', {
|
|
524
537
|
getTimeToNextUpdate: true,
|
|
525
538
|
now: 60 * 1000 + 1
|
|
526
|
-
}).
|
|
539
|
+
})).to.deep.equal(['now', 500 - 1]);
|
|
527
540
|
// 1 second ago.
|
|
528
|
-
timeAgo.format(60 * 1000, 'mini-now', {
|
|
541
|
+
(0, _chai.expect)(timeAgo.format(60 * 1000, 'mini-now', {
|
|
529
542
|
getTimeToNextUpdate: true,
|
|
530
543
|
now: 60 * 1000 + 500
|
|
531
|
-
}).
|
|
544
|
+
})).to.deep.equal(['1s', 1000]);
|
|
532
545
|
});
|
|
533
|
-
it('should get time to next update (first step has non-zero "minTime") (round: "floor")', function () {
|
|
546
|
+
(0, _mocha.it)('should get time to next update (first step has non-zero "minTime") (round: "floor")', function () {
|
|
534
547
|
var timeAgo = new _TimeAgo["default"]('en');
|
|
535
548
|
|
|
536
549
|
// Future.
|
|
537
550
|
// Inside the first step.
|
|
538
551
|
// Updates soon.
|
|
539
|
-
timeAgo.format(60 * 1000, {
|
|
552
|
+
(0, _chai.expect)(timeAgo.format(60 * 1000, {
|
|
540
553
|
steps: [{
|
|
541
554
|
formatAs: 'minute',
|
|
542
555
|
minTime: 60
|
|
@@ -546,12 +559,12 @@ describe("javascript-time-ago", function () {
|
|
|
546
559
|
}, {
|
|
547
560
|
getTimeToNextUpdate: true,
|
|
548
561
|
now: -0.5 * 1000
|
|
549
|
-
}).
|
|
562
|
+
})).to.deep.equal(['1m', 0.5 * 1000 + 1]);
|
|
550
563
|
|
|
551
564
|
// Future.
|
|
552
565
|
// Outside of the first step.
|
|
553
566
|
// Updates right after zero point.
|
|
554
|
-
timeAgo.format(60 * 1000, {
|
|
567
|
+
(0, _chai.expect)(timeAgo.format(60 * 1000, {
|
|
555
568
|
steps: [{
|
|
556
569
|
formatAs: 'minute',
|
|
557
570
|
minTime: 60 * 1000
|
|
@@ -561,12 +574,12 @@ describe("javascript-time-ago", function () {
|
|
|
561
574
|
}, {
|
|
562
575
|
getTimeToNextUpdate: true,
|
|
563
576
|
now: 1 * 1000
|
|
564
|
-
}).
|
|
577
|
+
})).to.deep.equal(['', 59 * 1000 + 1]);
|
|
565
578
|
|
|
566
579
|
// Zero point.
|
|
567
580
|
// Outside of the first step.
|
|
568
581
|
// Updates at the first step's `minTime`.
|
|
569
|
-
timeAgo.format(60 * 1000, {
|
|
582
|
+
(0, _chai.expect)(timeAgo.format(60 * 1000, {
|
|
570
583
|
steps: [{
|
|
571
584
|
formatAs: 'minute',
|
|
572
585
|
minTime: 60
|
|
@@ -576,12 +589,12 @@ describe("javascript-time-ago", function () {
|
|
|
576
589
|
}, {
|
|
577
590
|
getTimeToNextUpdate: true,
|
|
578
591
|
now: 60 * 1000
|
|
579
|
-
}).
|
|
592
|
+
})).to.deep.equal(['', 60 * 1000]);
|
|
580
593
|
|
|
581
594
|
// Past.
|
|
582
595
|
// Inside the first step.
|
|
583
596
|
// Updates at the next minute.
|
|
584
|
-
timeAgo.format(60 * 1000, {
|
|
597
|
+
(0, _chai.expect)(timeAgo.format(60 * 1000, {
|
|
585
598
|
steps: [{
|
|
586
599
|
formatAs: 'minute',
|
|
587
600
|
minTime: 60
|
|
@@ -591,60 +604,60 @@ describe("javascript-time-ago", function () {
|
|
|
591
604
|
}, {
|
|
592
605
|
getTimeToNextUpdate: true,
|
|
593
606
|
now: 60 * 1000 + 60 * 1000
|
|
594
|
-
}).
|
|
607
|
+
})).to.deep.equal(['1m', 60 * 1000]);
|
|
595
608
|
|
|
596
609
|
// Almost in 1 minute.
|
|
597
|
-
timeAgo.format(60 * 1000, 'mini-now', {
|
|
610
|
+
(0, _chai.expect)(timeAgo.format(60 * 1000, 'mini-now', {
|
|
598
611
|
getTimeToNextUpdate: true,
|
|
599
612
|
now: 1,
|
|
600
613
|
round: 'floor'
|
|
601
|
-
}).
|
|
614
|
+
})).to.deep.equal(['59s', 1000]);
|
|
602
615
|
// In 1 second.
|
|
603
|
-
timeAgo.format(60 * 1000, 'mini-now', {
|
|
616
|
+
(0, _chai.expect)(timeAgo.format(60 * 1000, 'mini-now', {
|
|
604
617
|
getTimeToNextUpdate: true,
|
|
605
618
|
now: 59 * 1000,
|
|
606
619
|
round: 'floor'
|
|
607
|
-
}).
|
|
620
|
+
})).to.deep.equal(['1s', 1]);
|
|
608
621
|
// Almost in 1 second.
|
|
609
622
|
// Updates right after the zero point.
|
|
610
|
-
timeAgo.format(60 * 1000, 'mini-now', {
|
|
623
|
+
(0, _chai.expect)(timeAgo.format(60 * 1000, 'mini-now', {
|
|
611
624
|
getTimeToNextUpdate: true,
|
|
612
625
|
now: 59 * 1000 + 1,
|
|
613
626
|
round: 'floor'
|
|
614
|
-
}).
|
|
627
|
+
})).to.deep.equal(['now', 1000]);
|
|
615
628
|
// Zero point (future to past).
|
|
616
629
|
// `future: true`.
|
|
617
630
|
// Updates right after zero point.
|
|
618
|
-
timeAgo.format(60 * 1000, 'mini-now', {
|
|
631
|
+
(0, _chai.expect)(timeAgo.format(60 * 1000, 'mini-now', {
|
|
619
632
|
getTimeToNextUpdate: true,
|
|
620
633
|
now: 60 * 1000,
|
|
621
634
|
future: true,
|
|
622
635
|
round: 'floor'
|
|
623
|
-
}).
|
|
636
|
+
})).to.deep.equal(['now', 1]);
|
|
624
637
|
// Zero point (future to past).
|
|
625
638
|
// `future: false`.
|
|
626
639
|
// Updates at the next second.
|
|
627
|
-
timeAgo.format(60 * 1000, 'mini-now', {
|
|
640
|
+
(0, _chai.expect)(timeAgo.format(60 * 1000, 'mini-now', {
|
|
628
641
|
getTimeToNextUpdate: true,
|
|
629
642
|
now: 60 * 1000,
|
|
630
643
|
round: 'floor'
|
|
631
|
-
}).
|
|
644
|
+
})).to.deep.equal(['now', 1000]);
|
|
632
645
|
// Right after zero point (past).
|
|
633
|
-
timeAgo.format(60 * 1000, 'mini-now', {
|
|
646
|
+
(0, _chai.expect)(timeAgo.format(60 * 1000, 'mini-now', {
|
|
634
647
|
getTimeToNextUpdate: true,
|
|
635
648
|
now: 60 * 1000 + 1,
|
|
636
649
|
round: 'floor'
|
|
637
|
-
}).
|
|
650
|
+
})).to.deep.equal(['now', 1000 - 1]);
|
|
638
651
|
// 1 second ago.
|
|
639
|
-
timeAgo.format(60 * 1000, 'mini-now', {
|
|
652
|
+
(0, _chai.expect)(timeAgo.format(60 * 1000, 'mini-now', {
|
|
640
653
|
getTimeToNextUpdate: true,
|
|
641
654
|
now: 60 * 1000 + 1000,
|
|
642
655
|
round: 'floor'
|
|
643
|
-
}).
|
|
656
|
+
})).to.deep.equal(['1s', 1000]);
|
|
644
657
|
});
|
|
645
|
-
it('should pass `formatAs()` in `step.format()`', function () {
|
|
658
|
+
(0, _mocha.it)('should pass `formatAs()` in `step.format()`', function () {
|
|
646
659
|
var timeAgo = new _TimeAgo["default"]('en');
|
|
647
|
-
timeAgo.format(Date.now(), {
|
|
660
|
+
(0, _chai.expect)(timeAgo.format(Date.now(), {
|
|
648
661
|
labels: 'long',
|
|
649
662
|
steps: [{
|
|
650
663
|
format: function format(date, locale, _ref4) {
|
|
@@ -652,41 +665,41 @@ describe("javascript-time-ago", function () {
|
|
|
652
665
|
return formatAs('second', 1);
|
|
653
666
|
}
|
|
654
667
|
}]
|
|
655
|
-
}).
|
|
668
|
+
})).to.equal('in 1 second');
|
|
656
669
|
});
|
|
657
|
-
it('should support `polyfill: false` option', function () {
|
|
670
|
+
(0, _mocha.it)('should support `polyfill: false` option', function () {
|
|
658
671
|
var timeAgo = new _TimeAgo["default"]('en', {
|
|
659
672
|
polyfill: false
|
|
660
673
|
});
|
|
661
674
|
// Still uses "now" labels, even when not polyfilled.
|
|
662
|
-
timeAgo.format(0, 'round', {
|
|
675
|
+
(0, _chai.expect)(timeAgo.format(0, 'round', {
|
|
663
676
|
now: 0
|
|
664
|
-
}).
|
|
665
|
-
timeAgo.format(1000, 'round', {
|
|
677
|
+
})).to.equal('just now');
|
|
678
|
+
(0, _chai.expect)(timeAgo.format(1000, 'round', {
|
|
666
679
|
now: 0
|
|
667
|
-
}).
|
|
680
|
+
})).to.equal('in 1 second');
|
|
668
681
|
});
|
|
669
|
-
it('should not use Intl.NumberFormat if it is not available', function () {
|
|
682
|
+
(0, _mocha.it)('should not use Intl.NumberFormat if it is not available', function () {
|
|
670
683
|
var Intl = global.Intl;
|
|
671
684
|
global.Intl = undefined;
|
|
672
685
|
var timeAgo = new _TimeAgo["default"]('en');
|
|
673
|
-
timeAgo.format(1000, 'round', {
|
|
686
|
+
(0, _chai.expect)(timeAgo.format(1000, 'round', {
|
|
674
687
|
now: 0
|
|
675
|
-
}).
|
|
688
|
+
})).to.equal('in 1 second');
|
|
676
689
|
global.Intl = Intl;
|
|
677
690
|
});
|
|
678
|
-
it('should format `0` in past mode by default', function () {
|
|
679
|
-
new _TimeAgo["default"]('en').format(0, {
|
|
691
|
+
(0, _mocha.it)('should format `0` in past mode by default', function () {
|
|
692
|
+
(0, _chai.expect)(new _TimeAgo["default"]('en').format(0, {
|
|
680
693
|
labels: 'long',
|
|
681
694
|
steps: [{
|
|
682
695
|
formatAs: 'second'
|
|
683
696
|
}]
|
|
684
697
|
}, {
|
|
685
698
|
now: 0
|
|
686
|
-
}).
|
|
699
|
+
})).to.equal('0 seconds ago');
|
|
687
700
|
});
|
|
688
|
-
it('should format `0` in future mode when `future: true` option was passed', function () {
|
|
689
|
-
new _TimeAgo["default"]('en').format(0, {
|
|
701
|
+
(0, _mocha.it)('should format `0` in future mode when `future: true` option was passed', function () {
|
|
702
|
+
(0, _chai.expect)(new _TimeAgo["default"]('en').format(0, {
|
|
690
703
|
labels: 'long',
|
|
691
704
|
steps: [{
|
|
692
705
|
formatAs: 'second'
|
|
@@ -694,23 +707,23 @@ describe("javascript-time-ago", function () {
|
|
|
694
707
|
}, {
|
|
695
708
|
now: 0,
|
|
696
709
|
future: true
|
|
697
|
-
}).
|
|
710
|
+
})).to.equal('in 0 seconds');
|
|
698
711
|
});
|
|
699
|
-
it('should throw if a step does not define `formatAs` or `format()`', function () {
|
|
712
|
+
(0, _mocha.it)('should throw if a step does not define `formatAs` or `format()`', function () {
|
|
700
713
|
var timeAgo = new _TimeAgo["default"]('en');
|
|
701
|
-
expect(function () {
|
|
714
|
+
(0, _chai.expect)(function () {
|
|
702
715
|
return timeAgo.format(Date.now() + 1000, {
|
|
703
716
|
labels: 'long',
|
|
704
717
|
steps: [{}]
|
|
705
718
|
});
|
|
706
719
|
}).to["throw"]('Each step must define either `formatAs` or `format()`.');
|
|
707
720
|
});
|
|
708
|
-
it('should add default locale', function () {
|
|
709
|
-
_TimeAgo["default"].getDefaultLocale().
|
|
721
|
+
(0, _mocha.it)('should add default locale', function () {
|
|
722
|
+
(0, _chai.expect)(_TimeAgo["default"].getDefaultLocale()).to.equal('en');
|
|
710
723
|
_TimeAgo["default"].addDefaultLocale({
|
|
711
724
|
locale: 'el'
|
|
712
725
|
});
|
|
713
|
-
_TimeAgo["default"].getDefaultLocale().
|
|
726
|
+
(0, _chai.expect)(_TimeAgo["default"].getDefaultLocale()).to.equal('el');
|
|
714
727
|
// Doesn't throw an error because the same locale is already specified as default.
|
|
715
728
|
_TimeAgo["default"].addDefaultLocale({
|
|
716
729
|
locale: 'el'
|
|
@@ -723,32 +736,32 @@ describe("javascript-time-ago", function () {
|
|
|
723
736
|
// }).to.throw('but you have already added "el" as the default locale.')
|
|
724
737
|
_TimeAgo["default"].setDefaultLocale('en');
|
|
725
738
|
});
|
|
726
|
-
it('should support "floor" rounding', function () {
|
|
739
|
+
(0, _mocha.it)('should support "floor" rounding', function () {
|
|
727
740
|
var timeAgo = new _TimeAgo["default"]('en');
|
|
728
|
-
timeAgo.format(0.9 * 1000, 'twitter', {
|
|
741
|
+
(0, _chai.expect)(timeAgo.format(0.9 * 1000, 'twitter', {
|
|
729
742
|
now: 0,
|
|
730
743
|
round: 'floor'
|
|
731
|
-
}).
|
|
732
|
-
timeAgo.format(1 * 1000, 'twitter', {
|
|
744
|
+
})).to.equal('0s');
|
|
745
|
+
(0, _chai.expect)(timeAgo.format(1 * 1000, 'twitter', {
|
|
733
746
|
now: 0,
|
|
734
747
|
round: 'floor'
|
|
735
|
-
}).
|
|
736
|
-
timeAgo.format(1.9 * 1000, 'twitter', {
|
|
748
|
+
})).to.equal('1s');
|
|
749
|
+
(0, _chai.expect)(timeAgo.format(1.9 * 1000, 'twitter', {
|
|
737
750
|
now: 0,
|
|
738
751
|
round: 'floor'
|
|
739
|
-
}).
|
|
740
|
-
timeAgo.format(2 * 1000, 'twitter', {
|
|
752
|
+
})).to.equal('1s');
|
|
753
|
+
(0, _chai.expect)(timeAgo.format(2 * 1000, 'twitter', {
|
|
741
754
|
now: 0,
|
|
742
755
|
round: 'floor'
|
|
743
|
-
}).
|
|
744
|
-
timeAgo.format(1.9 * 60 * 1000, 'twitter', {
|
|
756
|
+
})).to.equal('2s');
|
|
757
|
+
(0, _chai.expect)(timeAgo.format(1.9 * 60 * 1000, 'twitter', {
|
|
745
758
|
now: 0,
|
|
746
759
|
round: 'floor'
|
|
747
|
-
}).
|
|
748
|
-
timeAgo.format(2 * 60 * 1000, 'twitter', {
|
|
760
|
+
})).to.equal('1m');
|
|
761
|
+
(0, _chai.expect)(timeAgo.format(2 * 60 * 1000, 'twitter', {
|
|
749
762
|
now: 0,
|
|
750
763
|
round: 'floor'
|
|
751
|
-
}).
|
|
764
|
+
})).to.equal('2m');
|
|
752
765
|
});
|
|
753
766
|
});
|
|
754
767
|
function delay(delayTime) {
|