javascript-time-ago 2.5.11 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -1
- package/README.md +410 -272
- 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.js +72 -0
- package/commonjs/FullDateFormatter.js.map +1 -0
- package/commonjs/FullDateFormatter.test.js +26 -0
- package/commonjs/FullDateFormatter.test.js.map +1 -0
- package/commonjs/LocaleDataStore.js +2 -5
- package/commonjs/LocaleDataStore.js.map +1 -1
- package/commonjs/PropTypes.js +12 -12
- package/commonjs/PropTypes.js.map +1 -1
- package/commonjs/TimeAgo.js +300 -253
- package/commonjs/TimeAgo.js.map +1 -1
- package/commonjs/TimeAgo.test.js +214 -135
- package/commonjs/TimeAgo.test.js.map +1 -1
- package/commonjs/cache.js +7 -25
- package/commonjs/cache.js.map +1 -1
- package/commonjs/cache.test.js +1 -3
- package/commonjs/cache.test.js.map +1 -1
- package/commonjs/isStyleObject.js +9 -9
- package/commonjs/isStyleObject.js.map +1 -1
- package/commonjs/isStyleObject.test.js +1 -3
- package/commonjs/isStyleObject.test.js.map +1 -1
- package/commonjs/locale.js +6 -19
- package/commonjs/locale.js.map +1 -1
- package/commonjs/locale.test.js +2 -11
- package/commonjs/locale.test.js.map +1 -1
- package/commonjs/round.js +2 -5
- package/commonjs/round.js.map +1 -1
- package/commonjs/steps/approximate.js +1 -4
- package/commonjs/steps/approximate.js.map +1 -1
- package/commonjs/steps/approximate.test.js +1 -6
- package/commonjs/steps/approximate.test.js.map +1 -1
- package/commonjs/steps/getStep.js +36 -53
- package/commonjs/steps/getStep.js.map +1 -1
- package/commonjs/steps/getStep.test.js +7 -7
- package/commonjs/steps/getStep.test.js.map +1 -1
- package/commonjs/steps/getStepDenominator.js +2 -5
- package/commonjs/steps/getStepDenominator.js.map +1 -1
- package/commonjs/steps/getStepDenominator.test.js +1 -3
- package/commonjs/steps/getStepDenominator.test.js.map +1 -1
- package/commonjs/steps/getStepMinTime.js +31 -39
- package/commonjs/steps/getStepMinTime.js.map +1 -1
- package/commonjs/steps/getStepMinTime.test.js +1 -3
- package/commonjs/steps/getStepMinTime.test.js.map +1 -1
- package/commonjs/steps/getTimeToNextUpdate.js +27 -41
- package/commonjs/steps/getTimeToNextUpdate.js.map +1 -1
- package/commonjs/steps/getTimeToNextUpdate.test.js +29 -25
- package/commonjs/steps/getTimeToNextUpdate.test.js.map +1 -1
- package/commonjs/steps/getTimeToNextUpdateForUnit.js +3 -12
- package/commonjs/steps/getTimeToNextUpdateForUnit.js.map +1 -1
- package/commonjs/steps/getTimeToNextUpdateForUnit.test.js +1 -7
- package/commonjs/steps/getTimeToNextUpdateForUnit.test.js.map +1 -1
- package/commonjs/steps/helpers.js +1 -2
- package/commonjs/steps/helpers.js.map +1 -1
- package/commonjs/steps/helpers.test.js +0 -1
- package/commonjs/steps/helpers.test.js.map +1 -1
- package/commonjs/steps/index.js +1 -6
- package/commonjs/steps/index.js.map +1 -1
- package/commonjs/steps/renameLegacyProperties.js +6 -14
- package/commonjs/steps/renameLegacyProperties.js.map +1 -1
- package/commonjs/steps/renameLegacyProperties.test.js +1 -3
- package/commonjs/steps/renameLegacyProperties.test.js.map +1 -1
- package/commonjs/steps/round.js +1 -2
- package/commonjs/steps/round.js.map +1 -1
- package/commonjs/steps/round.test.js +1 -7
- package/commonjs/steps/round.test.js.map +1 -1
- package/commonjs/steps/units.js +10 -21
- package/commonjs/steps/units.js.map +1 -1
- package/commonjs/style/approximate.js +2 -6
- package/commonjs/style/approximate.js.map +1 -1
- package/commonjs/style/approximateTime.js +2 -6
- package/commonjs/style/approximateTime.js.map +1 -1
- package/commonjs/style/approximateTime.test.js +116 -75
- package/commonjs/style/approximateTime.test.js.map +1 -1
- package/commonjs/style/getStyleByName.js +3 -29
- package/commonjs/style/getStyleByName.js.map +1 -1
- package/commonjs/style/mini.js +9 -6
- package/commonjs/style/mini.js.map +1 -1
- package/commonjs/style/mini.test.js +15 -25
- package/commonjs/style/mini.test.js.map +1 -1
- package/commonjs/style/miniMinute.js +8 -13
- package/commonjs/style/miniMinute.js.map +1 -1
- package/commonjs/style/miniMinute.test.js +11 -17
- package/commonjs/style/miniMinute.test.js.map +1 -1
- package/commonjs/style/miniMinuteNow.js +8 -13
- package/commonjs/style/miniMinuteNow.js.map +1 -1
- package/commonjs/style/miniMinuteNow.test.js +11 -17
- package/commonjs/style/miniMinuteNow.test.js.map +1 -1
- package/commonjs/style/miniNow.js +8 -13
- package/commonjs/style/miniNow.js.map +1 -1
- package/commonjs/style/miniNow.test.js +11 -17
- package/commonjs/style/miniNow.test.js.map +1 -1
- package/commonjs/style/renameLegacyProperties.js +7 -13
- package/commonjs/style/renameLegacyProperties.js.map +1 -1
- package/commonjs/style/renameLegacyProperties.test.js +1 -4
- package/commonjs/style/renameLegacyProperties.test.js.map +1 -1
- package/commonjs/style/round.js +2 -6
- package/commonjs/style/round.js.map +1 -1
- package/commonjs/style/round.test.js +51 -67
- package/commonjs/style/round.test.js.map +1 -1
- package/commonjs/style/roundMinute.js +8 -13
- package/commonjs/style/roundMinute.js.map +1 -1
- package/commonjs/style/roundMinute.test.js +20 -27
- package/commonjs/style/roundMinute.test.js.map +1 -1
- package/commonjs/style/twitter.js +34 -39
- package/commonjs/style/twitter.js.map +1 -1
- package/commonjs/style/twitter.test.js +54 -57
- package/commonjs/style/twitter.test.js.map +1 -1
- package/commonjs/style/twitterFirstMinute.js +10 -15
- package/commonjs/style/twitterFirstMinute.js.map +1 -1
- package/commonjs/style/twitterFirstMinute.test.js +16 -23
- package/commonjs/style/twitterFirstMinute.test.js.map +1 -1
- package/commonjs/style/twitterMinute.js +8 -13
- package/commonjs/style/twitterMinute.js.map +1 -1
- package/commonjs/style/twitterMinute.test.js +20 -25
- package/commonjs/style/twitterMinute.test.js.map +1 -1
- package/commonjs/style/twitterMinuteNow.js +8 -13
- package/commonjs/style/twitterMinuteNow.js.map +1 -1
- package/commonjs/style/twitterMinuteNow.test.js +20 -25
- package/commonjs/style/twitterMinuteNow.test.js.map +1 -1
- package/commonjs/style/twitterNow.js +8 -13
- package/commonjs/style/twitterNow.js.map +1 -1
- package/commonjs/style/twitterNow.test.js +18 -24
- package/commonjs/style/twitterNow.test.js.map +1 -1
- package/full-date-formatter/index.cjs +4 -0
- package/full-date-formatter/index.cjs.js +9 -0
- package/full-date-formatter/index.d.ts +6 -0
- package/full-date-formatter/index.js +1 -0
- package/full-date-formatter/package.json +15 -0
- package/index.cjs +1 -1
- package/index.cjs.js +2 -2
- package/index.d.ts +14 -4
- package/index.js +3 -1
- package/load-all-locales/index.cjs +32 -0
- package/load-all-locales/index.cjs.js +32 -0
- package/load-all-locales/index.js +64 -0
- package/locale/ak/package.json +16 -0
- package/locale/ak.json +267 -0
- package/locale/ak.json.d.ts +4 -0
- package/locale/ak.json.js +267 -0
- package/locale/bal-Latn/package.json +16 -0
- package/locale/bal-Latn.json +240 -0
- package/locale/bal-Latn.json.d.ts +4 -0
- package/locale/bal-Latn.json.js +240 -0
- package/locale/be-tarask/package.json +16 -0
- package/locale/be-tarask.json +259 -0
- package/locale/be-tarask.json.d.ts +4 -0
- package/locale/be-tarask.json.js +259 -0
- package/locale/blo/package.json +16 -0
- package/locale/blo.json +159 -0
- package/locale/blo.json.d.ts +4 -0
- package/locale/blo.json.js +159 -0
- package/locale/bn.json +5 -2
- package/locale/bn.json.js +5 -2
- package/locale/bs.json +8 -2
- package/locale/bs.json.js +8 -2
- package/locale/ccp.json +2 -8
- package/locale/ccp.json.js +2 -8
- package/locale/csw/package.json +16 -0
- package/locale/csw.json +180 -0
- package/locale/csw.json.d.ts +4 -0
- package/locale/csw.json.js +180 -0
- package/locale/cy.json +6 -12
- package/locale/cy.json.js +6 -12
- package/locale/doi/package.json +16 -0
- package/locale/doi.json +159 -0
- package/locale/doi.json.d.ts +4 -0
- package/locale/doi.json.js +159 -0
- package/locale/en-AU.json +12 -12
- package/locale/en-AU.json.js +12 -12
- package/locale/en-CZ/package.json +16 -0
- package/locale/en-CZ.json +219 -0
- package/locale/en-CZ.json.d.ts +4 -0
- package/locale/en-CZ.json.js +219 -0
- package/locale/en-ES/package.json +16 -0
- package/locale/en-ES.json +219 -0
- package/locale/en-ES.json.d.ts +4 -0
- package/locale/en-ES.json.js +219 -0
- package/locale/en-FR/package.json +16 -0
- package/locale/en-FR.json +219 -0
- package/locale/en-FR.json.d.ts +4 -0
- package/locale/en-FR.json.js +219 -0
- package/locale/en-GS/package.json +16 -0
- package/locale/en-GS.json +219 -0
- package/locale/en-GS.json.d.ts +4 -0
- package/locale/en-GS.json.js +219 -0
- package/locale/en-HU/package.json +16 -0
- package/locale/en-HU.json +219 -0
- package/locale/en-HU.json.d.ts +4 -0
- package/locale/en-HU.json.js +219 -0
- package/locale/en-ID/package.json +16 -0
- package/locale/en-ID.json +219 -0
- package/locale/en-ID.json.d.ts +4 -0
- package/locale/en-ID.json.js +219 -0
- package/locale/en-IT/package.json +16 -0
- package/locale/en-IT.json +219 -0
- package/locale/en-IT.json.d.ts +4 -0
- package/locale/en-IT.json.js +219 -0
- package/locale/en-NO/package.json +16 -0
- package/locale/en-NO.json +219 -0
- package/locale/en-NO.json.d.ts +4 -0
- package/locale/en-NO.json.js +219 -0
- package/locale/en-PL/package.json +16 -0
- package/locale/en-PL.json +219 -0
- package/locale/en-PL.json.d.ts +4 -0
- package/locale/en-PL.json.js +219 -0
- package/locale/en-PT/package.json +16 -0
- package/locale/en-PT.json +219 -0
- package/locale/en-PT.json.d.ts +4 -0
- package/locale/en-PT.json.js +219 -0
- package/locale/en-RO/package.json +16 -0
- package/locale/en-RO.json +219 -0
- package/locale/en-RO.json.d.ts +4 -0
- package/locale/en-RO.json.js +219 -0
- package/locale/en-SK/package.json +16 -0
- package/locale/en-SK.json +219 -0
- package/locale/en-SK.json.d.ts +4 -0
- package/locale/en-SK.json.js +219 -0
- package/locale/es-MX.json +12 -9
- package/locale/es-MX.json.js +12 -9
- package/locale/es-SV.json +2 -2
- package/locale/es-SV.json.js +2 -2
- package/locale/eu.json +24 -24
- package/locale/eu.json.js +24 -24
- package/locale/ha.json +119 -65
- package/locale/ha.json.js +119 -65
- package/locale/he.json +0 -6
- package/locale/he.json.js +0 -6
- package/locale/hi-Latn.json +2 -2
- package/locale/hi-Latn.json.js +2 -2
- package/locale/ht/package.json +16 -0
- package/locale/ht.json +207 -0
- package/locale/ht.json.d.ts +4 -0
- package/locale/ht.json.js +207 -0
- package/locale/id.json +1 -1
- package/locale/id.json.js +1 -1
- package/locale/ie/package.json +16 -0
- package/locale/ie.json +159 -0
- package/locale/ie.json.d.ts +4 -0
- package/locale/ie.json.js +159 -0
- package/locale/ig.json +17 -17
- package/locale/ig.json.js +17 -17
- package/locale/ii/package.json +16 -0
- package/locale/ii.json +165 -0
- package/locale/ii.json.d.ts +4 -0
- package/locale/ii.json.js +165 -0
- package/locale/is.json +4 -1
- package/locale/is.json.js +4 -1
- package/locale/kaa/package.json +16 -0
- package/locale/kaa.json +159 -0
- package/locale/kaa.json.d.ts +4 -0
- package/locale/kaa.json.js +159 -0
- package/locale/kok-Latn/package.json +16 -0
- package/locale/kok-Latn.json +159 -0
- package/locale/kok-Latn.json.d.ts +4 -0
- package/locale/kok-Latn.json.js +159 -0
- package/locale/kok.json +8 -8
- package/locale/kok.json.js +8 -8
- package/locale/ks.json +9 -9
- package/locale/ks.json.js +9 -9
- package/locale/ku.json +55 -46
- package/locale/ku.json.js +55 -46
- package/locale/lld/package.json +16 -0
- package/locale/lld.json +291 -0
- package/locale/lld.json.d.ts +4 -0
- package/locale/lld.json.js +291 -0
- package/locale/mi.json +22 -22
- package/locale/mi.json.js +22 -22
- package/locale/ms-Arab/package.json +16 -0
- package/locale/ms-Arab.json +159 -0
- package/locale/ms-Arab.json.d.ts +4 -0
- package/locale/ms-Arab.json.js +159 -0
- package/locale/nb.json +2 -2
- package/locale/nb.json.js +2 -2
- package/locale/ne.json +1 -1
- package/locale/ne.json.js +1 -1
- package/locale/nn.json +4 -4
- package/locale/nn.json.js +4 -4
- package/locale/no.json +2 -2
- package/locale/no.json.js +2 -2
- package/locale/nqo/package.json +16 -0
- package/locale/nqo.json +159 -0
- package/locale/nqo.json.d.ts +4 -0
- package/locale/nqo.json.js +159 -0
- package/locale/om/package.json +16 -0
- package/locale/om.json +213 -0
- package/locale/om.json.d.ts +4 -0
- package/locale/om.json.js +213 -0
- package/locale/or.json +1 -1
- package/locale/or.json.js +1 -1
- package/locale/qu.json +46 -46
- package/locale/qu.json.js +46 -46
- package/locale/rhg/package.json +16 -0
- package/locale/rhg.json +159 -0
- package/locale/rhg.json.d.ts +4 -0
- package/locale/rhg.json.js +159 -0
- package/locale/sl.json +12 -12
- package/locale/sl.json.js +12 -12
- package/locale/sr-Cyrl-BA.json +2 -2
- package/locale/sr-Cyrl-BA.json.js +2 -2
- package/locale/sr-Latn-BA.json +2 -2
- package/locale/sr-Latn-BA.json.js +2 -2
- package/locale/sv.json +1 -1
- package/locale/sv.json.js +1 -1
- package/locale/syr/package.json +16 -0
- package/locale/syr.json +303 -0
- package/locale/syr.json.d.ts +4 -0
- package/locale/syr.json.js +303 -0
- package/locale/ti.json +6 -6
- package/locale/ti.json.js +6 -6
- package/locale/tn/package.json +16 -0
- package/locale/tn.json +159 -0
- package/locale/tn.json.d.ts +4 -0
- package/locale/tn.json.js +159 -0
- package/locale/to.json +26 -26
- package/locale/to.json.js +26 -26
- package/locale/uk.json +1 -1
- package/locale/uk.json.js +1 -1
- package/locale/ur-IN.json +9 -6
- package/locale/ur-IN.json.js +9 -6
- package/locale/vec/package.json +16 -0
- package/locale/vec.json +267 -0
- package/locale/vec.json.d.ts +4 -0
- package/locale/vec.json.js +267 -0
- package/locale/xnr/package.json +16 -0
- package/locale/xnr.json +159 -0
- package/locale/xnr.json.d.ts +4 -0
- package/locale/xnr.json.js +159 -0
- package/locale/yo-BJ.json +17 -17
- package/locale/yo-BJ.json.js +17 -17
- package/locale/yo.json +17 -17
- package/locale/yo.json.js +17 -17
- package/modules/FullDateFormatter.js +67 -0
- package/modules/FullDateFormatter.js.map +1 -0
- package/modules/FullDateFormatter.test.js +22 -0
- package/modules/FullDateFormatter.test.js.map +1 -0
- package/modules/LocaleDataStore.js +2 -3
- package/modules/LocaleDataStore.js.map +1 -1
- package/modules/PropTypes.js +11 -7
- package/modules/PropTypes.js.map +1 -1
- package/modules/TimeAgo.js +299 -237
- package/modules/TimeAgo.js.map +1 -1
- package/modules/TimeAgo.test.js +217 -119
- package/modules/TimeAgo.test.js.map +1 -1
- package/modules/cache.js +6 -22
- package/modules/cache.js.map +1 -1
- package/modules/cache.test.js.map +1 -1
- package/modules/isStyleObject.js +9 -7
- package/modules/isStyleObject.js.map +1 -1
- package/modules/isStyleObject.test.js.map +1 -1
- package/modules/locale.js +6 -16
- package/modules/locale.js.map +1 -1
- package/modules/locale.test.js +0 -4
- package/modules/locale.test.js.map +1 -1
- package/modules/round.js +2 -3
- package/modules/round.js.map +1 -1
- package/modules/steps/approximate.js +6 -2
- package/modules/steps/approximate.js.map +1 -1
- package/modules/steps/approximate.test.js +0 -2
- package/modules/steps/approximate.test.js.map +1 -1
- package/modules/steps/getStep.js +36 -48
- package/modules/steps/getStep.js.map +1 -1
- package/modules/steps/getStep.test.js +6 -2
- package/modules/steps/getStep.test.js.map +1 -1
- package/modules/steps/getStepDenominator.js +2 -3
- package/modules/steps/getStepDenominator.js.map +1 -1
- package/modules/steps/getStepDenominator.test.js.map +1 -1
- package/modules/steps/getStepMinTime.js +31 -36
- package/modules/steps/getStepMinTime.js.map +1 -1
- package/modules/steps/getStepMinTime.test.js.map +1 -1
- package/modules/steps/getTimeToNextUpdate.js +28 -32
- package/modules/steps/getTimeToNextUpdate.js.map +1 -1
- package/modules/steps/getTimeToNextUpdate.test.js +27 -18
- package/modules/steps/getTimeToNextUpdate.test.js.map +1 -1
- package/modules/steps/getTimeToNextUpdateForUnit.js +4 -10
- package/modules/steps/getTimeToNextUpdateForUnit.js.map +1 -1
- package/modules/steps/getTimeToNextUpdateForUnit.test.js +0 -4
- package/modules/steps/getTimeToNextUpdateForUnit.test.js.map +1 -1
- package/modules/steps/helpers.js +1 -1
- package/modules/steps/helpers.js.map +1 -1
- package/modules/steps/helpers.test.js.map +1 -1
- package/modules/steps/index.js +2 -1
- package/modules/steps/index.js.map +1 -1
- package/modules/steps/renameLegacyProperties.js +6 -13
- package/modules/steps/renameLegacyProperties.js.map +1 -1
- package/modules/steps/renameLegacyProperties.test.js.map +1 -1
- package/modules/steps/round.js.map +1 -1
- package/modules/steps/round.test.js +0 -3
- package/modules/steps/round.test.js.map +1 -1
- package/modules/steps/units.js +5 -9
- package/modules/steps/units.js.map +1 -1
- package/modules/style/approximate.js +5 -1
- package/modules/style/approximate.js.map +1 -1
- package/modules/style/approximateTime.js +6 -2
- package/modules/style/approximateTime.js.map +1 -1
- package/modules/style/approximateTime.test.js +115 -70
- package/modules/style/approximateTime.test.js.map +1 -1
- package/modules/style/getStyleByName.js +4 -17
- package/modules/style/getStyleByName.js.map +1 -1
- package/modules/style/mini.js +8 -4
- package/modules/style/mini.js.map +1 -1
- package/modules/style/mini.test.js +14 -20
- package/modules/style/mini.test.js.map +1 -1
- package/modules/style/miniMinute.js +6 -6
- package/modules/style/miniMinute.js.map +1 -1
- package/modules/style/miniMinute.test.js +10 -12
- package/modules/style/miniMinute.test.js.map +1 -1
- package/modules/style/miniMinuteNow.js +6 -6
- package/modules/style/miniMinuteNow.js.map +1 -1
- package/modules/style/miniMinuteNow.test.js +10 -12
- package/modules/style/miniMinuteNow.test.js.map +1 -1
- package/modules/style/miniNow.js +6 -6
- package/modules/style/miniNow.js.map +1 -1
- package/modules/style/miniNow.test.js +10 -12
- package/modules/style/miniNow.test.js.map +1 -1
- package/modules/style/renameLegacyProperties.js +8 -10
- package/modules/style/renameLegacyProperties.js.map +1 -1
- package/modules/style/renameLegacyProperties.test.js +0 -1
- package/modules/style/renameLegacyProperties.test.js.map +1 -1
- package/modules/style/round.js +3 -2
- package/modules/style/round.js.map +1 -1
- package/modules/style/round.test.js +50 -62
- package/modules/style/round.test.js.map +1 -1
- package/modules/style/roundMinute.js +8 -7
- package/modules/style/roundMinute.js.map +1 -1
- package/modules/style/roundMinute.test.js +19 -22
- package/modules/style/roundMinute.test.js.map +1 -1
- package/modules/style/twitter.js +36 -33
- package/modules/style/twitter.js.map +1 -1
- package/modules/style/twitter.test.js +53 -52
- package/modules/style/twitter.test.js.map +1 -1
- package/modules/style/twitterFirstMinute.js +8 -7
- package/modules/style/twitterFirstMinute.js.map +1 -1
- package/modules/style/twitterFirstMinute.test.js +15 -18
- package/modules/style/twitterFirstMinute.test.js.map +1 -1
- package/modules/style/twitterMinute.js +6 -6
- package/modules/style/twitterMinute.js.map +1 -1
- package/modules/style/twitterMinute.test.js +19 -20
- package/modules/style/twitterMinute.test.js.map +1 -1
- package/modules/style/twitterMinuteNow.js +6 -6
- package/modules/style/twitterMinuteNow.js.map +1 -1
- package/modules/style/twitterMinuteNow.test.js +19 -20
- package/modules/style/twitterMinuteNow.test.js.map +1 -1
- package/modules/style/twitterNow.js +6 -6
- package/modules/style/twitterNow.js.map +1 -1
- package/modules/style/twitterNow.test.js +17 -19
- package/modules/style/twitterNow.test.js.map +1 -1
- package/package.json +275 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"twitterFirstMinute.js","names":["minute","twitter","steps","filter","step","formatAs","map","minTime"],"sources":["../../source/style/twitterFirstMinute.js"],"sourcesContent":["import { minute } from '../steps/units.js'\r\nimport twitter from './twitter.js'\r\n\r\nexport default {\r\n\t...twitter,\r\n\t// Skip \"seconds\".\r\n\tsteps: twitter.steps.filter(step => step.formatAs !== 'second')\r\n\t\t// Start showing `1m` from the first minute.\r\n\t\t.map(step => step.formatAs === 'minute' ? { ...step, minTime: minute } : step)\r\n}"],"mappings":";;;;;;AAAA,SAASA,
|
|
1
|
+
{"version":3,"file":"twitterFirstMinute.js","names":["minute","twitter","_objectSpread","steps","filter","step","formatAs","map","minTime"],"sources":["../../source/style/twitterFirstMinute.js"],"sourcesContent":["import { minute } from '../steps/units.js'\r\nimport twitter from './twitter.js'\r\n\r\nexport default {\r\n\t...twitter,\r\n\t// Skip \"seconds\".\r\n\tsteps: twitter.steps.filter(step => step.formatAs !== 'second')\r\n\t\t// Start showing `1m` from the first minute.\r\n\t\t.map(step => step.formatAs === 'minute' ? { ...step, minTime: minute } : step)\r\n}"],"mappings":";;;;;;AAAA,SAASA,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,OAAO,MAAM,cAAc;AAElC,eAAAC,aAAA,CAAAA,aAAA,KACID,OAAO;EACV;EACAE,KAAK,EAAEF,OAAO,CAACE,KAAK,CAACC,MAAM,CAAC,UAAAC,IAAI;IAAA,OAAIA,IAAI,CAACC,QAAQ,KAAK,QAAQ;EAAA;EAC7D;EAAA,CACCC,GAAG,CAAC,UAAAF,IAAI;IAAA,OAAIA,IAAI,CAACC,QAAQ,KAAK,QAAQ,GAAAJ,aAAA,CAAAA,aAAA,KAAQG,IAAI;MAAEG,OAAO,EAAER;IAAM,KAAKK,IAAI;EAAA;AAAC","ignoreList":[]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function
|
|
2
|
-
|
|
3
|
-
function _objectSpread(
|
|
4
|
-
|
|
5
|
-
function
|
|
6
|
-
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import twitter from './twitterFirstMinute.js';
|
|
8
8
|
import TimeAgo from '../TimeAgo.js';
|
|
9
9
|
import { hour, minute, day, month, year } from '../steps/index.js';
|
|
@@ -15,7 +15,6 @@ describe('style/twitterFirstMinute', function () {
|
|
|
15
15
|
it('should format Twitter style relative time (English) (round: "floor")', function () {
|
|
16
16
|
var timeAgo = new TimeAgo('en');
|
|
17
17
|
var now = new Date(2016, 3, 10, 22, 59).getTime();
|
|
18
|
-
|
|
19
18
|
var formatInterval = function formatInterval(secondsPassed) {
|
|
20
19
|
return timeAgo.format(now - secondsPassed * 1000, _objectSpread(_objectSpread({
|
|
21
20
|
now: now
|
|
@@ -23,7 +22,6 @@ describe('style/twitterFirstMinute', function () {
|
|
|
23
22
|
round: 'floor'
|
|
24
23
|
}));
|
|
25
24
|
};
|
|
26
|
-
|
|
27
25
|
formatInterval(0).should.equal('');
|
|
28
26
|
formatInterval(0.9).should.equal('');
|
|
29
27
|
formatInterval(59.9).should.equal('');
|
|
@@ -31,31 +29,31 @@ describe('style/twitterFirstMinute', function () {
|
|
|
31
29
|
formatInterval(1.9 * minute).should.equal('1m');
|
|
32
30
|
formatInterval(2 * minute).should.equal('2m');
|
|
33
31
|
formatInterval(2.9 * minute).should.equal('2m');
|
|
34
|
-
formatInterval(3 * minute).should.equal('3m');
|
|
35
|
-
|
|
32
|
+
formatInterval(3 * minute).should.equal('3m');
|
|
33
|
+
// …
|
|
36
34
|
formatInterval(59.9 * minute).should.equal('59m');
|
|
37
35
|
formatInterval(60 * minute).should.equal('1h');
|
|
38
36
|
formatInterval(1.9 * hour).should.equal('1h');
|
|
39
37
|
formatInterval(2 * hour).should.equal('2h');
|
|
40
38
|
formatInterval(2.9 * hour).should.equal('2h');
|
|
41
|
-
formatInterval(3 * hour).should.equal('3h');
|
|
42
|
-
|
|
39
|
+
formatInterval(3 * hour).should.equal('3h');
|
|
40
|
+
// …
|
|
43
41
|
formatInterval(23.9 * hour).should.equal('23h');
|
|
44
|
-
formatInterval(day + 2 * minute + hour).should.equal('Apr 9');
|
|
42
|
+
formatInterval(day + 2 * minute + hour).should.equal('Apr 9');
|
|
43
|
+
// …
|
|
45
44
|
// `month` is about 30.5 days.
|
|
46
|
-
|
|
47
45
|
formatInterval(month * 3).should.equal('Jan 10');
|
|
48
46
|
formatInterval(month * 4).should.equal('Dec 11, 2015');
|
|
49
|
-
formatInterval(year).should.equal('Apr 11, 2015');
|
|
50
|
-
// `month` is about 30.5 days.
|
|
47
|
+
formatInterval(year).should.equal('Apr 11, 2015');
|
|
51
48
|
|
|
49
|
+
// Test future dates.
|
|
50
|
+
// `month` is about 30.5 days.
|
|
52
51
|
formatInterval(-1 * month * 8).should.equal('Dec 10');
|
|
53
52
|
formatInterval(-1 * month * 9).should.equal('Jan 9, 2017');
|
|
54
53
|
});
|
|
55
54
|
it('should format Twitter style relative time (English) (round: "round")', function () {
|
|
56
55
|
var timeAgo = new TimeAgo('en');
|
|
57
56
|
var now = new Date(2016, 3, 10, 22, 59).getTime();
|
|
58
|
-
|
|
59
57
|
var formatInterval = function formatInterval(secondsPassed) {
|
|
60
58
|
return timeAgo.format(now - secondsPassed * 1000, _objectSpread(_objectSpread({
|
|
61
59
|
now: now
|
|
@@ -63,7 +61,6 @@ describe('style/twitterFirstMinute', function () {
|
|
|
63
61
|
round: 'round'
|
|
64
62
|
}));
|
|
65
63
|
};
|
|
66
|
-
|
|
67
64
|
formatInterval(0).should.equal('');
|
|
68
65
|
formatInterval(59.9).should.equal('');
|
|
69
66
|
formatInterval(60).should.equal('1m');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"twitterFirstMinute.test.js","names":["twitter","TimeAgo","hour","minute","day","month","year","describe","it","timeAgo","format","Date","now","should","equal","getTime","formatInterval","secondsPassed","round"],"sources":["../../source/style/twitterFirstMinute.test.js"],"sourcesContent":["import twitter from './twitterFirstMinute.js'\r\nimport TimeAgo from '../TimeAgo.js'\r\nimport { hour, minute, day, month, year } from '../steps/index.js'\r\n\r\ndescribe('style/twitterFirstMinute', () => {\r\n\tit('should work with string name of the style', () => {\r\n\t\tconst timeAgo = new TimeAgo('en')\r\n\t\ttimeAgo.format(Date.now() - 3 * 60 * 60 * 1000, 'twitter-first-minute').should.equal('3h')\r\n\t})\r\n\r\n\tit('should format Twitter style relative time (English) (round: \"floor\")', () => {\r\n\t\tconst timeAgo = new TimeAgo('en')\r\n\r\n\t\tconst now = new Date(2016, 3, 10, 22, 59).getTime()\r\n\t\tconst formatInterval = (secondsPassed) => timeAgo.format(now - secondsPassed * 1000, { now, ...twitter, round: 'floor' })\r\n\r\n\t\tformatInterval(0).should.equal('')\r\n\t\tformatInterval(0.9).should.equal('')\r\n\t\tformatInterval(59.9).should.equal('')\r\n\t\tformatInterval(60).should.equal('1m')\r\n\t\tformatInterval(1.9 * minute).should.equal('1m')\r\n\t\tformatInterval(2 * minute).should.equal('2m')\r\n\t\tformatInterval(2.9 * minute).should.equal('2m')\r\n\t\tformatInterval(3 * minute).should.equal('3m')\r\n\t\t// …\r\n\t\tformatInterval(59.9 * minute).should.equal('59m')\r\n\t\tformatInterval(60 * minute).should.equal('1h')\r\n\t\tformatInterval(1.9 * hour).should.equal('1h')\r\n\t\tformatInterval(2 * hour).should.equal('2h')\r\n\t\tformatInterval(2.9 * hour).should.equal('2h')\r\n\t\tformatInterval(3 * hour).should.equal('3h')\r\n\t\t// …\r\n\t\tformatInterval(23.9 * hour).should.equal('23h')\r\n\t\tformatInterval(day + 2 * minute + hour).should.equal('Apr 9')\r\n\t\t// …\r\n\t\t// `month` is about 30.5 days.\r\n\t\tformatInterval(month * 3).should.equal('Jan 10')\r\n\t\tformatInterval(month * 4).should.equal('Dec 11, 2015')\r\n\t\tformatInterval(year).should.equal('Apr 11, 2015')\r\n\r\n\t\t// Test future dates.\r\n\t\t// `month` is about 30.5 days.\r\n\t\tformatInterval(-1 * month * 8).should.equal('Dec 10')\r\n\t\tformatInterval(-1 * month * 9).should.equal('Jan 9, 2017')\r\n\t})\r\n\r\n\tit('should format Twitter style relative time (English) (round: \"round\")', () => {\r\n\t\tconst timeAgo = new TimeAgo('en')\r\n\r\n\t\tconst now = new Date(2016, 3, 10, 22, 59).getTime()\r\n\t\tconst formatInterval = (secondsPassed) => timeAgo.format(now - secondsPassed * 1000, { now, ...twitter, round: 'round' })\r\n\r\n\t\tformatInterval(0).should.equal('')\r\n\t\tformatInterval(59.9).should.equal('')\r\n\t\tformatInterval(60).should.equal('1m')\r\n\t\tformatInterval(1.49 * minute).should.equal('1m')\r\n\t\tformatInterval(1.5 * minute).should.equal('2m')\r\n\t})\r\n})"],"mappings":";;;;;;AAAA,OAAOA,
|
|
1
|
+
{"version":3,"file":"twitterFirstMinute.test.js","names":["twitter","TimeAgo","hour","minute","day","month","year","describe","it","timeAgo","format","Date","now","should","equal","getTime","formatInterval","secondsPassed","_objectSpread","round"],"sources":["../../source/style/twitterFirstMinute.test.js"],"sourcesContent":["import twitter from './twitterFirstMinute.js'\r\nimport TimeAgo from '../TimeAgo.js'\r\nimport { hour, minute, day, month, year } from '../steps/index.js'\r\n\r\ndescribe('style/twitterFirstMinute', () => {\r\n\tit('should work with string name of the style', () => {\r\n\t\tconst timeAgo = new TimeAgo('en')\r\n\t\ttimeAgo.format(Date.now() - 3 * 60 * 60 * 1000, 'twitter-first-minute').should.equal('3h')\r\n\t})\r\n\r\n\tit('should format Twitter style relative time (English) (round: \"floor\")', () => {\r\n\t\tconst timeAgo = new TimeAgo('en')\r\n\r\n\t\tconst now = new Date(2016, 3, 10, 22, 59).getTime()\r\n\t\tconst formatInterval = (secondsPassed) => timeAgo.format(now - secondsPassed * 1000, { now, ...twitter, round: 'floor' })\r\n\r\n\t\tformatInterval(0).should.equal('')\r\n\t\tformatInterval(0.9).should.equal('')\r\n\t\tformatInterval(59.9).should.equal('')\r\n\t\tformatInterval(60).should.equal('1m')\r\n\t\tformatInterval(1.9 * minute).should.equal('1m')\r\n\t\tformatInterval(2 * minute).should.equal('2m')\r\n\t\tformatInterval(2.9 * minute).should.equal('2m')\r\n\t\tformatInterval(3 * minute).should.equal('3m')\r\n\t\t// …\r\n\t\tformatInterval(59.9 * minute).should.equal('59m')\r\n\t\tformatInterval(60 * minute).should.equal('1h')\r\n\t\tformatInterval(1.9 * hour).should.equal('1h')\r\n\t\tformatInterval(2 * hour).should.equal('2h')\r\n\t\tformatInterval(2.9 * hour).should.equal('2h')\r\n\t\tformatInterval(3 * hour).should.equal('3h')\r\n\t\t// …\r\n\t\tformatInterval(23.9 * hour).should.equal('23h')\r\n\t\tformatInterval(day + 2 * minute + hour).should.equal('Apr 9')\r\n\t\t// …\r\n\t\t// `month` is about 30.5 days.\r\n\t\tformatInterval(month * 3).should.equal('Jan 10')\r\n\t\tformatInterval(month * 4).should.equal('Dec 11, 2015')\r\n\t\tformatInterval(year).should.equal('Apr 11, 2015')\r\n\r\n\t\t// Test future dates.\r\n\t\t// `month` is about 30.5 days.\r\n\t\tformatInterval(-1 * month * 8).should.equal('Dec 10')\r\n\t\tformatInterval(-1 * month * 9).should.equal('Jan 9, 2017')\r\n\t})\r\n\r\n\tit('should format Twitter style relative time (English) (round: \"round\")', () => {\r\n\t\tconst timeAgo = new TimeAgo('en')\r\n\r\n\t\tconst now = new Date(2016, 3, 10, 22, 59).getTime()\r\n\t\tconst formatInterval = (secondsPassed) => timeAgo.format(now - secondsPassed * 1000, { now, ...twitter, round: 'round' })\r\n\r\n\t\tformatInterval(0).should.equal('')\r\n\t\tformatInterval(59.9).should.equal('')\r\n\t\tformatInterval(60).should.equal('1m')\r\n\t\tformatInterval(1.49 * minute).should.equal('1m')\r\n\t\tformatInterval(1.5 * minute).should.equal('2m')\r\n\t})\r\n})"],"mappings":";;;;;;AAAA,OAAOA,OAAO,MAAM,yBAAyB;AAC7C,OAAOC,OAAO,MAAM,eAAe;AACnC,SAASC,IAAI,EAAEC,MAAM,EAAEC,GAAG,EAAEC,KAAK,EAAEC,IAAI,QAAQ,mBAAmB;AAElEC,QAAQ,CAAC,0BAA0B,EAAE,YAAM;EAC1CC,EAAE,CAAC,2CAA2C,EAAE,YAAM;IACrD,IAAMC,OAAO,GAAG,IAAIR,OAAO,CAAC,IAAI,CAAC;IACjCQ,OAAO,CAACC,MAAM,CAACC,IAAI,CAACC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,sBAAsB,CAAC,CAACC,MAAM,CAACC,KAAK,CAAC,IAAI,CAAC;EAC3F,CAAC,CAAC;EAEFN,EAAE,CAAC,sEAAsE,EAAE,YAAM;IAChF,IAAMC,OAAO,GAAG,IAAIR,OAAO,CAAC,IAAI,CAAC;IAEjC,IAAMW,GAAG,GAAG,IAAID,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAACI,OAAO,CAAC,CAAC;IACnD,IAAMC,cAAc,GAAG,SAAjBA,cAA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GAAG,EAAHA;MAAG,GAAKZ,OAAO;QAAEmB,KAAK,EAAE;MAAO,EAAE,CAAC;IAAA;IAEzHH,cAAc,CAAC,CAAC,CAAC,CAACH,MAAM,CAACC,KAAK,CAAC,EAAE,CAAC;IAClCE,cAAc,CAAC,IAAI,CAAC,CAACH,MAAM,CAACC,KAAK,CAAC,EAAE,CAAC;IACrCE,cAAc,CAAC,EAAE,CAAC,CAACH,MAAM,CAACC,KAAK,CAAC,IAAI,CAAC;IACrCE,cAAc,CAAC,IAAI,GAAGb,MAAM,CAAC,CAACU,MAAM,CAACC,KAAK,CAAC,IAAI,CAAC;IAChDE,cAAc,CAAC,GAAG,GAAGb,MAAM,CAAC,CAACU,MAAM,CAACC,KAAK,CAAC,IAAI,CAAC;EAChD,CAAC,CAAC;AACH,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function
|
|
2
|
-
|
|
3
|
-
function _objectSpread(
|
|
4
|
-
|
|
5
|
-
function
|
|
6
|
-
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import twitter from './twitter.js';
|
|
8
8
|
export default _objectSpread(_objectSpread({}, twitter), {}, {
|
|
9
9
|
// Skip "seconds".
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"twitterMinute.js","names":["twitter","steps","filter","step","formatAs"],"sources":["../../source/style/twitterMinute.js"],"sourcesContent":["import twitter from './twitter.js'\r\n\r\nexport default {\r\n\t...twitter,\r\n\t// Skip \"seconds\".\r\n\tsteps: twitter.steps.filter(step => step.formatAs !== 'second')\r\n}"],"mappings":";;;;;;AAAA,OAAOA,
|
|
1
|
+
{"version":3,"file":"twitterMinute.js","names":["twitter","_objectSpread","steps","filter","step","formatAs"],"sources":["../../source/style/twitterMinute.js"],"sourcesContent":["import twitter from './twitter.js'\r\n\r\nexport default {\r\n\t...twitter,\r\n\t// Skip \"seconds\".\r\n\tsteps: twitter.steps.filter(step => step.formatAs !== 'second')\r\n}"],"mappings":";;;;;;AAAA,OAAOA,OAAO,MAAM,cAAc;AAElC,eAAAC,aAAA,CAAAA,aAAA,KACID,OAAO;EACV;EACAE,KAAK,EAAEF,OAAO,CAACE,KAAK,CAACC,MAAM,CAAC,UAAAC,IAAI;IAAA,OAAIA,IAAI,CAACC,QAAQ,KAAK,QAAQ;EAAA;AAAC","ignoreList":[]}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
function
|
|
2
|
-
|
|
3
|
-
function _objectSpread(
|
|
4
|
-
|
|
5
|
-
function
|
|
6
|
-
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import twitter from './twitterMinute.js';
|
|
8
8
|
import TimeAgo from '../TimeAgo.js';
|
|
9
9
|
import { hour, minute, day, month, year } from '../steps/index.js';
|
|
10
10
|
describe('style/twitterMinute', function () {
|
|
11
11
|
it('should format Twitter style relative time (English) (round: "floor")', function () {
|
|
12
|
-
var timeAgo = new TimeAgo('en');
|
|
12
|
+
var timeAgo = new TimeAgo('en');
|
|
13
13
|
|
|
14
|
+
// April 10th, 2016.
|
|
14
15
|
var now = new Date(2016, 3, 10, 22, 59).getTime();
|
|
15
|
-
|
|
16
16
|
var formatInterval = function formatInterval(secondsPassed) {
|
|
17
17
|
return timeAgo.format(now - secondsPassed * 1000, _objectSpread(_objectSpread({
|
|
18
18
|
now: now
|
|
@@ -20,39 +20,39 @@ describe('style/twitterMinute', function () {
|
|
|
20
20
|
round: 'floor'
|
|
21
21
|
}));
|
|
22
22
|
};
|
|
23
|
-
|
|
24
23
|
formatInterval(0).should.equal('0m');
|
|
25
24
|
formatInterval(59.9).should.equal('0m');
|
|
26
25
|
formatInterval(60).should.equal('1m');
|
|
27
26
|
formatInterval(1.9 * minute).should.equal('1m');
|
|
28
27
|
formatInterval(2 * minute).should.equal('2m');
|
|
29
28
|
formatInterval(2.9 * minute).should.equal('2m');
|
|
30
|
-
formatInterval(3 * minute).should.equal('3m');
|
|
31
|
-
|
|
29
|
+
formatInterval(3 * minute).should.equal('3m');
|
|
30
|
+
// …
|
|
32
31
|
formatInterval(59.9 * minute).should.equal('59m');
|
|
33
32
|
formatInterval(60 * minute).should.equal('1h');
|
|
34
33
|
formatInterval(1.9 * hour).should.equal('1h');
|
|
35
34
|
formatInterval(2 * hour).should.equal('2h');
|
|
36
35
|
formatInterval(2.9 * hour).should.equal('2h');
|
|
37
|
-
formatInterval(3 * hour).should.equal('3h');
|
|
38
|
-
|
|
36
|
+
formatInterval(3 * hour).should.equal('3h');
|
|
37
|
+
// …
|
|
39
38
|
formatInterval(23.9 * hour).should.equal('23h');
|
|
40
|
-
formatInterval(day + 2 * minute + hour).should.equal('Apr 9');
|
|
39
|
+
formatInterval(day + 2 * minute + hour).should.equal('Apr 9');
|
|
40
|
+
// …
|
|
41
41
|
// `month` is about 30.5 days.
|
|
42
|
-
|
|
43
42
|
formatInterval(month * 3).should.equal('Jan 10');
|
|
44
43
|
formatInterval(month * 4).should.equal('Dec 11, 2015');
|
|
45
|
-
formatInterval(year).should.equal('Apr 11, 2015');
|
|
46
|
-
// `month` is about 30.5 days.
|
|
44
|
+
formatInterval(year).should.equal('Apr 11, 2015');
|
|
47
45
|
|
|
46
|
+
// Test future dates.
|
|
47
|
+
// `month` is about 30.5 days.
|
|
48
48
|
formatInterval(-1 * month * 8).should.equal('Dec 10');
|
|
49
49
|
formatInterval(-1 * month * 9).should.equal('Jan 9, 2017');
|
|
50
50
|
});
|
|
51
51
|
it('should format Twitter style relative time (English) (round: "round")', function () {
|
|
52
|
-
var timeAgo = new TimeAgo('en');
|
|
52
|
+
var timeAgo = new TimeAgo('en');
|
|
53
53
|
|
|
54
|
+
// April 10th, 2016.
|
|
54
55
|
var now = new Date(2016, 3, 10, 22, 59).getTime();
|
|
55
|
-
|
|
56
56
|
var formatInterval = function formatInterval(secondsPassed) {
|
|
57
57
|
return timeAgo.format(now - secondsPassed * 1000, _objectSpread(_objectSpread({
|
|
58
58
|
now: now
|
|
@@ -60,7 +60,6 @@ describe('style/twitterMinute', function () {
|
|
|
60
60
|
round: 'round'
|
|
61
61
|
}));
|
|
62
62
|
};
|
|
63
|
-
|
|
64
63
|
formatInterval(0).should.equal('0m');
|
|
65
64
|
formatInterval(29.9).should.equal('0m');
|
|
66
65
|
formatInterval(30).should.equal('1m');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"twitterMinute.test.js","names":["twitter","TimeAgo","hour","minute","day","month","year","describe","it","timeAgo","now","Date","getTime","formatInterval","secondsPassed","format","round","should","equal"],"sources":["../../source/style/twitterMinute.test.js"],"sourcesContent":["import twitter from './twitterMinute.js'\r\nimport TimeAgo from '../TimeAgo.js'\r\nimport { hour, minute, day, month, year } from '../steps/index.js'\r\n\r\ndescribe('style/twitterMinute', () => {\r\n\tit('should format Twitter style relative time (English) (round: \"floor\")', () => {\r\n\t\tconst timeAgo = new TimeAgo('en')\r\n\r\n\t\t// April 10th, 2016.\r\n\t\tconst now = new Date(2016, 3, 10, 22, 59).getTime()\r\n\t\tconst formatInterval = (secondsPassed) => timeAgo.format(now - secondsPassed * 1000, { now, ...twitter, round: 'floor' })\r\n\r\n\t\tformatInterval(0).should.equal('0m')\r\n\t\tformatInterval(59.9).should.equal('0m')\r\n\t\tformatInterval(60).should.equal('1m')\r\n\t\tformatInterval(1.9 * minute).should.equal('1m')\r\n\t\tformatInterval(2 * minute).should.equal('2m')\r\n\t\tformatInterval(2.9 * minute).should.equal('2m')\r\n\t\tformatInterval(3 * minute).should.equal('3m')\r\n\t\t// …\r\n\t\tformatInterval(59.9 * minute).should.equal('59m')\r\n\t\tformatInterval(60 * minute).should.equal('1h')\r\n\t\tformatInterval(1.9 * hour).should.equal('1h')\r\n\t\tformatInterval(2 * hour).should.equal('2h')\r\n\t\tformatInterval(2.9 * hour).should.equal('2h')\r\n\t\tformatInterval(3 * hour).should.equal('3h')\r\n\t\t// …\r\n\t\tformatInterval(23.9 * hour).should.equal('23h')\r\n\t\tformatInterval(day + 2 * minute + hour).should.equal('Apr 9')\r\n\t\t// …\r\n\t\t// `month` is about 30.5 days.\r\n\t\tformatInterval(month * 3).should.equal('Jan 10')\r\n\t\tformatInterval(month * 4).should.equal('Dec 11, 2015')\r\n\t\tformatInterval(year).should.equal('Apr 11, 2015')\r\n\r\n\t\t// Test future dates.\r\n\t\t// `month` is about 30.5 days.\r\n\t\tformatInterval(-1 * month * 8).should.equal('Dec 10')\r\n\t\tformatInterval(-1 * month * 9).should.equal('Jan 9, 2017')\r\n\t})\r\n\r\n\tit('should format Twitter style relative time (English) (round: \"round\")', () => {\r\n\t\tconst timeAgo = new TimeAgo('en')\r\n\r\n\t\t// April 10th, 2016.\r\n\t\tconst now = new Date(2016, 3, 10, 22, 59).getTime()\r\n\t\tconst formatInterval = (secondsPassed) => timeAgo.format(now - secondsPassed * 1000, { now, ...twitter, round: 'round' })\r\n\r\n\t\tformatInterval(0).should.equal('0m')\r\n\t\tformatInterval(29.9).should.equal('0m')\r\n\t\tformatInterval(30).should.equal('1m')\r\n\t\tformatInterval(1.49 * minute).should.equal('1m')\r\n\t\tformatInterval(1.5 * minute).should.equal('2m')\r\n\t\tformatInterval(2.49 * minute).should.equal('2m')\r\n\t\tformatInterval(2.5 * minute).should.equal('3m')\r\n\t})\r\n})"],"mappings":";;;;;;AAAA,OAAOA,
|
|
1
|
+
{"version":3,"file":"twitterMinute.test.js","names":["twitter","TimeAgo","hour","minute","day","month","year","describe","it","timeAgo","now","Date","getTime","formatInterval","secondsPassed","format","_objectSpread","round","should","equal"],"sources":["../../source/style/twitterMinute.test.js"],"sourcesContent":["import twitter from './twitterMinute.js'\r\nimport TimeAgo from '../TimeAgo.js'\r\nimport { hour, minute, day, month, year } from '../steps/index.js'\r\n\r\ndescribe('style/twitterMinute', () => {\r\n\tit('should format Twitter style relative time (English) (round: \"floor\")', () => {\r\n\t\tconst timeAgo = new TimeAgo('en')\r\n\r\n\t\t// April 10th, 2016.\r\n\t\tconst now = new Date(2016, 3, 10, 22, 59).getTime()\r\n\t\tconst formatInterval = (secondsPassed) => timeAgo.format(now - secondsPassed * 1000, { now, ...twitter, round: 'floor' })\r\n\r\n\t\tformatInterval(0).should.equal('0m')\r\n\t\tformatInterval(59.9).should.equal('0m')\r\n\t\tformatInterval(60).should.equal('1m')\r\n\t\tformatInterval(1.9 * minute).should.equal('1m')\r\n\t\tformatInterval(2 * minute).should.equal('2m')\r\n\t\tformatInterval(2.9 * minute).should.equal('2m')\r\n\t\tformatInterval(3 * minute).should.equal('3m')\r\n\t\t// …\r\n\t\tformatInterval(59.9 * minute).should.equal('59m')\r\n\t\tformatInterval(60 * minute).should.equal('1h')\r\n\t\tformatInterval(1.9 * hour).should.equal('1h')\r\n\t\tformatInterval(2 * hour).should.equal('2h')\r\n\t\tformatInterval(2.9 * hour).should.equal('2h')\r\n\t\tformatInterval(3 * hour).should.equal('3h')\r\n\t\t// …\r\n\t\tformatInterval(23.9 * hour).should.equal('23h')\r\n\t\tformatInterval(day + 2 * minute + hour).should.equal('Apr 9')\r\n\t\t// …\r\n\t\t// `month` is about 30.5 days.\r\n\t\tformatInterval(month * 3).should.equal('Jan 10')\r\n\t\tformatInterval(month * 4).should.equal('Dec 11, 2015')\r\n\t\tformatInterval(year).should.equal('Apr 11, 2015')\r\n\r\n\t\t// Test future dates.\r\n\t\t// `month` is about 30.5 days.\r\n\t\tformatInterval(-1 * month * 8).should.equal('Dec 10')\r\n\t\tformatInterval(-1 * month * 9).should.equal('Jan 9, 2017')\r\n\t})\r\n\r\n\tit('should format Twitter style relative time (English) (round: \"round\")', () => {\r\n\t\tconst timeAgo = new TimeAgo('en')\r\n\r\n\t\t// April 10th, 2016.\r\n\t\tconst now = new Date(2016, 3, 10, 22, 59).getTime()\r\n\t\tconst formatInterval = (secondsPassed) => timeAgo.format(now - secondsPassed * 1000, { now, ...twitter, round: 'round' })\r\n\r\n\t\tformatInterval(0).should.equal('0m')\r\n\t\tformatInterval(29.9).should.equal('0m')\r\n\t\tformatInterval(30).should.equal('1m')\r\n\t\tformatInterval(1.49 * minute).should.equal('1m')\r\n\t\tformatInterval(1.5 * minute).should.equal('2m')\r\n\t\tformatInterval(2.49 * minute).should.equal('2m')\r\n\t\tformatInterval(2.5 * minute).should.equal('3m')\r\n\t})\r\n})"],"mappings":";;;;;;AAAA,OAAOA,OAAO,MAAM,oBAAoB;AACxC,OAAOC,OAAO,MAAM,eAAe;AACnC,SAASC,IAAI,EAAEC,MAAM,EAAEC,GAAG,EAAEC,KAAK,EAAEC,IAAI,QAAQ,mBAAmB;AAElEC,QAAQ,CAAC,qBAAqB,EAAE,YAAM;EACrCC,EAAE,CAAC,sEAAsE,EAAE,YAAM;IAChF,IAAMC,OAAO,GAAG,IAAIR,OAAO,CAAC,IAAI,CAAC;;IAEjC;IACA,IAAMS,GAAG,GAAG,IAAIC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EA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AAA;QAAIN,GAAG,EAAHA;MAAG,GAAKV,OAAO;QAAEiB,KAAK,EAAE;MAAO,EAAE,CAAC;IAAA;IAEzHJ,cAAc,CAAC,CAAC,CAAC,CAACK,MAAM,CAACC,KAAK,CAAC,IAAI,CAAC;IACpCN,cAAc,CAAC,IAAI,CAAC,CAACK,MAAM,CAACC,KAAK,CAAC,IAAI,CAAC;IACvCN,cAAc,CAAC,EAAE,CAAC,CAACK,MAAM,CAACC,KAAK,CAAC,IAAI,CAAC;IACrCN,cAAc,CAAC,IAAI,GAAGV,MAAM,CAAC,CAACe,MAAM,CAACC,KAAK,CAAC,IAAI,CAAC;IAChDN,cAAc,CAAC,GAAG,GAAGV,MAAM,CAAC,CAACe,MAAM,CAACC,KAAK,CAAC,IAAI,CAAC;IAC/CN,cAAc,CAAC,IAAI,GAAGV,MAAM,CAAC,CAACe,MAAM,CAACC,KAAK,CAAC,IAAI,CAAC;IAChDN,cAAc,CAAC,GAAG,GAAGV,MAAM,CAAC,CAACe,MAAM,CAACC,KAAK,CAAC,IAAI,CAAC;EAChD,CAAC,CAAC;AACH,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function
|
|
2
|
-
|
|
3
|
-
function _objectSpread(
|
|
4
|
-
|
|
5
|
-
function
|
|
6
|
-
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import twitterMinute from './twitterMinute.js';
|
|
8
8
|
export default _objectSpread(_objectSpread({}, twitterMinute), {}, {
|
|
9
9
|
// Add "now".
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"twitterMinuteNow.js","names":["twitterMinute","steps","formatAs","concat"],"sources":["../../source/style/twitterMinuteNow.js"],"sourcesContent":["import twitterMinute from './twitterMinute.js'\r\n\r\nexport default {\r\n\t...twitterMinute,\r\n\t// Add \"now\".\r\n\tsteps: [{ formatAs: 'now' }].concat(twitterMinute.steps)\r\n}"],"mappings":";;;;;;AAAA,OAAOA,
|
|
1
|
+
{"version":3,"file":"twitterMinuteNow.js","names":["twitterMinute","_objectSpread","steps","formatAs","concat"],"sources":["../../source/style/twitterMinuteNow.js"],"sourcesContent":["import twitterMinute from './twitterMinute.js'\r\n\r\nexport default {\r\n\t...twitterMinute,\r\n\t// Add \"now\".\r\n\tsteps: [{ formatAs: 'now' }].concat(twitterMinute.steps)\r\n}"],"mappings":";;;;;;AAAA,OAAOA,aAAa,MAAM,oBAAoB;AAE9C,eAAAC,aAAA,CAAAA,aAAA,KACID,aAAa;EAChB;EACAE,KAAK,EAAE,CAAC;IAAEC,QAAQ,EAAE;EAAM,CAAC,CAAC,CAACC,MAAM,CAACJ,aAAa,CAACE,KAAK;AAAC","ignoreList":[]}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
function
|
|
2
|
-
|
|
3
|
-
function _objectSpread(
|
|
4
|
-
|
|
5
|
-
function
|
|
6
|
-
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import twitter from './twitterMinuteNow.js';
|
|
8
8
|
import TimeAgo from '../TimeAgo.js';
|
|
9
9
|
import { hour, minute, day, month, year } from '../steps/index.js';
|
|
10
10
|
describe('style/twitterNow', function () {
|
|
11
11
|
it('should format Twitter style relative time (English) (round: "floor")', function () {
|
|
12
|
-
var timeAgo = new TimeAgo('en');
|
|
12
|
+
var timeAgo = new TimeAgo('en');
|
|
13
13
|
|
|
14
|
+
// April 10th, 2016.
|
|
14
15
|
var now = new Date(2016, 3, 10, 22, 59).getTime();
|
|
15
|
-
|
|
16
16
|
var formatInterval = function formatInterval(secondsPassed) {
|
|
17
17
|
return timeAgo.format(now - secondsPassed * 1000, _objectSpread(_objectSpread({
|
|
18
18
|
now: now
|
|
@@ -20,39 +20,39 @@ describe('style/twitterNow', function () {
|
|
|
20
20
|
round: 'floor'
|
|
21
21
|
}));
|
|
22
22
|
};
|
|
23
|
-
|
|
24
23
|
formatInterval(0).should.equal('now');
|
|
25
24
|
formatInterval(59.9).should.equal('now');
|
|
26
25
|
formatInterval(60).should.equal('1m');
|
|
27
26
|
formatInterval(1.9 * minute).should.equal('1m');
|
|
28
27
|
formatInterval(2 * minute).should.equal('2m');
|
|
29
28
|
formatInterval(2.9 * minute).should.equal('2m');
|
|
30
|
-
formatInterval(3 * minute).should.equal('3m');
|
|
31
|
-
|
|
29
|
+
formatInterval(3 * minute).should.equal('3m');
|
|
30
|
+
// …
|
|
32
31
|
formatInterval(59.9 * minute).should.equal('59m');
|
|
33
32
|
formatInterval(60 * minute).should.equal('1h');
|
|
34
33
|
formatInterval(1.9 * hour).should.equal('1h');
|
|
35
34
|
formatInterval(2 * hour).should.equal('2h');
|
|
36
35
|
formatInterval(2.9 * hour).should.equal('2h');
|
|
37
|
-
formatInterval(3 * hour).should.equal('3h');
|
|
38
|
-
|
|
36
|
+
formatInterval(3 * hour).should.equal('3h');
|
|
37
|
+
// …
|
|
39
38
|
formatInterval(23.9 * hour).should.equal('23h');
|
|
40
|
-
formatInterval(day + 2 * minute + hour).should.equal('Apr 9');
|
|
39
|
+
formatInterval(day + 2 * minute + hour).should.equal('Apr 9');
|
|
40
|
+
// …
|
|
41
41
|
// `month` is about 30.5 days.
|
|
42
|
-
|
|
43
42
|
formatInterval(month * 3).should.equal('Jan 10');
|
|
44
43
|
formatInterval(month * 4).should.equal('Dec 11, 2015');
|
|
45
|
-
formatInterval(year).should.equal('Apr 11, 2015');
|
|
46
|
-
// `month` is about 30.5 days.
|
|
44
|
+
formatInterval(year).should.equal('Apr 11, 2015');
|
|
47
45
|
|
|
46
|
+
// Test future dates.
|
|
47
|
+
// `month` is about 30.5 days.
|
|
48
48
|
formatInterval(-1 * month * 8).should.equal('Dec 10');
|
|
49
49
|
formatInterval(-1 * month * 9).should.equal('Jan 9, 2017');
|
|
50
50
|
});
|
|
51
51
|
it('should format Twitter style relative time (English) (round: "round")', function () {
|
|
52
|
-
var timeAgo = new TimeAgo('en');
|
|
52
|
+
var timeAgo = new TimeAgo('en');
|
|
53
53
|
|
|
54
|
+
// April 10th, 2016.
|
|
54
55
|
var now = new Date(2016, 3, 10, 22, 59).getTime();
|
|
55
|
-
|
|
56
56
|
var formatInterval = function formatInterval(secondsPassed) {
|
|
57
57
|
return timeAgo.format(now - secondsPassed * 1000, _objectSpread(_objectSpread({
|
|
58
58
|
now: now
|
|
@@ -60,7 +60,6 @@ describe('style/twitterNow', function () {
|
|
|
60
60
|
round: 'round'
|
|
61
61
|
}));
|
|
62
62
|
};
|
|
63
|
-
|
|
64
63
|
formatInterval(0).should.equal('now');
|
|
65
64
|
formatInterval(29.9).should.equal('now');
|
|
66
65
|
formatInterval(30).should.equal('1m');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"twitterMinuteNow.test.js","names":["twitter","TimeAgo","hour","minute","day","month","year","describe","it","timeAgo","now","Date","getTime","formatInterval","secondsPassed","format","round","should","equal"],"sources":["../../source/style/twitterMinuteNow.test.js"],"sourcesContent":["import twitter from './twitterMinuteNow.js'\r\nimport TimeAgo from '../TimeAgo.js'\r\nimport { hour, minute, day, month, year } from '../steps/index.js'\r\n\r\ndescribe('style/twitterNow', () => {\r\n\tit('should format Twitter style relative time (English) (round: \"floor\")', () => {\r\n\t\tconst timeAgo = new TimeAgo('en')\r\n\r\n\t\t// April 10th, 2016.\r\n\t\tconst now = new Date(2016, 3, 10, 22, 59).getTime()\r\n\t\tconst formatInterval = (secondsPassed) => timeAgo.format(now - secondsPassed * 1000, { now, ...twitter, round: 'floor' })\r\n\r\n\t\tformatInterval(0).should.equal('now')\r\n\t\tformatInterval(59.9).should.equal('now')\r\n\t\tformatInterval(60).should.equal('1m')\r\n\t\tformatInterval(1.9 * minute).should.equal('1m')\r\n\t\tformatInterval(2 * minute).should.equal('2m')\r\n\t\tformatInterval(2.9 * minute).should.equal('2m')\r\n\t\tformatInterval(3 * minute).should.equal('3m')\r\n\t\t// …\r\n\t\tformatInterval(59.9 * minute).should.equal('59m')\r\n\t\tformatInterval(60 * minute).should.equal('1h')\r\n\t\tformatInterval(1.9 * hour).should.equal('1h')\r\n\t\tformatInterval(2 * hour).should.equal('2h')\r\n\t\tformatInterval(2.9 * hour).should.equal('2h')\r\n\t\tformatInterval(3 * hour).should.equal('3h')\r\n\t\t// …\r\n\t\tformatInterval(23.9 * hour).should.equal('23h')\r\n\t\tformatInterval(day + 2 * minute + hour).should.equal('Apr 9')\r\n\t\t// …\r\n\t\t// `month` is about 30.5 days.\r\n\t\tformatInterval(month * 3).should.equal('Jan 10')\r\n\t\tformatInterval(month * 4).should.equal('Dec 11, 2015')\r\n\t\tformatInterval(year).should.equal('Apr 11, 2015')\r\n\r\n\t\t// Test future dates.\r\n\t\t// `month` is about 30.5 days.\r\n\t\tformatInterval(-1 * month * 8).should.equal('Dec 10')\r\n\t\tformatInterval(-1 * month * 9).should.equal('Jan 9, 2017')\r\n\t})\r\n\r\n\tit('should format Twitter style relative time (English) (round: \"round\")', () => {\r\n\t\tconst timeAgo = new TimeAgo('en')\r\n\r\n\t\t// April 10th, 2016.\r\n\t\tconst now = new Date(2016, 3, 10, 22, 59).getTime()\r\n\t\tconst formatInterval = (secondsPassed) => timeAgo.format(now - secondsPassed * 1000, { now, ...twitter, round: 'round' })\r\n\r\n\t\tformatInterval(0).should.equal('now')\r\n\t\tformatInterval(29.9).should.equal('now')\r\n\t\tformatInterval(30).should.equal('1m')\r\n\t\tformatInterval(1.49 * minute).should.equal('1m')\r\n\t\tformatInterval(1.5 * minute).should.equal('2m')\r\n\t\tformatInterval(2.49 * minute).should.equal('2m')\r\n\t\tformatInterval(2.5 * minute).should.equal('3m')\r\n\t})\r\n})"],"mappings":";;;;;;AAAA,OAAOA,
|
|
1
|
+
{"version":3,"file":"twitterMinuteNow.test.js","names":["twitter","TimeAgo","hour","minute","day","month","year","describe","it","timeAgo","now","Date","getTime","formatInterval","secondsPassed","format","_objectSpread","round","should","equal"],"sources":["../../source/style/twitterMinuteNow.test.js"],"sourcesContent":["import twitter from './twitterMinuteNow.js'\r\nimport TimeAgo from '../TimeAgo.js'\r\nimport { hour, minute, day, month, year } from '../steps/index.js'\r\n\r\ndescribe('style/twitterNow', () => {\r\n\tit('should format Twitter style relative time (English) (round: \"floor\")', () => {\r\n\t\tconst timeAgo = new TimeAgo('en')\r\n\r\n\t\t// April 10th, 2016.\r\n\t\tconst now = new Date(2016, 3, 10, 22, 59).getTime()\r\n\t\tconst formatInterval = (secondsPassed) => timeAgo.format(now - secondsPassed * 1000, { now, ...twitter, round: 'floor' })\r\n\r\n\t\tformatInterval(0).should.equal('now')\r\n\t\tformatInterval(59.9).should.equal('now')\r\n\t\tformatInterval(60).should.equal('1m')\r\n\t\tformatInterval(1.9 * minute).should.equal('1m')\r\n\t\tformatInterval(2 * minute).should.equal('2m')\r\n\t\tformatInterval(2.9 * minute).should.equal('2m')\r\n\t\tformatInterval(3 * minute).should.equal('3m')\r\n\t\t// …\r\n\t\tformatInterval(59.9 * minute).should.equal('59m')\r\n\t\tformatInterval(60 * minute).should.equal('1h')\r\n\t\tformatInterval(1.9 * hour).should.equal('1h')\r\n\t\tformatInterval(2 * hour).should.equal('2h')\r\n\t\tformatInterval(2.9 * hour).should.equal('2h')\r\n\t\tformatInterval(3 * hour).should.equal('3h')\r\n\t\t// …\r\n\t\tformatInterval(23.9 * hour).should.equal('23h')\r\n\t\tformatInterval(day + 2 * minute + hour).should.equal('Apr 9')\r\n\t\t// …\r\n\t\t// `month` is about 30.5 days.\r\n\t\tformatInterval(month * 3).should.equal('Jan 10')\r\n\t\tformatInterval(month * 4).should.equal('Dec 11, 2015')\r\n\t\tformatInterval(year).should.equal('Apr 11, 2015')\r\n\r\n\t\t// Test future dates.\r\n\t\t// `month` is about 30.5 days.\r\n\t\tformatInterval(-1 * month * 8).should.equal('Dec 10')\r\n\t\tformatInterval(-1 * month * 9).should.equal('Jan 9, 2017')\r\n\t})\r\n\r\n\tit('should format Twitter style relative time (English) (round: \"round\")', () => {\r\n\t\tconst timeAgo = new TimeAgo('en')\r\n\r\n\t\t// April 10th, 2016.\r\n\t\tconst now = new Date(2016, 3, 10, 22, 59).getTime()\r\n\t\tconst formatInterval = (secondsPassed) => timeAgo.format(now - secondsPassed * 1000, { now, ...twitter, round: 'round' })\r\n\r\n\t\tformatInterval(0).should.equal('now')\r\n\t\tformatInterval(29.9).should.equal('now')\r\n\t\tformatInterval(30).should.equal('1m')\r\n\t\tformatInterval(1.49 * minute).should.equal('1m')\r\n\t\tformatInterval(1.5 * minute).should.equal('2m')\r\n\t\tformatInterval(2.49 * minute).should.equal('2m')\r\n\t\tformatInterval(2.5 * minute).should.equal('3m')\r\n\t})\r\n})"],"mappings":";;;;;;AAAA,OAAOA,OAAO,MAAM,uBAAuB;AAC3C,OAAOC,OAAO,MAAM,eAAe;AACnC,SAASC,IAAI,EAAEC,MAAM,EAAEC,GAAG,EAAEC,KAAK,EAAEC,IAAI,QAAQ,mBAAmB;AAElEC,QAA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EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAACC,OAAO,CAAC,CAAC;IACnD,IAAMC,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,aAAa;MAAA,OAAKL,OAAO,CAACM,MAAM,CAACL,GAAG,GAAGI,aAAa,GAAG,IAAI,EAAAE,aAAA,CAAAA,aAAA;QAAIN,GAAG,EAAHA;MAAG,GAAKV,OAAO;QAAEiB,KAAK,EAAE;MAAO,EAAE,CAAC;IAAA;IAEzHJ,cAAc,CAAC,CAAC,CAAC,CAACK,MAAM,CAACC,KAAK,CAAC,KAAK,CAAC;IACrCN,cAAc,CAAC,IAAI,CAAC,CAACK,MAAM,CAACC,KAAK,CAAC,KAAK,CAAC;IACxCN,cAAc,CAAC,EAAE,CAAC,CAACK,MAAM,CAACC,KAAK,CAAC,IAAI,CAAC;IACrCN,cAAc,CAAC,IAAI,GAAGV,MAAM,CAAC,CAACe,MAAM,CAACC,KAAK,CAAC,IAAI,CAAC;IAChDN,cAAc,CAAC,GAAG,GAAGV,MAAM,CAAC,CAACe,MAAM,CAACC,KAAK,CAAC,IAAI,CAAC;IAC/CN,cAAc,CAAC,IAAI,GAAGV,MAAM,CAAC,CAACe,MAAM,CAACC,KAAK,CAAC,IAAI,CAAC;IAChDN,cAAc,CAAC,GAAG,GAAGV,MAAM,CAAC,CAACe,MAAM,CAACC,KAAK,CAAC,IAAI,CAAC;EAChD,CAAC,CAAC;AACH,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function
|
|
2
|
-
|
|
3
|
-
function _objectSpread(
|
|
4
|
-
|
|
5
|
-
function
|
|
6
|
-
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import twitter from './twitter.js';
|
|
8
8
|
export default _objectSpread(_objectSpread({}, twitter), {}, {
|
|
9
9
|
// Add "now".
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"twitterNow.js","names":["twitter","steps","formatAs","concat"],"sources":["../../source/style/twitterNow.js"],"sourcesContent":["import twitter from './twitter.js'\r\n\r\nexport default {\r\n\t...twitter,\r\n\t// Add \"now\".\r\n\tsteps: [{ formatAs: 'now' }].concat(twitter.steps)\r\n}"],"mappings":";;;;;;AAAA,OAAOA,
|
|
1
|
+
{"version":3,"file":"twitterNow.js","names":["twitter","_objectSpread","steps","formatAs","concat"],"sources":["../../source/style/twitterNow.js"],"sourcesContent":["import twitter from './twitter.js'\r\n\r\nexport default {\r\n\t...twitter,\r\n\t// Add \"now\".\r\n\tsteps: [{ formatAs: 'now' }].concat(twitter.steps)\r\n}"],"mappings":";;;;;;AAAA,OAAOA,OAAO,MAAM,cAAc;AAElC,eAAAC,aAAA,CAAAA,aAAA,KACID,OAAO;EACV;EACAE,KAAK,EAAE,CAAC;IAAEC,QAAQ,EAAE;EAAM,CAAC,CAAC,CAACC,MAAM,CAACJ,OAAO,CAACE,KAAK;AAAC","ignoreList":[]}
|