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.
Files changed (452) hide show
  1. package/CHANGELOG.md +10 -1
  2. package/README.md +410 -272
  3. package/bundle/javascript-time-ago.js +1 -1
  4. package/bundle/javascript-time-ago.js.map +1 -1
  5. package/bundle/javascript-time-ago.min.js +1 -1
  6. package/bundle/javascript-time-ago.min.js.map +1 -1
  7. package/commonjs/FullDateFormatter.js +72 -0
  8. package/commonjs/FullDateFormatter.js.map +1 -0
  9. package/commonjs/FullDateFormatter.test.js +26 -0
  10. package/commonjs/FullDateFormatter.test.js.map +1 -0
  11. package/commonjs/LocaleDataStore.js +2 -5
  12. package/commonjs/LocaleDataStore.js.map +1 -1
  13. package/commonjs/PropTypes.js +12 -12
  14. package/commonjs/PropTypes.js.map +1 -1
  15. package/commonjs/TimeAgo.js +300 -253
  16. package/commonjs/TimeAgo.js.map +1 -1
  17. package/commonjs/TimeAgo.test.js +214 -135
  18. package/commonjs/TimeAgo.test.js.map +1 -1
  19. package/commonjs/cache.js +7 -25
  20. package/commonjs/cache.js.map +1 -1
  21. package/commonjs/cache.test.js +1 -3
  22. package/commonjs/cache.test.js.map +1 -1
  23. package/commonjs/isStyleObject.js +9 -9
  24. package/commonjs/isStyleObject.js.map +1 -1
  25. package/commonjs/isStyleObject.test.js +1 -3
  26. package/commonjs/isStyleObject.test.js.map +1 -1
  27. package/commonjs/locale.js +6 -19
  28. package/commonjs/locale.js.map +1 -1
  29. package/commonjs/locale.test.js +2 -11
  30. package/commonjs/locale.test.js.map +1 -1
  31. package/commonjs/round.js +2 -5
  32. package/commonjs/round.js.map +1 -1
  33. package/commonjs/steps/approximate.js +1 -4
  34. package/commonjs/steps/approximate.js.map +1 -1
  35. package/commonjs/steps/approximate.test.js +1 -6
  36. package/commonjs/steps/approximate.test.js.map +1 -1
  37. package/commonjs/steps/getStep.js +36 -53
  38. package/commonjs/steps/getStep.js.map +1 -1
  39. package/commonjs/steps/getStep.test.js +7 -7
  40. package/commonjs/steps/getStep.test.js.map +1 -1
  41. package/commonjs/steps/getStepDenominator.js +2 -5
  42. package/commonjs/steps/getStepDenominator.js.map +1 -1
  43. package/commonjs/steps/getStepDenominator.test.js +1 -3
  44. package/commonjs/steps/getStepDenominator.test.js.map +1 -1
  45. package/commonjs/steps/getStepMinTime.js +31 -39
  46. package/commonjs/steps/getStepMinTime.js.map +1 -1
  47. package/commonjs/steps/getStepMinTime.test.js +1 -3
  48. package/commonjs/steps/getStepMinTime.test.js.map +1 -1
  49. package/commonjs/steps/getTimeToNextUpdate.js +27 -41
  50. package/commonjs/steps/getTimeToNextUpdate.js.map +1 -1
  51. package/commonjs/steps/getTimeToNextUpdate.test.js +29 -25
  52. package/commonjs/steps/getTimeToNextUpdate.test.js.map +1 -1
  53. package/commonjs/steps/getTimeToNextUpdateForUnit.js +3 -12
  54. package/commonjs/steps/getTimeToNextUpdateForUnit.js.map +1 -1
  55. package/commonjs/steps/getTimeToNextUpdateForUnit.test.js +1 -7
  56. package/commonjs/steps/getTimeToNextUpdateForUnit.test.js.map +1 -1
  57. package/commonjs/steps/helpers.js +1 -2
  58. package/commonjs/steps/helpers.js.map +1 -1
  59. package/commonjs/steps/helpers.test.js +0 -1
  60. package/commonjs/steps/helpers.test.js.map +1 -1
  61. package/commonjs/steps/index.js +1 -6
  62. package/commonjs/steps/index.js.map +1 -1
  63. package/commonjs/steps/renameLegacyProperties.js +6 -14
  64. package/commonjs/steps/renameLegacyProperties.js.map +1 -1
  65. package/commonjs/steps/renameLegacyProperties.test.js +1 -3
  66. package/commonjs/steps/renameLegacyProperties.test.js.map +1 -1
  67. package/commonjs/steps/round.js +1 -2
  68. package/commonjs/steps/round.js.map +1 -1
  69. package/commonjs/steps/round.test.js +1 -7
  70. package/commonjs/steps/round.test.js.map +1 -1
  71. package/commonjs/steps/units.js +10 -21
  72. package/commonjs/steps/units.js.map +1 -1
  73. package/commonjs/style/approximate.js +2 -6
  74. package/commonjs/style/approximate.js.map +1 -1
  75. package/commonjs/style/approximateTime.js +2 -6
  76. package/commonjs/style/approximateTime.js.map +1 -1
  77. package/commonjs/style/approximateTime.test.js +116 -75
  78. package/commonjs/style/approximateTime.test.js.map +1 -1
  79. package/commonjs/style/getStyleByName.js +3 -29
  80. package/commonjs/style/getStyleByName.js.map +1 -1
  81. package/commonjs/style/mini.js +9 -6
  82. package/commonjs/style/mini.js.map +1 -1
  83. package/commonjs/style/mini.test.js +15 -25
  84. package/commonjs/style/mini.test.js.map +1 -1
  85. package/commonjs/style/miniMinute.js +8 -13
  86. package/commonjs/style/miniMinute.js.map +1 -1
  87. package/commonjs/style/miniMinute.test.js +11 -17
  88. package/commonjs/style/miniMinute.test.js.map +1 -1
  89. package/commonjs/style/miniMinuteNow.js +8 -13
  90. package/commonjs/style/miniMinuteNow.js.map +1 -1
  91. package/commonjs/style/miniMinuteNow.test.js +11 -17
  92. package/commonjs/style/miniMinuteNow.test.js.map +1 -1
  93. package/commonjs/style/miniNow.js +8 -13
  94. package/commonjs/style/miniNow.js.map +1 -1
  95. package/commonjs/style/miniNow.test.js +11 -17
  96. package/commonjs/style/miniNow.test.js.map +1 -1
  97. package/commonjs/style/renameLegacyProperties.js +7 -13
  98. package/commonjs/style/renameLegacyProperties.js.map +1 -1
  99. package/commonjs/style/renameLegacyProperties.test.js +1 -4
  100. package/commonjs/style/renameLegacyProperties.test.js.map +1 -1
  101. package/commonjs/style/round.js +2 -6
  102. package/commonjs/style/round.js.map +1 -1
  103. package/commonjs/style/round.test.js +51 -67
  104. package/commonjs/style/round.test.js.map +1 -1
  105. package/commonjs/style/roundMinute.js +8 -13
  106. package/commonjs/style/roundMinute.js.map +1 -1
  107. package/commonjs/style/roundMinute.test.js +20 -27
  108. package/commonjs/style/roundMinute.test.js.map +1 -1
  109. package/commonjs/style/twitter.js +34 -39
  110. package/commonjs/style/twitter.js.map +1 -1
  111. package/commonjs/style/twitter.test.js +54 -57
  112. package/commonjs/style/twitter.test.js.map +1 -1
  113. package/commonjs/style/twitterFirstMinute.js +10 -15
  114. package/commonjs/style/twitterFirstMinute.js.map +1 -1
  115. package/commonjs/style/twitterFirstMinute.test.js +16 -23
  116. package/commonjs/style/twitterFirstMinute.test.js.map +1 -1
  117. package/commonjs/style/twitterMinute.js +8 -13
  118. package/commonjs/style/twitterMinute.js.map +1 -1
  119. package/commonjs/style/twitterMinute.test.js +20 -25
  120. package/commonjs/style/twitterMinute.test.js.map +1 -1
  121. package/commonjs/style/twitterMinuteNow.js +8 -13
  122. package/commonjs/style/twitterMinuteNow.js.map +1 -1
  123. package/commonjs/style/twitterMinuteNow.test.js +20 -25
  124. package/commonjs/style/twitterMinuteNow.test.js.map +1 -1
  125. package/commonjs/style/twitterNow.js +8 -13
  126. package/commonjs/style/twitterNow.js.map +1 -1
  127. package/commonjs/style/twitterNow.test.js +18 -24
  128. package/commonjs/style/twitterNow.test.js.map +1 -1
  129. package/full-date-formatter/index.cjs +4 -0
  130. package/full-date-formatter/index.cjs.js +9 -0
  131. package/full-date-formatter/index.d.ts +6 -0
  132. package/full-date-formatter/index.js +1 -0
  133. package/full-date-formatter/package.json +15 -0
  134. package/index.cjs +1 -1
  135. package/index.cjs.js +2 -2
  136. package/index.d.ts +14 -4
  137. package/index.js +3 -1
  138. package/load-all-locales/index.cjs +32 -0
  139. package/load-all-locales/index.cjs.js +32 -0
  140. package/load-all-locales/index.js +64 -0
  141. package/locale/ak/package.json +16 -0
  142. package/locale/ak.json +267 -0
  143. package/locale/ak.json.d.ts +4 -0
  144. package/locale/ak.json.js +267 -0
  145. package/locale/bal-Latn/package.json +16 -0
  146. package/locale/bal-Latn.json +240 -0
  147. package/locale/bal-Latn.json.d.ts +4 -0
  148. package/locale/bal-Latn.json.js +240 -0
  149. package/locale/be-tarask/package.json +16 -0
  150. package/locale/be-tarask.json +259 -0
  151. package/locale/be-tarask.json.d.ts +4 -0
  152. package/locale/be-tarask.json.js +259 -0
  153. package/locale/blo/package.json +16 -0
  154. package/locale/blo.json +159 -0
  155. package/locale/blo.json.d.ts +4 -0
  156. package/locale/blo.json.js +159 -0
  157. package/locale/bn.json +5 -2
  158. package/locale/bn.json.js +5 -2
  159. package/locale/bs.json +8 -2
  160. package/locale/bs.json.js +8 -2
  161. package/locale/ccp.json +2 -8
  162. package/locale/ccp.json.js +2 -8
  163. package/locale/csw/package.json +16 -0
  164. package/locale/csw.json +180 -0
  165. package/locale/csw.json.d.ts +4 -0
  166. package/locale/csw.json.js +180 -0
  167. package/locale/cy.json +6 -12
  168. package/locale/cy.json.js +6 -12
  169. package/locale/doi/package.json +16 -0
  170. package/locale/doi.json +159 -0
  171. package/locale/doi.json.d.ts +4 -0
  172. package/locale/doi.json.js +159 -0
  173. package/locale/en-AU.json +12 -12
  174. package/locale/en-AU.json.js +12 -12
  175. package/locale/en-CZ/package.json +16 -0
  176. package/locale/en-CZ.json +219 -0
  177. package/locale/en-CZ.json.d.ts +4 -0
  178. package/locale/en-CZ.json.js +219 -0
  179. package/locale/en-ES/package.json +16 -0
  180. package/locale/en-ES.json +219 -0
  181. package/locale/en-ES.json.d.ts +4 -0
  182. package/locale/en-ES.json.js +219 -0
  183. package/locale/en-FR/package.json +16 -0
  184. package/locale/en-FR.json +219 -0
  185. package/locale/en-FR.json.d.ts +4 -0
  186. package/locale/en-FR.json.js +219 -0
  187. package/locale/en-GS/package.json +16 -0
  188. package/locale/en-GS.json +219 -0
  189. package/locale/en-GS.json.d.ts +4 -0
  190. package/locale/en-GS.json.js +219 -0
  191. package/locale/en-HU/package.json +16 -0
  192. package/locale/en-HU.json +219 -0
  193. package/locale/en-HU.json.d.ts +4 -0
  194. package/locale/en-HU.json.js +219 -0
  195. package/locale/en-ID/package.json +16 -0
  196. package/locale/en-ID.json +219 -0
  197. package/locale/en-ID.json.d.ts +4 -0
  198. package/locale/en-ID.json.js +219 -0
  199. package/locale/en-IT/package.json +16 -0
  200. package/locale/en-IT.json +219 -0
  201. package/locale/en-IT.json.d.ts +4 -0
  202. package/locale/en-IT.json.js +219 -0
  203. package/locale/en-NO/package.json +16 -0
  204. package/locale/en-NO.json +219 -0
  205. package/locale/en-NO.json.d.ts +4 -0
  206. package/locale/en-NO.json.js +219 -0
  207. package/locale/en-PL/package.json +16 -0
  208. package/locale/en-PL.json +219 -0
  209. package/locale/en-PL.json.d.ts +4 -0
  210. package/locale/en-PL.json.js +219 -0
  211. package/locale/en-PT/package.json +16 -0
  212. package/locale/en-PT.json +219 -0
  213. package/locale/en-PT.json.d.ts +4 -0
  214. package/locale/en-PT.json.js +219 -0
  215. package/locale/en-RO/package.json +16 -0
  216. package/locale/en-RO.json +219 -0
  217. package/locale/en-RO.json.d.ts +4 -0
  218. package/locale/en-RO.json.js +219 -0
  219. package/locale/en-SK/package.json +16 -0
  220. package/locale/en-SK.json +219 -0
  221. package/locale/en-SK.json.d.ts +4 -0
  222. package/locale/en-SK.json.js +219 -0
  223. package/locale/es-MX.json +12 -9
  224. package/locale/es-MX.json.js +12 -9
  225. package/locale/es-SV.json +2 -2
  226. package/locale/es-SV.json.js +2 -2
  227. package/locale/eu.json +24 -24
  228. package/locale/eu.json.js +24 -24
  229. package/locale/ha.json +119 -65
  230. package/locale/ha.json.js +119 -65
  231. package/locale/he.json +0 -6
  232. package/locale/he.json.js +0 -6
  233. package/locale/hi-Latn.json +2 -2
  234. package/locale/hi-Latn.json.js +2 -2
  235. package/locale/ht/package.json +16 -0
  236. package/locale/ht.json +207 -0
  237. package/locale/ht.json.d.ts +4 -0
  238. package/locale/ht.json.js +207 -0
  239. package/locale/id.json +1 -1
  240. package/locale/id.json.js +1 -1
  241. package/locale/ie/package.json +16 -0
  242. package/locale/ie.json +159 -0
  243. package/locale/ie.json.d.ts +4 -0
  244. package/locale/ie.json.js +159 -0
  245. package/locale/ig.json +17 -17
  246. package/locale/ig.json.js +17 -17
  247. package/locale/ii/package.json +16 -0
  248. package/locale/ii.json +165 -0
  249. package/locale/ii.json.d.ts +4 -0
  250. package/locale/ii.json.js +165 -0
  251. package/locale/is.json +4 -1
  252. package/locale/is.json.js +4 -1
  253. package/locale/kaa/package.json +16 -0
  254. package/locale/kaa.json +159 -0
  255. package/locale/kaa.json.d.ts +4 -0
  256. package/locale/kaa.json.js +159 -0
  257. package/locale/kok-Latn/package.json +16 -0
  258. package/locale/kok-Latn.json +159 -0
  259. package/locale/kok-Latn.json.d.ts +4 -0
  260. package/locale/kok-Latn.json.js +159 -0
  261. package/locale/kok.json +8 -8
  262. package/locale/kok.json.js +8 -8
  263. package/locale/ks.json +9 -9
  264. package/locale/ks.json.js +9 -9
  265. package/locale/ku.json +55 -46
  266. package/locale/ku.json.js +55 -46
  267. package/locale/lld/package.json +16 -0
  268. package/locale/lld.json +291 -0
  269. package/locale/lld.json.d.ts +4 -0
  270. package/locale/lld.json.js +291 -0
  271. package/locale/mi.json +22 -22
  272. package/locale/mi.json.js +22 -22
  273. package/locale/ms-Arab/package.json +16 -0
  274. package/locale/ms-Arab.json +159 -0
  275. package/locale/ms-Arab.json.d.ts +4 -0
  276. package/locale/ms-Arab.json.js +159 -0
  277. package/locale/nb.json +2 -2
  278. package/locale/nb.json.js +2 -2
  279. package/locale/ne.json +1 -1
  280. package/locale/ne.json.js +1 -1
  281. package/locale/nn.json +4 -4
  282. package/locale/nn.json.js +4 -4
  283. package/locale/no.json +2 -2
  284. package/locale/no.json.js +2 -2
  285. package/locale/nqo/package.json +16 -0
  286. package/locale/nqo.json +159 -0
  287. package/locale/nqo.json.d.ts +4 -0
  288. package/locale/nqo.json.js +159 -0
  289. package/locale/om/package.json +16 -0
  290. package/locale/om.json +213 -0
  291. package/locale/om.json.d.ts +4 -0
  292. package/locale/om.json.js +213 -0
  293. package/locale/or.json +1 -1
  294. package/locale/or.json.js +1 -1
  295. package/locale/qu.json +46 -46
  296. package/locale/qu.json.js +46 -46
  297. package/locale/rhg/package.json +16 -0
  298. package/locale/rhg.json +159 -0
  299. package/locale/rhg.json.d.ts +4 -0
  300. package/locale/rhg.json.js +159 -0
  301. package/locale/sl.json +12 -12
  302. package/locale/sl.json.js +12 -12
  303. package/locale/sr-Cyrl-BA.json +2 -2
  304. package/locale/sr-Cyrl-BA.json.js +2 -2
  305. package/locale/sr-Latn-BA.json +2 -2
  306. package/locale/sr-Latn-BA.json.js +2 -2
  307. package/locale/sv.json +1 -1
  308. package/locale/sv.json.js +1 -1
  309. package/locale/syr/package.json +16 -0
  310. package/locale/syr.json +303 -0
  311. package/locale/syr.json.d.ts +4 -0
  312. package/locale/syr.json.js +303 -0
  313. package/locale/ti.json +6 -6
  314. package/locale/ti.json.js +6 -6
  315. package/locale/tn/package.json +16 -0
  316. package/locale/tn.json +159 -0
  317. package/locale/tn.json.d.ts +4 -0
  318. package/locale/tn.json.js +159 -0
  319. package/locale/to.json +26 -26
  320. package/locale/to.json.js +26 -26
  321. package/locale/uk.json +1 -1
  322. package/locale/uk.json.js +1 -1
  323. package/locale/ur-IN.json +9 -6
  324. package/locale/ur-IN.json.js +9 -6
  325. package/locale/vec/package.json +16 -0
  326. package/locale/vec.json +267 -0
  327. package/locale/vec.json.d.ts +4 -0
  328. package/locale/vec.json.js +267 -0
  329. package/locale/xnr/package.json +16 -0
  330. package/locale/xnr.json +159 -0
  331. package/locale/xnr.json.d.ts +4 -0
  332. package/locale/xnr.json.js +159 -0
  333. package/locale/yo-BJ.json +17 -17
  334. package/locale/yo-BJ.json.js +17 -17
  335. package/locale/yo.json +17 -17
  336. package/locale/yo.json.js +17 -17
  337. package/modules/FullDateFormatter.js +67 -0
  338. package/modules/FullDateFormatter.js.map +1 -0
  339. package/modules/FullDateFormatter.test.js +22 -0
  340. package/modules/FullDateFormatter.test.js.map +1 -0
  341. package/modules/LocaleDataStore.js +2 -3
  342. package/modules/LocaleDataStore.js.map +1 -1
  343. package/modules/PropTypes.js +11 -7
  344. package/modules/PropTypes.js.map +1 -1
  345. package/modules/TimeAgo.js +299 -237
  346. package/modules/TimeAgo.js.map +1 -1
  347. package/modules/TimeAgo.test.js +217 -119
  348. package/modules/TimeAgo.test.js.map +1 -1
  349. package/modules/cache.js +6 -22
  350. package/modules/cache.js.map +1 -1
  351. package/modules/cache.test.js.map +1 -1
  352. package/modules/isStyleObject.js +9 -7
  353. package/modules/isStyleObject.js.map +1 -1
  354. package/modules/isStyleObject.test.js.map +1 -1
  355. package/modules/locale.js +6 -16
  356. package/modules/locale.js.map +1 -1
  357. package/modules/locale.test.js +0 -4
  358. package/modules/locale.test.js.map +1 -1
  359. package/modules/round.js +2 -3
  360. package/modules/round.js.map +1 -1
  361. package/modules/steps/approximate.js +6 -2
  362. package/modules/steps/approximate.js.map +1 -1
  363. package/modules/steps/approximate.test.js +0 -2
  364. package/modules/steps/approximate.test.js.map +1 -1
  365. package/modules/steps/getStep.js +36 -48
  366. package/modules/steps/getStep.js.map +1 -1
  367. package/modules/steps/getStep.test.js +6 -2
  368. package/modules/steps/getStep.test.js.map +1 -1
  369. package/modules/steps/getStepDenominator.js +2 -3
  370. package/modules/steps/getStepDenominator.js.map +1 -1
  371. package/modules/steps/getStepDenominator.test.js.map +1 -1
  372. package/modules/steps/getStepMinTime.js +31 -36
  373. package/modules/steps/getStepMinTime.js.map +1 -1
  374. package/modules/steps/getStepMinTime.test.js.map +1 -1
  375. package/modules/steps/getTimeToNextUpdate.js +28 -32
  376. package/modules/steps/getTimeToNextUpdate.js.map +1 -1
  377. package/modules/steps/getTimeToNextUpdate.test.js +27 -18
  378. package/modules/steps/getTimeToNextUpdate.test.js.map +1 -1
  379. package/modules/steps/getTimeToNextUpdateForUnit.js +4 -10
  380. package/modules/steps/getTimeToNextUpdateForUnit.js.map +1 -1
  381. package/modules/steps/getTimeToNextUpdateForUnit.test.js +0 -4
  382. package/modules/steps/getTimeToNextUpdateForUnit.test.js.map +1 -1
  383. package/modules/steps/helpers.js +1 -1
  384. package/modules/steps/helpers.js.map +1 -1
  385. package/modules/steps/helpers.test.js.map +1 -1
  386. package/modules/steps/index.js +2 -1
  387. package/modules/steps/index.js.map +1 -1
  388. package/modules/steps/renameLegacyProperties.js +6 -13
  389. package/modules/steps/renameLegacyProperties.js.map +1 -1
  390. package/modules/steps/renameLegacyProperties.test.js.map +1 -1
  391. package/modules/steps/round.js.map +1 -1
  392. package/modules/steps/round.test.js +0 -3
  393. package/modules/steps/round.test.js.map +1 -1
  394. package/modules/steps/units.js +5 -9
  395. package/modules/steps/units.js.map +1 -1
  396. package/modules/style/approximate.js +5 -1
  397. package/modules/style/approximate.js.map +1 -1
  398. package/modules/style/approximateTime.js +6 -2
  399. package/modules/style/approximateTime.js.map +1 -1
  400. package/modules/style/approximateTime.test.js +115 -70
  401. package/modules/style/approximateTime.test.js.map +1 -1
  402. package/modules/style/getStyleByName.js +4 -17
  403. package/modules/style/getStyleByName.js.map +1 -1
  404. package/modules/style/mini.js +8 -4
  405. package/modules/style/mini.js.map +1 -1
  406. package/modules/style/mini.test.js +14 -20
  407. package/modules/style/mini.test.js.map +1 -1
  408. package/modules/style/miniMinute.js +6 -6
  409. package/modules/style/miniMinute.js.map +1 -1
  410. package/modules/style/miniMinute.test.js +10 -12
  411. package/modules/style/miniMinute.test.js.map +1 -1
  412. package/modules/style/miniMinuteNow.js +6 -6
  413. package/modules/style/miniMinuteNow.js.map +1 -1
  414. package/modules/style/miniMinuteNow.test.js +10 -12
  415. package/modules/style/miniMinuteNow.test.js.map +1 -1
  416. package/modules/style/miniNow.js +6 -6
  417. package/modules/style/miniNow.js.map +1 -1
  418. package/modules/style/miniNow.test.js +10 -12
  419. package/modules/style/miniNow.test.js.map +1 -1
  420. package/modules/style/renameLegacyProperties.js +8 -10
  421. package/modules/style/renameLegacyProperties.js.map +1 -1
  422. package/modules/style/renameLegacyProperties.test.js +0 -1
  423. package/modules/style/renameLegacyProperties.test.js.map +1 -1
  424. package/modules/style/round.js +3 -2
  425. package/modules/style/round.js.map +1 -1
  426. package/modules/style/round.test.js +50 -62
  427. package/modules/style/round.test.js.map +1 -1
  428. package/modules/style/roundMinute.js +8 -7
  429. package/modules/style/roundMinute.js.map +1 -1
  430. package/modules/style/roundMinute.test.js +19 -22
  431. package/modules/style/roundMinute.test.js.map +1 -1
  432. package/modules/style/twitter.js +36 -33
  433. package/modules/style/twitter.js.map +1 -1
  434. package/modules/style/twitter.test.js +53 -52
  435. package/modules/style/twitter.test.js.map +1 -1
  436. package/modules/style/twitterFirstMinute.js +8 -7
  437. package/modules/style/twitterFirstMinute.js.map +1 -1
  438. package/modules/style/twitterFirstMinute.test.js +15 -18
  439. package/modules/style/twitterFirstMinute.test.js.map +1 -1
  440. package/modules/style/twitterMinute.js +6 -6
  441. package/modules/style/twitterMinute.js.map +1 -1
  442. package/modules/style/twitterMinute.test.js +19 -20
  443. package/modules/style/twitterMinute.test.js.map +1 -1
  444. package/modules/style/twitterMinuteNow.js +6 -6
  445. package/modules/style/twitterMinuteNow.js.map +1 -1
  446. package/modules/style/twitterMinuteNow.test.js +19 -20
  447. package/modules/style/twitterMinuteNow.test.js.map +1 -1
  448. package/modules/style/twitterNow.js +6 -6
  449. package/modules/style/twitterNow.js.map +1 -1
  450. package/modules/style/twitterNow.test.js +17 -19
  451. package/modules/style/twitterNow.test.js.map +1 -1
  452. package/package.json +275 -13
@@ -1,9 +1,9 @@
1
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
-
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
-
5
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
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 mini from './mini.js';
8
8
  export default _objectSpread(_objectSpread({}, mini), {}, {
9
9
  // Skip "seconds".
@@ -1 +1 @@
1
- {"version":3,"file":"miniMinute.js","names":["mini","steps","filter","step","formatAs"],"sources":["../../source/style/miniMinute.js"],"sourcesContent":["import mini from './mini.js'\r\n\r\nexport default {\r\n\t...mini,\r\n\t// Skip \"seconds\".\r\n\tsteps: mini.steps.filter(step => step.formatAs !== 'second')\r\n}"],"mappings":";;;;;;AAAA,OAAOA,IAAP,MAAiB,WAAjB;AAEA,+CACIA,IADJ;EAEC;EACAC,KAAK,EAAED,IAAI,CAACC,KAAL,CAAWC,MAAX,CAAkB,UAAAC,IAAI;IAAA,OAAIA,IAAI,CAACC,QAAL,KAAkB,QAAtB;EAAA,CAAtB;AAHR"}
1
+ {"version":3,"file":"miniMinute.js","names":["mini","_objectSpread","steps","filter","step","formatAs"],"sources":["../../source/style/miniMinute.js"],"sourcesContent":["import mini from './mini.js'\r\n\r\nexport default {\r\n\t...mini,\r\n\t// Skip \"seconds\".\r\n\tsteps: mini.steps.filter(step => step.formatAs !== 'second')\r\n}"],"mappings":";;;;;;AAAA,OAAOA,IAAI,MAAM,WAAW;AAE5B,eAAAC,aAAA,CAAAA,aAAA,KACID,IAAI;EACP;EACAE,KAAK,EAAEF,IAAI,CAACE,KAAK,CAACC,MAAM,CAAC,UAAAC,IAAI;IAAA,OAAIA,IAAI,CAACC,QAAQ,KAAK,QAAQ;EAAA;AAAC","ignoreList":[]}
@@ -1,16 +1,15 @@
1
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
-
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
-
5
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
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 style from './miniMinute.js';
8
8
  import TimeAgo from '../TimeAgo.js';
9
9
  import { hour, minute, day, month, year } from '../steps/index.js';
10
10
  describe('style/mini-now', function () {
11
11
  it('should format relative date/time (round: "floor")', function () {
12
12
  var timeAgo = new TimeAgo('en');
13
-
14
13
  var formatInterval = function formatInterval(secondsPassed) {
15
14
  return timeAgo.format(-secondsPassed * 1000, _objectSpread(_objectSpread({
16
15
  now: 0
@@ -18,7 +17,6 @@ describe('style/mini-now', function () {
18
17
  round: 'floor'
19
18
  }));
20
19
  };
21
-
22
20
  formatInterval(0).should.equal('0m');
23
21
  formatInterval(0.9).should.equal('0m');
24
22
  formatInterval(1).should.equal('0m');
@@ -27,15 +25,15 @@ describe('style/mini-now', function () {
27
25
  formatInterval(1.9 * minute).should.equal('1m');
28
26
  formatInterval(2 * minute).should.equal('2m');
29
27
  formatInterval(2.9 * minute).should.equal('2m');
30
- formatInterval(3 * minute).should.equal('3m'); // …
31
-
28
+ formatInterval(3 * minute).should.equal('3m');
29
+ // …
32
30
  formatInterval(59.9 * minute).should.equal('59m');
33
31
  formatInterval(60 * minute).should.equal('1h');
34
32
  formatInterval(1.9 * hour).should.equal('1h');
35
33
  formatInterval(2 * hour).should.equal('2h');
36
34
  formatInterval(2.9 * hour).should.equal('2h');
37
- formatInterval(3 * hour).should.equal('3h'); // …
38
-
35
+ formatInterval(3 * hour).should.equal('3h');
36
+ // …
39
37
  formatInterval(23.9 * hour).should.equal('23h');
40
38
  formatInterval(24 * hour).should.equal('1d');
41
39
  formatInterval(2 * day).should.equal('2d');
@@ -1 +1 @@
1
- {"version":3,"file":"miniMinute.test.js","names":["style","TimeAgo","hour","minute","day","month","year","describe","it","timeAgo","formatInterval","secondsPassed","format","now","round","should","equal"],"sources":["../../source/style/miniMinute.test.js"],"sourcesContent":["import style from './miniMinute.js'\r\nimport TimeAgo from '../TimeAgo.js'\r\nimport { hour, minute, day, month, year } from '../steps/index.js'\r\n\r\ndescribe('style/mini-now', () => {\r\n\tit('should format relative date/time (round: \"floor\")', () => {\r\n\t\tconst timeAgo = new TimeAgo('en')\r\n\t\tconst formatInterval = (secondsPassed) => timeAgo.format(-secondsPassed * 1000, { now: 0, ...style, round: 'floor' })\r\n\r\n\t\tformatInterval(0).should.equal('0m')\r\n\t\tformatInterval(0.9).should.equal('0m')\r\n\t\tformatInterval(1).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(24 * hour).should.equal('1d')\r\n\t\tformatInterval(2 * day).should.equal('2d')\r\n\t\tformatInterval(7 * day).should.equal('7d')\r\n\t\tformatInterval(30 * day).should.equal('30d')\r\n\t\tformatInterval(month).should.equal('1mo')\r\n\t\tformatInterval(360 * day).should.equal('11mo')\r\n\t\tformatInterval(366 * day).should.equal('1yr')\r\n\t})\r\n})"],"mappings":";;;;;;AAAA,OAAOA,KAAP,MAAkB,iBAAlB;AACA,OAAOC,OAAP,MAAoB,eAApB;AACA,SAASC,IAAT,EAAeC,MAAf,EAAuBC,GAAvB,EAA4BC,KAA5B,EAAmCC,IAAnC,QAA+C,mBAA/C;AAEAC,QAAQ,CAAC,gBAAD,EAAmB,YAAM;EAChCC,EAAE,CAAC,mDAAD,EAAsD,YAAM;IAC7D,IAAMC,OAAO,GAAG,IAAIR,OAAJ,CAAY,IAAZ,CAAhB;;IACA,IAAMS,cAAc,GAAG,SAAjBA,cAAiB,CAACC,aAAD;MAAA,OAAmBF,OAAO,CAACG,MAAR,CAAe,CAACD,aAAD,GAAiB,IAAhC;QAAwCE,GAAG,EAAE;MAA7C,GAAmDb,KAAnD;QAA0Dc,KAAK,EAAE;MAAjE,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CAAsC,IAAtC,EAnB6D,CAoB7D;;IACAN,cAAc,CAAC,OAAOR,IAAR,CAAd,CAA4Ba,MAA5B,CAAmCC,KAAnC,CAAyC,KAAzC;IACAN,cAAc,CAAC,KAAKR,IAAN,CAAd,CAA0Ba,MAA1B,CAAiCC,KAAjC,CAAuC,IAAvC;IACAN,cAAc,CAAC,IAAIN,GAAL,CAAd,CAAwBW,MAAxB,CAA+BC,KAA/B,CAAqC,IAArC;IACAN,cAAc,CAAC,IAAIN,GAAL,CAAd,CAAwBW,MAAxB,CAA+BC,KAA/B,CAAqC,IAArC;IACAN,cAAc,CAAC,KAAKN,GAAN,CAAd,CAAyBW,MAAzB,CAAgCC,KAAhC,CAAsC,KAAtC;IACAN,cAAc,CAACL,KAAD,CAAd,CAAsBU,MAAtB,CAA6BC,KAA7B,CAAmC,KAAnC;IACAN,cAAc,CAAC,MAAMN,GAAP,CAAd,CAA0BW,MAA1B,CAAiCC,KAAjC,CAAuC,MAAvC;IACAN,cAAc,CAAC,MAAMN,GAAP,CAAd,CAA0BW,MAA1B,CAAiCC,KAAjC,CAAuC,KAAvC;EACA,CA7BC,CAAF;AA8BA,CA/BO,CAAR"}
1
+ {"version":3,"file":"miniMinute.test.js","names":["style","TimeAgo","hour","minute","day","month","year","describe","it","timeAgo","formatInterval","secondsPassed","format","_objectSpread","now","round","should","equal"],"sources":["../../source/style/miniMinute.test.js"],"sourcesContent":["import style from './miniMinute.js'\r\nimport TimeAgo from '../TimeAgo.js'\r\nimport { hour, minute, day, month, year } from '../steps/index.js'\r\n\r\ndescribe('style/mini-now', () => {\r\n\tit('should format relative date/time (round: \"floor\")', () => {\r\n\t\tconst timeAgo = new TimeAgo('en')\r\n\t\tconst formatInterval = (secondsPassed) => timeAgo.format(-secondsPassed * 1000, { now: 0, ...style, round: 'floor' })\r\n\r\n\t\tformatInterval(0).should.equal('0m')\r\n\t\tformatInterval(0.9).should.equal('0m')\r\n\t\tformatInterval(1).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(24 * hour).should.equal('1d')\r\n\t\tformatInterval(2 * day).should.equal('2d')\r\n\t\tformatInterval(7 * day).should.equal('7d')\r\n\t\tformatInterval(30 * day).should.equal('30d')\r\n\t\tformatInterval(month).should.equal('1mo')\r\n\t\tformatInterval(360 * day).should.equal('11mo')\r\n\t\tformatInterval(366 * day).should.equal('1yr')\r\n\t})\r\n})"],"mappings":";;;;;;AAAA,OAAOA,KAAK,MAAM,iBAAiB;AACnC,OAAOC,OAAO,MAAM,eAAe;AACnC,SAASC,IAAI,EAAEC,MAAM,EAAEC,GAAG,EAAEC,KAAK,EAAEC,IAAI,QAAQ,mBAAmB;AAElEC,QAAQ,CAAC,gBAAgB,EAAE,YAAM;EAChCC,EAAE,CAAC,mDAAmD,EAAE,YAAM;IAC7D,IAAMC,OAAO,GAAG,IAAIR,OAAO,CAAC,IAAI,CAAC;IACjC,IAAMS,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,aAAa;MAAA,OAAKF,OAAO,CAACG,MAAM,CAAC,CAACD,aAAa,GAAG,IAAI,EAAAE,aAAA,CAAAA,aAAA;QAAIC,GAAG,EAAE;MAAC,GAAKd,KAAK;QAAEe,KAAK,EAAE;MAAO,EAAE,CAAC;IAAA;IAErH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AAI,CAAC;IAC3C;IACAP,cAAc,CAAC,IAAI,GAAGR,IAAI,CAAC,CAACc,MAAM,CAACC,KAAK,CAAC,KAAK,CAAC;IAC/CP,cAAc,CAAC,EAAE,GAAGR,IAAI,CAAC,CAACc,MAAM,CAACC,KAAK,CAAC,IAAI,CAAC;IAC5CP,cAAc,CAAC,CAAC,GAAGN,GAAG,CAAC,CAACY,MAAM,CAACC,KAAK,CAAC,IAAI,CAAC;IAC1CP,cAAc,CAAC,CAAC,GAAGN,GAAG,CAAC,CAACY,MAAM,CAACC,KAAK,CAAC,IAAI,CAAC;IAC1CP,cAAc,CAAC,EAAE,GAAGN,GAAG,CAAC,CAACY,MAAM,CAACC,KAAK,CAAC,KAAK,CAAC;IAC5CP,cAAc,CAACL,KAAK,CAAC,CAACW,MAAM,CAACC,KAAK,CAAC,KAAK,CAAC;IACzCP,cAAc,CAAC,GAAG,GAAGN,GAAG,CAAC,CAACY,MAAM,CAACC,KAAK,CAAC,MAAM,CAAC;IAC9CP,cAAc,CAAC,GAAG,GAAGN,GAAG,CAAC,CAACY,MAAM,CAACC,KAAK,CAAC,KAAK,CAAC;EAC9C,CAAC,CAAC;AACH,CAAC,CAAC","ignoreList":[]}
@@ -1,9 +1,9 @@
1
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
-
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
-
5
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
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 miniMinute from './miniMinute.js';
8
8
  export default _objectSpread(_objectSpread({}, miniMinute), {}, {
9
9
  // Add "now".
@@ -1 +1 @@
1
- {"version":3,"file":"miniMinuteNow.js","names":["miniMinute","steps","formatAs","concat"],"sources":["../../source/style/miniMinuteNow.js"],"sourcesContent":["import miniMinute from './miniMinute.js'\r\n\r\nexport default {\r\n\t...miniMinute,\r\n\t// Add \"now\".\r\n\tsteps: [{ formatAs: 'now' }].concat(miniMinute.steps)\r\n}"],"mappings":";;;;;;AAAA,OAAOA,UAAP,MAAuB,iBAAvB;AAEA,+CACIA,UADJ;EAEC;EACAC,KAAK,EAAE,CAAC;IAAEC,QAAQ,EAAE;EAAZ,CAAD,EAAsBC,MAAtB,CAA6BH,UAAU,CAACC,KAAxC;AAHR"}
1
+ {"version":3,"file":"miniMinuteNow.js","names":["miniMinute","_objectSpread","steps","formatAs","concat"],"sources":["../../source/style/miniMinuteNow.js"],"sourcesContent":["import miniMinute from './miniMinute.js'\r\n\r\nexport default {\r\n\t...miniMinute,\r\n\t// Add \"now\".\r\n\tsteps: [{ formatAs: 'now' }].concat(miniMinute.steps)\r\n}"],"mappings":";;;;;;AAAA,OAAOA,UAAU,MAAM,iBAAiB;AAExC,eAAAC,aAAA,CAAAA,aAAA,KACID,UAAU;EACb;EACAE,KAAK,EAAE,CAAC;IAAEC,QAAQ,EAAE;EAAM,CAAC,CAAC,CAACC,MAAM,CAACJ,UAAU,CAACE,KAAK;AAAC","ignoreList":[]}
@@ -1,16 +1,15 @@
1
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
-
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
-
5
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
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 style from './miniMinuteNow.js';
8
8
  import TimeAgo from '../TimeAgo.js';
9
9
  import { hour, minute, day, month, year } from '../steps/index.js';
10
10
  describe('style/mini-minute-now', function () {
11
11
  it('should format relative date/time (round: "floor")', function () {
12
12
  var timeAgo = new TimeAgo('en');
13
-
14
13
  var formatInterval = function formatInterval(secondsPassed) {
15
14
  return timeAgo.format(-secondsPassed * 1000, _objectSpread(_objectSpread({
16
15
  now: 0
@@ -18,7 +17,6 @@ describe('style/mini-minute-now', function () {
18
17
  round: 'floor'
19
18
  }));
20
19
  };
21
-
22
20
  formatInterval(0).should.equal('now');
23
21
  formatInterval(0.9).should.equal('now');
24
22
  formatInterval(1).should.equal('now');
@@ -27,15 +25,15 @@ describe('style/mini-minute-now', function () {
27
25
  formatInterval(1.9 * minute).should.equal('1m');
28
26
  formatInterval(2 * minute).should.equal('2m');
29
27
  formatInterval(2.9 * minute).should.equal('2m');
30
- formatInterval(3 * minute).should.equal('3m'); // …
31
-
28
+ formatInterval(3 * minute).should.equal('3m');
29
+ // …
32
30
  formatInterval(59.9 * minute).should.equal('59m');
33
31
  formatInterval(60 * minute).should.equal('1h');
34
32
  formatInterval(1.9 * hour).should.equal('1h');
35
33
  formatInterval(2 * hour).should.equal('2h');
36
34
  formatInterval(2.9 * hour).should.equal('2h');
37
- formatInterval(3 * hour).should.equal('3h'); // …
38
-
35
+ formatInterval(3 * hour).should.equal('3h');
36
+ // …
39
37
  formatInterval(23.9 * hour).should.equal('23h');
40
38
  formatInterval(24 * hour).should.equal('1d');
41
39
  formatInterval(2 * day).should.equal('2d');
@@ -1 +1 @@
1
- {"version":3,"file":"miniMinuteNow.test.js","names":["style","TimeAgo","hour","minute","day","month","year","describe","it","timeAgo","formatInterval","secondsPassed","format","now","round","should","equal"],"sources":["../../source/style/miniMinuteNow.test.js"],"sourcesContent":["import style from './miniMinuteNow.js'\r\nimport TimeAgo from '../TimeAgo.js'\r\nimport { hour, minute, day, month, year } from '../steps/index.js'\r\n\r\ndescribe('style/mini-minute-now', () => {\r\n\tit('should format relative date/time (round: \"floor\")', () => {\r\n\t\tconst timeAgo = new TimeAgo('en')\r\n\t\tconst formatInterval = (secondsPassed) => timeAgo.format(-secondsPassed * 1000, { now: 0, ...style, round: 'floor' })\r\n\r\n\t\tformatInterval(0).should.equal('now')\r\n\t\tformatInterval(0.9).should.equal('now')\r\n\t\tformatInterval(1).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(24 * hour).should.equal('1d')\r\n\t\tformatInterval(2 * day).should.equal('2d')\r\n\t\tformatInterval(7 * day).should.equal('7d')\r\n\t\tformatInterval(30 * day).should.equal('30d')\r\n\t\tformatInterval(month).should.equal('1mo')\r\n\t\tformatInterval(360 * day).should.equal('11mo')\r\n\t\tformatInterval(366 * day).should.equal('1yr')\r\n\t})\r\n})"],"mappings":";;;;;;AAAA,OAAOA,KAAP,MAAkB,oBAAlB;AACA,OAAOC,OAAP,MAAoB,eAApB;AACA,SAASC,IAAT,EAAeC,MAAf,EAAuBC,GAAvB,EAA4BC,KAA5B,EAAmCC,IAAnC,QAA+C,mBAA/C;AAEAC,QAAQ,CAAC,uBAAD,EAA0B,YAAM;EACvCC,EAAE,CAAC,mDAAD,EAAsD,YAAM;IAC7D,IAAMC,OAAO,GAAG,IAAIR,OAAJ,CAAY,IAAZ,CAAhB;;IACA,IAAMS,cAAc,GAAG,SAAjBA,cAAiB,CAACC,aAAD;MAAA,OAAmBF,OAAO,CAACG,MAAR,CAAe,CAACD,aAAD,GAAiB,IAAhC;QAAwCE,GAAG,EAAE;MAA7C,GAAmDb,KA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d,CAAyBa,MAAzB,CAAgCC,KAAhC,CAAsC,IAAtC,EAnB6D,CAoB7D;;IACAN,cAAc,CAAC,OAAOR,IAAR,CAAd,CAA4Ba,MAA5B,CAAmCC,KAAnC,CAAyC,KAAzC;IACAN,cAAc,CAAC,KAAKR,IAAN,CAAd,CAA0Ba,MAA1B,CAAiCC,KAAjC,CAAuC,IAAvC;IACAN,cAAc,CAAC,IAAIN,GAAL,CAAd,CAAwBW,MAAxB,CAA+BC,KAA/B,CAAqC,IAArC;IACAN,cAAc,CAAC,IAAIN,GAAL,CAAd,CAAwBW,MAAxB,CAA+BC,KAA/B,CAAqC,IAArC;IACAN,cAAc,CAAC,KAAKN,GAAN,CAAd,CAAyBW,MAAzB,CAAgCC,KAAhC,CAAsC,KAAtC;IACAN,cAAc,CAACL,KAAD,CAAd,CAAsBU,MAAtB,CAA6BC,KAA7B,CAAmC,KAAnC;IACAN,cAAc,CAAC,MAAMN,GAAP,CAAd,CAA0BW,MAA1B,CAAiCC,KAAjC,CAAuC,MAAvC;IACAN,cAAc,CAAC,MAAMN,GAAP,CAAd,CAA0BW,MAA1B,CAAiCC,KAAjC,CAAuC,KAAvC;EACA,CA7BC,CAAF;AA8BA,CA/BO,CAAR"}
1
+ {"version":3,"file":"miniMinuteNow.test.js","names":["style","TimeAgo","hour","minute","day","month","year","describe","it","timeAgo","formatInterval","secondsPassed","format","_objectSpread","now","round","should","equal"],"sources":["../../source/style/miniMinuteNow.test.js"],"sourcesContent":["import style from './miniMinuteNow.js'\r\nimport TimeAgo from '../TimeAgo.js'\r\nimport { hour, minute, day, month, year } from '../steps/index.js'\r\n\r\ndescribe('style/mini-minute-now', () => {\r\n\tit('should format relative date/time (round: \"floor\")', () => {\r\n\t\tconst timeAgo = new TimeAgo('en')\r\n\t\tconst formatInterval = (secondsPassed) => timeAgo.format(-secondsPassed * 1000, { now: 0, ...style, round: 'floor' })\r\n\r\n\t\tformatInterval(0).should.equal('now')\r\n\t\tformatInterval(0.9).should.equal('now')\r\n\t\tformatInterval(1).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(24 * hour).should.equal('1d')\r\n\t\tformatInterval(2 * day).should.equal('2d')\r\n\t\tformatInterval(7 * day).should.equal('7d')\r\n\t\tformatInterval(30 * day).should.equal('30d')\r\n\t\tformatInterval(month).should.equal('1mo')\r\n\t\tformatInterval(360 * day).should.equal('11mo')\r\n\t\tformatInterval(366 * day).should.equal('1yr')\r\n\t})\r\n})"],"mappings":";;;;;;AAAA,OAAOA,KAAK,MAAM,oBAAoB;AACtC,OAAOC,OAAO,MAAM,eAAe;AACnC,SAASC,IAAI,EAAEC,MAAM,EAAEC,GAAG,EAAEC,KAAK,EAAEC,IAAI,QAAQ,mBAAmB;AAElEC,QAAQ,CAAC,uBAAuB,EAAE,YAAM;EACvCC,EAAE,CAAC,mDAAmD,EAAE,YAAM;IAC7D,IAAMC,OAAO,GAAG,IAAIR,OAAO,CAAC,IAAI,CAAC;IACjC,IAAMS,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,aAAa;MAAA,OAAKF,OAAO,CAACG,MAAM,CAAC,CAACD,aAAa,GAAG,IAAI,EAAAE,aAAA,CAAAA,aAAA;QAAIC,GAAG,EAAE;MAAC,GAAKd,KAAK;QAAE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IAAI,CAAC,CAACc,MAAM,CAACC,KAAK,CAAC,IAAI,CAAC;IAC3C;IACAP,cAAc,CAAC,IAAI,GAAGR,IAAI,CAAC,CAACc,MAAM,CAACC,KAAK,CAAC,KAAK,CAAC;IAC/CP,cAAc,CAAC,EAAE,GAAGR,IAAI,CAAC,CAACc,MAAM,CAACC,KAAK,CAAC,IAAI,CAAC;IAC5CP,cAAc,CAAC,CAAC,GAAGN,GAAG,CAAC,CAACY,MAAM,CAACC,KAAK,CAAC,IAAI,CAAC;IAC1CP,cAAc,CAAC,CAAC,GAAGN,GAAG,CAAC,CAACY,MAAM,CAACC,KAAK,CAAC,IAAI,CAAC;IAC1CP,cAAc,CAAC,EAAE,GAAGN,GAAG,CAAC,CAACY,MAAM,CAACC,KAAK,CAAC,KAAK,CAAC;IAC5CP,cAAc,CAACL,KAAK,CAAC,CAACW,MAAM,CAACC,KAAK,CAAC,KAAK,CAAC;IACzCP,cAAc,CAAC,GAAG,GAAGN,GAAG,CAAC,CAACY,MAAM,CAACC,KAAK,CAAC,MAAM,CAAC;IAC9CP,cAAc,CAAC,GAAG,GAAGN,GAAG,CAAC,CAACY,MAAM,CAACC,KAAK,CAAC,KAAK,CAAC;EAC9C,CAAC,CAAC;AACH,CAAC,CAAC","ignoreList":[]}
@@ -1,9 +1,9 @@
1
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
-
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
-
5
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
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 mini from './mini.js';
8
8
  export default _objectSpread(_objectSpread({}, mini), {}, {
9
9
  // Add "now".
@@ -1 +1 @@
1
- {"version":3,"file":"miniNow.js","names":["mini","steps","formatAs","concat"],"sources":["../../source/style/miniNow.js"],"sourcesContent":["import mini from './mini.js'\r\n\r\nexport default {\r\n\t...mini,\r\n\t// Add \"now\".\r\n\tsteps: [{ formatAs: 'now' }].concat(mini.steps)\r\n}"],"mappings":";;;;;;AAAA,OAAOA,IAAP,MAAiB,WAAjB;AAEA,+CACIA,IADJ;EAEC;EACAC,KAAK,EAAE,CAAC;IAAEC,QAAQ,EAAE;EAAZ,CAAD,EAAsBC,MAAtB,CAA6BH,IAAI,CAACC,KAAlC;AAHR"}
1
+ {"version":3,"file":"miniNow.js","names":["mini","_objectSpread","steps","formatAs","concat"],"sources":["../../source/style/miniNow.js"],"sourcesContent":["import mini from './mini.js'\r\n\r\nexport default {\r\n\t...mini,\r\n\t// Add \"now\".\r\n\tsteps: [{ formatAs: 'now' }].concat(mini.steps)\r\n}"],"mappings":";;;;;;AAAA,OAAOA,IAAI,MAAM,WAAW;AAE5B,eAAAC,aAAA,CAAAA,aAAA,KACID,IAAI;EACP;EACAE,KAAK,EAAE,CAAC;IAAEC,QAAQ,EAAE;EAAM,CAAC,CAAC,CAACC,MAAM,CAACJ,IAAI,CAACE,KAAK;AAAC","ignoreList":[]}
@@ -1,16 +1,15 @@
1
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
-
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
-
5
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
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 style from './miniNow.js';
8
8
  import TimeAgo from '../TimeAgo.js';
9
9
  import { hour, minute, day, month, year } from '../steps/index.js';
10
10
  describe('style/mini-now', function () {
11
11
  it('should format relative date/time (round: "floor")', function () {
12
12
  var timeAgo = new TimeAgo('en');
13
-
14
13
  var formatInterval = function formatInterval(secondsPassed) {
15
14
  return timeAgo.format(-secondsPassed * 1000, _objectSpread(_objectSpread({
16
15
  now: 0
@@ -18,7 +17,6 @@ describe('style/mini-now', function () {
18
17
  round: 'floor'
19
18
  }));
20
19
  };
21
-
22
20
  formatInterval(0).should.equal('now');
23
21
  formatInterval(0.9).should.equal('now');
24
22
  formatInterval(1).should.equal('1s');
@@ -27,15 +25,15 @@ describe('style/mini-now', function () {
27
25
  formatInterval(1.9 * minute).should.equal('1m');
28
26
  formatInterval(2 * minute).should.equal('2m');
29
27
  formatInterval(2.9 * minute).should.equal('2m');
30
- formatInterval(3 * minute).should.equal('3m'); // …
31
-
28
+ formatInterval(3 * minute).should.equal('3m');
29
+ // …
32
30
  formatInterval(59.9 * minute).should.equal('59m');
33
31
  formatInterval(60 * minute).should.equal('1h');
34
32
  formatInterval(1.9 * hour).should.equal('1h');
35
33
  formatInterval(2 * hour).should.equal('2h');
36
34
  formatInterval(2.9 * hour).should.equal('2h');
37
- formatInterval(3 * hour).should.equal('3h'); // …
38
-
35
+ formatInterval(3 * hour).should.equal('3h');
36
+ // …
39
37
  formatInterval(23.9 * hour).should.equal('23h');
40
38
  formatInterval(24 * hour).should.equal('1d');
41
39
  formatInterval(2 * day).should.equal('2d');
@@ -1 +1 @@
1
- {"version":3,"file":"miniNow.test.js","names":["style","TimeAgo","hour","minute","day","month","year","describe","it","timeAgo","formatInterval","secondsPassed","format","now","round","should","equal"],"sources":["../../source/style/miniNow.test.js"],"sourcesContent":["import style from './miniNow.js'\r\nimport TimeAgo from '../TimeAgo.js'\r\nimport { hour, minute, day, month, year } from '../steps/index.js'\r\n\r\ndescribe('style/mini-now', () => {\r\n\tit('should format relative date/time (round: \"floor\")', () => {\r\n\t\tconst timeAgo = new TimeAgo('en')\r\n\t\tconst formatInterval = (secondsPassed) => timeAgo.format(-secondsPassed * 1000, { now: 0, ...style, round: 'floor' })\r\n\r\n\t\tformatInterval(0).should.equal('now')\r\n\t\tformatInterval(0.9).should.equal('now')\r\n\t\tformatInterval(1).should.equal('1s')\r\n\t\tformatInterval(59.9).should.equal('59s')\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(24 * hour).should.equal('1d')\r\n\t\tformatInterval(2 * day).should.equal('2d')\r\n\t\tformatInterval(7 * day).should.equal('7d')\r\n\t\tformatInterval(30 * day).should.equal('30d')\r\n\t\tformatInterval(month).should.equal('1mo')\r\n\t\tformatInterval(360 * day).should.equal('11mo')\r\n\t\tformatInterval(366 * day).should.equal('1yr')\r\n\t})\r\n})"],"mappings":";;;;;;AAAA,OAAOA,KAAP,MAAkB,cAAlB;AACA,OAAOC,OAAP,MAAoB,eAApB;AACA,SAASC,IAAT,EAAeC,MAAf,EAAuBC,GAAvB,EAA4BC,KAA5B,EAAmCC,IAAnC,QAA+C,mBAA/C;AAEAC,QAAQ,CAAC,gBAAD,EAAmB,YAAM;EAChCC,EAAE,CAAC,mDAAD,EAAsD,YAAM;IAC7D,IAAMC,OAAO,GAAG,IAAIR,OAAJ,CAAY,IAAZ,CAAhB;;IACA,IAAMS,cAAc,GAAG,SAAjBA,cAAiB,CAACC,aAAD;MAAA,OAAmBF,OAAO,CAACG,MAAR,CAAe,CAACD,aAAD,GAAiB,IAAhC;QAAwCE,GAAG,EAAE;MAA7C,GAAmDb,KAAnD;QAA0Dc,KAAK,EAAE;MAAjE,GAAnB;IAAA,CAAvB;;I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CAoB7D;;IACAN,cAAc,CAAC,OAAOR,IAAR,CAAd,CAA4Ba,MAA5B,CAAmCC,KAAnC,CAAyC,KAAzC;IACAN,cAAc,CAAC,KAAKR,IAAN,CAAd,CAA0Ba,MAA1B,CAAiCC,KAAjC,CAAuC,IAAvC;IACAN,cAAc,CAAC,IAAIN,GAAL,CAAd,CAAwBW,MAAxB,CAA+BC,KAA/B,CAAqC,IAArC;IACAN,cAAc,CAAC,IAAIN,GAAL,CAAd,CAAwBW,MAAxB,CAA+BC,KAA/B,CAAqC,IAArC;IACAN,cAAc,CAAC,KAAKN,GAAN,CAAd,CAAyBW,MAAzB,CAAgCC,KAAhC,CAAsC,KAAtC;IACAN,cAAc,CAACL,KAAD,CAAd,CAAsBU,MAAtB,CAA6BC,KAA7B,CAAmC,KAAnC;IACAN,cAAc,CAAC,MAAMN,GAAP,CAAd,CAA0BW,MAA1B,CAAiCC,KAAjC,CAAuC,MAAvC;IACAN,cAAc,CAAC,MAAMN,GAAP,CAAd,CAA0BW,MAA1B,CAAiCC,KAAjC,CAAuC,KAAvC;EACA,CA7BC,CAAF;AA8BA,CA/BO,CAAR"}
1
+ {"version":3,"file":"miniNow.test.js","names":["style","TimeAgo","hour","minute","day","month","year","describe","it","timeAgo","formatInterval","secondsPassed","format","_objectSpread","now","round","should","equal"],"sources":["../../source/style/miniNow.test.js"],"sourcesContent":["import style from './miniNow.js'\r\nimport TimeAgo from '../TimeAgo.js'\r\nimport { hour, minute, day, month, year } from '../steps/index.js'\r\n\r\ndescribe('style/mini-now', () => {\r\n\tit('should format relative date/time (round: \"floor\")', () => {\r\n\t\tconst timeAgo = new TimeAgo('en')\r\n\t\tconst formatInterval = (secondsPassed) => timeAgo.format(-secondsPassed * 1000, { now: 0, ...style, round: 'floor' })\r\n\r\n\t\tformatInterval(0).should.equal('now')\r\n\t\tformatInterval(0.9).should.equal('now')\r\n\t\tformatInterval(1).should.equal('1s')\r\n\t\tformatInterval(59.9).should.equal('59s')\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(24 * hour).should.equal('1d')\r\n\t\tformatInterval(2 * day).should.equal('2d')\r\n\t\tformatInterval(7 * day).should.equal('7d')\r\n\t\tformatInterval(30 * day).should.equal('30d')\r\n\t\tformatInterval(month).should.equal('1mo')\r\n\t\tformatInterval(360 * day).should.equal('11mo')\r\n\t\tformatInterval(366 * day).should.equal('1yr')\r\n\t})\r\n})"],"mappings":";;;;;;AAAA,OAAOA,KAAK,MAAM,cAAc;AAChC,OAAOC,OAAO,MAAM,eAAe;AACnC,SAASC,IAAI,EAAEC,MAAM,EAAEC,GAAG,EAAEC,KAAK,EAAEC,IAAI,QAAQ,mBAAmB;AAElEC,QAAQ,CAAC,gBAAgB,EAAE,YAAM;EAChCC,EAAE,CAAC,mDAAmD,EAAE,YAAM;IAC7D,IAAMC,OAAO,GAAG,IAAIR,OAAO,CAAC,IAAI,CAAC;IACjC,IAAMS,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,aAAa;MAAA,OAAKF,OAAO,CAACG,MAAM,CAAC,CAACD,aAAa,GAAG,IAAI,EAAAE,aAAA,CAAAA,aAAA;QAAIC,GAAG,EAAE;MAAC,GAAKd,KAAK;QAAEe,KAAK,EAAE;MAAO,EAAE,CAAC;IAAA;IAErHL,cAAc,CAAC,CAAC,CAAC,CAACM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AAC,IAAI,GAAGR,IAAI,CAAC,CAACc,MAAM,CAACC,KAAK,CAAC,KAAK,CAAC;IAC/CP,cAAc,CAAC,EAAE,GAAGR,IAAI,CAAC,CAACc,MAAM,CAACC,KAAK,CAAC,IAAI,CAAC;IAC5CP,cAAc,CAAC,CAAC,GAAGN,GAAG,CAAC,CAACY,MAAM,CAACC,KAAK,CAAC,IAAI,CAAC;IAC1CP,cAAc,CAAC,CAAC,GAAGN,GAAG,CAAC,CAACY,MAAM,CAACC,KAAK,CAAC,IAAI,CAAC;IAC1CP,cAAc,CAAC,EAAE,GAAGN,GAAG,CAAC,CAACY,MAAM,CAACC,KAAK,CAAC,KAAK,CAAC;IAC5CP,cAAc,CAACL,KAAK,CAAC,CAACW,MAAM,CAACC,KAAK,CAAC,KAAK,CAAC;IACzCP,cAAc,CAAC,GAAG,GAAGN,GAAG,CAAC,CAACY,MAAM,CAACC,KAAK,CAAC,MAAM,CAAC;IAC9CP,cAAc,CAAC,GAAG,GAAGN,GAAG,CAAC,CAACY,MAAM,CAACC,KAAK,CAAC,KAAK,CAAC;EAC9C,CAAC,CAAC;AACH,CAAC,CAAC","ignoreList":[]}
@@ -1,25 +1,23 @@
1
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
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
+ import renameLegacyProperties from '../steps/renameLegacyProperties.js';
2
8
 
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
-
5
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
-
7
- import renameLegacyProperties from '../steps/renameLegacyProperties.js'; // This function is only used for backwards compatibility
9
+ // This function is only used for backwards compatibility
8
10
  // with legacy code that uses the older versions of this library.
9
-
10
11
  export default function (style_) {
11
12
  var style = _objectSpread({}, style_);
12
-
13
13
  if (style.steps) {
14
14
  style.gradation = style.steps.map(renameLegacyProperties);
15
15
  delete style.steps;
16
16
  }
17
-
18
17
  if (style.labels) {
19
18
  style.flavour = style.labels;
20
19
  delete style.labels;
21
20
  }
22
-
23
21
  return style;
24
22
  }
25
23
  //# sourceMappingURL=renameLegacyProperties.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"renameLegacyProperties.js","names":["renameLegacyProperties","style_","style","steps","gradation","map","labels","flavour"],"sources":["../../source/style/renameLegacyProperties.js"],"sourcesContent":["import renameLegacyProperties from '../steps/renameLegacyProperties.js'\r\n\r\n// This function is only used for backwards compatibility\r\n// with legacy code that uses the older versions of this library.\r\nexport default function(style_) {\r\n\tconst style = { ...style_ }\r\n\tif (style.steps) {\r\n\t\tstyle.gradation = style.steps.map(renameLegacyProperties)\r\n\t\tdelete style.steps\r\n\t}\r\n\tif (style.labels) {\r\n\t\tstyle.flavour = style.labels\r\n\t\tdelete style.labels\r\n\t}\r\n\treturn style\r\n}"],"mappings":";;;;;;AAAA,OAAOA,sBAAP,MAAmC,oCAAnC,C,CAEA;AACA;;AACA,eAAe,UAASC,MAAT,EAAiB;EAC/B,IAAMC,KAAK,qBAAQD,MAAR,CAAX;;EACA,IAAIC,KAAK,CAACC,KAAV,EAAiB;IAChBD,KAAK,CAACE,SAAN,GAAkBF,KAAK,CAACC,KAAN,CAAYE,GAAZ,CAAgBL,sBAAhB,CAAlB;IACA,OAAOE,KAAK,CAACC,KAAb;EACA;;EACD,IAAID,KAAK,CAACI,MAAV,EAAkB;IACjBJ,KAAK,CAACK,OAAN,GAAgBL,KAAK,CAACI,MAAtB;IACA,OAAOJ,KAAK,CAACI,MAAb;EACA;;EACD,OAAOJ,KAAP;AACA"}
1
+ {"version":3,"file":"renameLegacyProperties.js","names":["renameLegacyProperties","style_","style","_objectSpread","steps","gradation","map","labels","flavour"],"sources":["../../source/style/renameLegacyProperties.js"],"sourcesContent":["import renameLegacyProperties from '../steps/renameLegacyProperties.js'\r\n\r\n// This function is only used for backwards compatibility\r\n// with legacy code that uses the older versions of this library.\r\nexport default function(style_) {\r\n\tconst style = { ...style_ }\r\n\tif (style.steps) {\r\n\t\tstyle.gradation = style.steps.map(renameLegacyProperties)\r\n\t\tdelete style.steps\r\n\t}\r\n\tif (style.labels) {\r\n\t\tstyle.flavour = style.labels\r\n\t\tdelete style.labels\r\n\t}\r\n\treturn style\r\n}"],"mappings":";;;;;;AAAA,OAAOA,sBAAsB,MAAM,oCAAoC;;AAEvE;AACA;AACA,eAAe,UAASC,MAAM,EAAE;EAC/B,IAAMC,KAAK,GAAAC,aAAA,KAAQF,MAAM,CAAE;EAC3B,IAAIC,KAAK,CAACE,KAAK,EAAE;IAChBF,KAAK,CAACG,SAAS,GAAGH,KAAK,CAACE,KAAK,CAACE,GAAG,CAACN,sBAAsB,CAAC;IACzD,OAAOE,KAAK,CAACE,KAAK;EACnB;EACA,IAAIF,KAAK,CAACK,MAAM,EAAE;IACjBL,KAAK,CAACM,OAAO,GAAGN,KAAK,CAACK,MAAM;IAC5B,OAAOL,KAAK,CAACK,MAAM;EACpB;EACA,OAAOL,KAAK;AACb","ignoreList":[]}
@@ -21,7 +21,6 @@ describe('style/renameLegacyProperties', function () {
21
21
  });
22
22
  it('should cover edge cases', function () {
23
23
  var custom = function custom() {};
24
-
25
24
  renameLegacyProperties({
26
25
  custom: custom
27
26
  }).should.deep.equal({
@@ -1 +1 @@
1
- {"version":3,"file":"renameLegacyProperties.test.js","names":["renameLegacyProperties","describe","it","steps","unit","minTime","week","labels","should","deep","equal","gradation","threshold","threshold_for_week","flavour","custom"],"sources":["../../source/style/renameLegacyProperties.test.js"],"sourcesContent":["import renameLegacyProperties from './renameLegacyProperties.js'\r\n\r\ndescribe('style/renameLegacyProperties', () => {\r\n\tit('should rename legacy properties', () => {\r\n\t\trenameLegacyProperties({\r\n\t\t\tsteps: [{\r\n\t\t\t\tunit: 'now',\r\n\t\t\t\tminTime: {\r\n\t\t\t\t\tweek: 2,\r\n\t\t\t\t\tdefault: 1\r\n\t\t\t\t}\r\n\t\t\t}],\r\n\t\t\tlabels: 'long'\r\n\t\t}).should.deep.equal({\r\n\t\t\tgradation: [{\r\n\t\t\t\tunit: 'now',\r\n\t\t\t\tthreshold: 1,\r\n\t\t\t\tthreshold_for_week: 2\r\n\t\t\t}],\r\n\t\t\tflavour: 'long'\r\n\t\t})\r\n\t})\r\n\r\n\tit('should cover edge cases', () => {\r\n\t\tconst custom = () => {}\r\n\t\trenameLegacyProperties({\r\n\t\t\tcustom\r\n\t\t}).should.deep.equal({\r\n\t\t\tcustom\r\n\t\t})\r\n\t})\r\n})"],"mappings":"AAAA,OAAOA,sBAAP,MAAmC,6BAAnC;AAEAC,QAAQ,CAAC,8BAAD,EAAiC,YAAM;EAC9CC,EAAE,CAAC,iCAAD,EAAoC,YAAM;IAC3CF,sBAAsB,CAAC;MACtBG,KAAK,EAAE,CAAC;QACPC,IAAI,EAAE,KADC;QAEPC,OAAO,EAAE;UACRC,IAAI,EAAE,CADE;UAER,WAAS;QAFD;MAFF,CAAD,CADe;MAQtBC,MAAM,EAAE;IARc,CAAD,CAAtB,CASGC,MATH,CASUC,IATV,CASeC,KATf,CASqB;MACpBC,SAAS,EAAE,CAAC;QACXP,IAAI,EAAE,KADK;QAEXQ,SAAS,EAAE,CAFA;QAGXC,kBAAkB,EAAE;MAHT,CAAD,CADS;MAMpBC,OAAO,EAAE;IANW,CATrB;EAiBA,CAlBC,CAAF;EAoBAZ,EAAE,CAAC,yBAAD,EAA4B,YAAM;IACnC,IAAMa,MAAM,GAAG,SAATA,MAAS,GAAM,CAAE,CAAvB;;IACAf,sBAAsB,CAAC;MACtBe,MAAM,EAANA;IADsB,CAAD,CAAtB,CAEGP,MAFH,CAEUC,IAFV,CAEeC,KAFf,CAEqB;MACpBK,MAAM,EAANA;IADoB,CAFrB;EAKA,CAPC,CAAF;AAQA,CA7BO,CAAR"}
1
+ {"version":3,"file":"renameLegacyProperties.test.js","names":["renameLegacyProperties","describe","it","steps","unit","minTime","week","labels","should","deep","equal","gradation","threshold","threshold_for_week","flavour","custom"],"sources":["../../source/style/renameLegacyProperties.test.js"],"sourcesContent":["import renameLegacyProperties from './renameLegacyProperties.js'\r\n\r\ndescribe('style/renameLegacyProperties', () => {\r\n\tit('should rename legacy properties', () => {\r\n\t\trenameLegacyProperties({\r\n\t\t\tsteps: [{\r\n\t\t\t\tunit: 'now',\r\n\t\t\t\tminTime: {\r\n\t\t\t\t\tweek: 2,\r\n\t\t\t\t\tdefault: 1\r\n\t\t\t\t}\r\n\t\t\t}],\r\n\t\t\tlabels: 'long'\r\n\t\t}).should.deep.equal({\r\n\t\t\tgradation: [{\r\n\t\t\t\tunit: 'now',\r\n\t\t\t\tthreshold: 1,\r\n\t\t\t\tthreshold_for_week: 2\r\n\t\t\t}],\r\n\t\t\tflavour: 'long'\r\n\t\t})\r\n\t})\r\n\r\n\tit('should cover edge cases', () => {\r\n\t\tconst custom = () => {}\r\n\t\trenameLegacyProperties({\r\n\t\t\tcustom\r\n\t\t}).should.deep.equal({\r\n\t\t\tcustom\r\n\t\t})\r\n\t})\r\n})"],"mappings":"AAAA,OAAOA,sBAAsB,MAAM,6BAA6B;AAEhEC,QAAQ,CAAC,8BAA8B,EAAE,YAAM;EAC9CC,EAAE,CAAC,iCAAiC,EAAE,YAAM;IAC3CF,sBAAsB,CAAC;MACtBG,KAAK,EAAE,CAAC;QACPC,IAAI,EAAE,KAAK;QACXC,OAAO,EAAE;UACRC,IAAI,EAAE,CAAC;UACP,WAAS;QACV;MACD,CAAC,CAAC;MACFC,MAAM,EAAE;IACT,CAAC,CAAC,CAACC,MAAM,CAACC,IAAI,CAACC,KAAK,CAAC;MACpBC,SAAS,EAAE,CAAC;QACXP,IAAI,EAAE,KAAK;QACXQ,SAAS,EAAE,CAAC;QACZC,kBAAkB,EAAE;MACrB,CAAC,CAAC;MACFC,OAAO,EAAE;IACV,CAAC,CAAC;EACH,CAAC,CAAC;EAEFZ,EAAE,CAAC,yBAAyB,EAAE,YAAM;IACnC,IAAMa,MAAM,GAAG,SAATA,MAAMA,CAAA,EAAS,CAAC,CAAC;IACvBf,sBAAsB,CAAC;MACtBe,MAAM,EAANA;IACD,CAAC,CAAC,CAACP,MAAM,CAACC,IAAI,CAACC,KAAK,CAAC;MACpBK,MAAM,EAANA;IACD,CAAC,CAAC;EACH,CAAC,CAAC;AACH,CAAC,CAAC","ignoreList":[]}
@@ -1,4 +1,6 @@
1
- import round from '../steps/round.js'; // just now
1
+ import round from '../steps/round.js';
2
+
3
+ // just now
2
4
  // 1 second ago
3
5
  // 2 seconds ago
4
6
  // …
@@ -31,7 +33,6 @@ import round from '../steps/round.js'; // just now
31
33
  // 2 years ago
32
34
  // …
33
35
  //
34
-
35
36
  export default {
36
37
  steps: round,
37
38
  labels: 'long'
@@ -1 +1 @@
1
- {"version":3,"file":"round.js","names":["round","steps","labels"],"sources":["../../source/style/round.js"],"sourcesContent":["import round from '../steps/round.js'\r\n\r\n// just now\r\n// 1 second ago\r\n// 2 seconds ago\r\n// …\r\n// 59 seconds ago\r\n// 1 minute ago\r\n// 2 minutes ago\r\n// …\r\n// 59 minutes ago\r\n// 1 minute ago\r\n// 2 minutes ago\r\n// …\r\n// 59 minutes ago\r\n// 1 hour ago\r\n// 2 hours ago\r\n// …\r\n// 24 hours ago\r\n// 1 day ago\r\n// 2 days ago\r\n// …\r\n// 6 days ago\r\n// 1 week ago\r\n// 2 weeks ago\r\n// 3 weeks ago\r\n// 4 weeks ago\r\n// 1 month ago\r\n// 2 months ago\r\n// …\r\n// 11 months ago\r\n// 1 year ago\r\n// 2 years ago\r\n// …\r\n//\r\nexport default {\r\n\tsteps: round,\r\n\tlabels: 'long'\r\n}"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,mBAAlB,C,CAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,eAAe;EACdC,KAAK,EAAED,KADO;EAEdE,MAAM,EAAE;AAFM,CAAf"}
1
+ {"version":3,"file":"round.js","names":["round","steps","labels"],"sources":["../../source/style/round.js"],"sourcesContent":["import round from '../steps/round.js'\r\n\r\n// just now\r\n// 1 second ago\r\n// 2 seconds ago\r\n// …\r\n// 59 seconds ago\r\n// 1 minute ago\r\n// 2 minutes ago\r\n// …\r\n// 59 minutes ago\r\n// 1 minute ago\r\n// 2 minutes ago\r\n// …\r\n// 59 minutes ago\r\n// 1 hour ago\r\n// 2 hours ago\r\n// …\r\n// 24 hours ago\r\n// 1 day ago\r\n// 2 days ago\r\n// …\r\n// 6 days ago\r\n// 1 week ago\r\n// 2 weeks ago\r\n// 3 weeks ago\r\n// 4 weeks ago\r\n// 1 month ago\r\n// 2 months ago\r\n// …\r\n// 11 months ago\r\n// 1 year ago\r\n// 2 years ago\r\n// …\r\n//\r\nexport default {\r\n\tsteps: round,\r\n\tlabels: 'long'\r\n}"],"mappings":"AAAA,OAAOA,KAAK,MAAM,mBAAmB;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;EACdC,KAAK,EAAED,KAAK;EACZE,MAAM,EAAE;AACT,CAAC","ignoreList":[]}