javascript-time-ago 2.5.10 → 2.5.12

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 (439) hide show
  1. package/bundle/javascript-time-ago.js +1 -1
  2. package/bundle/javascript-time-ago.js.map +1 -1
  3. package/bundle/javascript-time-ago.min.js +1 -1
  4. package/bundle/javascript-time-ago.min.js.map +1 -1
  5. package/commonjs/LocaleDataStore.js +2 -5
  6. package/commonjs/LocaleDataStore.js.map +1 -1
  7. package/commonjs/PropTypes.js +12 -12
  8. package/commonjs/PropTypes.js.map +1 -1
  9. package/commonjs/TimeAgo.js +135 -190
  10. package/commonjs/TimeAgo.js.map +1 -1
  11. package/commonjs/TimeAgo.test.js +124 -130
  12. package/commonjs/TimeAgo.test.js.map +1 -1
  13. package/commonjs/cache.js +7 -25
  14. package/commonjs/cache.js.map +1 -1
  15. package/commonjs/cache.test.js +1 -3
  16. package/commonjs/cache.test.js.map +1 -1
  17. package/commonjs/isStyleObject.js +9 -9
  18. package/commonjs/isStyleObject.js.map +1 -1
  19. package/commonjs/isStyleObject.test.js +1 -3
  20. package/commonjs/isStyleObject.test.js.map +1 -1
  21. package/commonjs/locale.js +6 -19
  22. package/commonjs/locale.js.map +1 -1
  23. package/commonjs/locale.test.js +2 -11
  24. package/commonjs/locale.test.js.map +1 -1
  25. package/commonjs/round.js +2 -5
  26. package/commonjs/round.js.map +1 -1
  27. package/commonjs/steps/approximate.js +1 -4
  28. package/commonjs/steps/approximate.js.map +1 -1
  29. package/commonjs/steps/approximate.test.js +1 -6
  30. package/commonjs/steps/approximate.test.js.map +1 -1
  31. package/commonjs/steps/getStep.js +36 -53
  32. package/commonjs/steps/getStep.js.map +1 -1
  33. package/commonjs/steps/getStep.test.js +7 -7
  34. package/commonjs/steps/getStep.test.js.map +1 -1
  35. package/commonjs/steps/getStepDenominator.js +2 -5
  36. package/commonjs/steps/getStepDenominator.js.map +1 -1
  37. package/commonjs/steps/getStepDenominator.test.js +1 -3
  38. package/commonjs/steps/getStepDenominator.test.js.map +1 -1
  39. package/commonjs/steps/getStepMinTime.js +17 -32
  40. package/commonjs/steps/getStepMinTime.js.map +1 -1
  41. package/commonjs/steps/getStepMinTime.test.js +1 -3
  42. package/commonjs/steps/getStepMinTime.test.js.map +1 -1
  43. package/commonjs/steps/getTimeToNextUpdate.js +19 -41
  44. package/commonjs/steps/getTimeToNextUpdate.js.map +1 -1
  45. package/commonjs/steps/getTimeToNextUpdate.test.js +29 -25
  46. package/commonjs/steps/getTimeToNextUpdate.test.js.map +1 -1
  47. package/commonjs/steps/getTimeToNextUpdateForUnit.js +3 -12
  48. package/commonjs/steps/getTimeToNextUpdateForUnit.js.map +1 -1
  49. package/commonjs/steps/getTimeToNextUpdateForUnit.test.js +1 -7
  50. package/commonjs/steps/getTimeToNextUpdateForUnit.test.js.map +1 -1
  51. package/commonjs/steps/helpers.js +1 -2
  52. package/commonjs/steps/helpers.js.map +1 -1
  53. package/commonjs/steps/helpers.test.js +0 -1
  54. package/commonjs/steps/helpers.test.js.map +1 -1
  55. package/commonjs/steps/index.js +1 -6
  56. package/commonjs/steps/index.js.map +1 -1
  57. package/commonjs/steps/renameLegacyProperties.js +6 -14
  58. package/commonjs/steps/renameLegacyProperties.js.map +1 -1
  59. package/commonjs/steps/renameLegacyProperties.test.js +1 -3
  60. package/commonjs/steps/renameLegacyProperties.test.js.map +1 -1
  61. package/commonjs/steps/round.js +1 -2
  62. package/commonjs/steps/round.js.map +1 -1
  63. package/commonjs/steps/round.test.js +1 -7
  64. package/commonjs/steps/round.test.js.map +1 -1
  65. package/commonjs/steps/units.js +10 -21
  66. package/commonjs/steps/units.js.map +1 -1
  67. package/commonjs/style/approximate.js +2 -6
  68. package/commonjs/style/approximate.js.map +1 -1
  69. package/commonjs/style/approximateTime.js +2 -6
  70. package/commonjs/style/approximateTime.js.map +1 -1
  71. package/commonjs/style/approximateTime.test.js +116 -75
  72. package/commonjs/style/approximateTime.test.js.map +1 -1
  73. package/commonjs/style/getStyleByName.js +3 -29
  74. package/commonjs/style/getStyleByName.js.map +1 -1
  75. package/commonjs/style/mini.js +9 -6
  76. package/commonjs/style/mini.js.map +1 -1
  77. package/commonjs/style/mini.test.js +15 -25
  78. package/commonjs/style/mini.test.js.map +1 -1
  79. package/commonjs/style/miniMinute.js +8 -13
  80. package/commonjs/style/miniMinute.js.map +1 -1
  81. package/commonjs/style/miniMinute.test.js +11 -17
  82. package/commonjs/style/miniMinute.test.js.map +1 -1
  83. package/commonjs/style/miniMinuteNow.js +8 -13
  84. package/commonjs/style/miniMinuteNow.js.map +1 -1
  85. package/commonjs/style/miniMinuteNow.test.js +11 -17
  86. package/commonjs/style/miniMinuteNow.test.js.map +1 -1
  87. package/commonjs/style/miniNow.js +8 -13
  88. package/commonjs/style/miniNow.js.map +1 -1
  89. package/commonjs/style/miniNow.test.js +11 -17
  90. package/commonjs/style/miniNow.test.js.map +1 -1
  91. package/commonjs/style/renameLegacyProperties.js +7 -13
  92. package/commonjs/style/renameLegacyProperties.js.map +1 -1
  93. package/commonjs/style/renameLegacyProperties.test.js +1 -4
  94. package/commonjs/style/renameLegacyProperties.test.js.map +1 -1
  95. package/commonjs/style/round.js +2 -6
  96. package/commonjs/style/round.js.map +1 -1
  97. package/commonjs/style/round.test.js +51 -67
  98. package/commonjs/style/round.test.js.map +1 -1
  99. package/commonjs/style/roundMinute.js +8 -13
  100. package/commonjs/style/roundMinute.js.map +1 -1
  101. package/commonjs/style/roundMinute.test.js +20 -27
  102. package/commonjs/style/roundMinute.test.js.map +1 -1
  103. package/commonjs/style/twitter.js +34 -38
  104. package/commonjs/style/twitter.js.map +1 -1
  105. package/commonjs/style/twitter.test.js +49 -55
  106. package/commonjs/style/twitter.test.js.map +1 -1
  107. package/commonjs/style/twitterFirstMinute.js +10 -15
  108. package/commonjs/style/twitterFirstMinute.js.map +1 -1
  109. package/commonjs/style/twitterFirstMinute.test.js +16 -23
  110. package/commonjs/style/twitterFirstMinute.test.js.map +1 -1
  111. package/commonjs/style/twitterMinute.js +8 -13
  112. package/commonjs/style/twitterMinute.js.map +1 -1
  113. package/commonjs/style/twitterMinute.test.js +20 -25
  114. package/commonjs/style/twitterMinute.test.js.map +1 -1
  115. package/commonjs/style/twitterMinuteNow.js +8 -13
  116. package/commonjs/style/twitterMinuteNow.js.map +1 -1
  117. package/commonjs/style/twitterMinuteNow.test.js +20 -25
  118. package/commonjs/style/twitterMinuteNow.test.js.map +1 -1
  119. package/commonjs/style/twitterNow.js +8 -13
  120. package/commonjs/style/twitterNow.js.map +1 -1
  121. package/commonjs/style/twitterNow.test.js +18 -24
  122. package/commonjs/style/twitterNow.test.js.map +1 -1
  123. package/load-all-locales/index.cjs +32 -0
  124. package/load-all-locales/index.cjs.js +32 -0
  125. package/load-all-locales/index.js +64 -0
  126. package/locale/ak/package.json +16 -0
  127. package/locale/ak.json +267 -0
  128. package/locale/ak.json.d.ts +4 -0
  129. package/locale/ak.json.js +267 -0
  130. package/locale/bal-Latn/package.json +16 -0
  131. package/locale/bal-Latn.json +240 -0
  132. package/locale/bal-Latn.json.d.ts +4 -0
  133. package/locale/bal-Latn.json.js +240 -0
  134. package/locale/be-tarask/package.json +16 -0
  135. package/locale/be-tarask.json +259 -0
  136. package/locale/be-tarask.json.d.ts +4 -0
  137. package/locale/be-tarask.json.js +259 -0
  138. package/locale/blo/package.json +16 -0
  139. package/locale/blo.json +159 -0
  140. package/locale/blo.json.d.ts +4 -0
  141. package/locale/blo.json.js +159 -0
  142. package/locale/bn.json +5 -2
  143. package/locale/bn.json.js +5 -2
  144. package/locale/bs.json +8 -2
  145. package/locale/bs.json.js +8 -2
  146. package/locale/ccp.json +2 -8
  147. package/locale/ccp.json.js +2 -8
  148. package/locale/csw/package.json +16 -0
  149. package/locale/csw.json +180 -0
  150. package/locale/csw.json.d.ts +4 -0
  151. package/locale/csw.json.js +180 -0
  152. package/locale/cy.json +6 -12
  153. package/locale/cy.json.js +6 -12
  154. package/locale/doi/package.json +16 -0
  155. package/locale/doi.json +159 -0
  156. package/locale/doi.json.d.ts +4 -0
  157. package/locale/doi.json.js +159 -0
  158. package/locale/en-AU.json +12 -12
  159. package/locale/en-AU.json.js +12 -12
  160. package/locale/en-CZ/package.json +16 -0
  161. package/locale/en-CZ.json +219 -0
  162. package/locale/en-CZ.json.d.ts +4 -0
  163. package/locale/en-CZ.json.js +219 -0
  164. package/locale/en-ES/package.json +16 -0
  165. package/locale/en-ES.json +219 -0
  166. package/locale/en-ES.json.d.ts +4 -0
  167. package/locale/en-ES.json.js +219 -0
  168. package/locale/en-FR/package.json +16 -0
  169. package/locale/en-FR.json +219 -0
  170. package/locale/en-FR.json.d.ts +4 -0
  171. package/locale/en-FR.json.js +219 -0
  172. package/locale/en-GS/package.json +16 -0
  173. package/locale/en-GS.json +219 -0
  174. package/locale/en-GS.json.d.ts +4 -0
  175. package/locale/en-GS.json.js +219 -0
  176. package/locale/en-HU/package.json +16 -0
  177. package/locale/en-HU.json +219 -0
  178. package/locale/en-HU.json.d.ts +4 -0
  179. package/locale/en-HU.json.js +219 -0
  180. package/locale/en-ID/package.json +16 -0
  181. package/locale/en-ID.json +219 -0
  182. package/locale/en-ID.json.d.ts +4 -0
  183. package/locale/en-ID.json.js +219 -0
  184. package/locale/en-IT/package.json +16 -0
  185. package/locale/en-IT.json +219 -0
  186. package/locale/en-IT.json.d.ts +4 -0
  187. package/locale/en-IT.json.js +219 -0
  188. package/locale/en-NO/package.json +16 -0
  189. package/locale/en-NO.json +219 -0
  190. package/locale/en-NO.json.d.ts +4 -0
  191. package/locale/en-NO.json.js +219 -0
  192. package/locale/en-PL/package.json +16 -0
  193. package/locale/en-PL.json +219 -0
  194. package/locale/en-PL.json.d.ts +4 -0
  195. package/locale/en-PL.json.js +219 -0
  196. package/locale/en-PT/package.json +16 -0
  197. package/locale/en-PT.json +219 -0
  198. package/locale/en-PT.json.d.ts +4 -0
  199. package/locale/en-PT.json.js +219 -0
  200. package/locale/en-RO/package.json +16 -0
  201. package/locale/en-RO.json +219 -0
  202. package/locale/en-RO.json.d.ts +4 -0
  203. package/locale/en-RO.json.js +219 -0
  204. package/locale/en-SK/package.json +16 -0
  205. package/locale/en-SK.json +219 -0
  206. package/locale/en-SK.json.d.ts +4 -0
  207. package/locale/en-SK.json.js +219 -0
  208. package/locale/es-MX.json +12 -9
  209. package/locale/es-MX.json.js +12 -9
  210. package/locale/es-SV.json +2 -2
  211. package/locale/es-SV.json.js +2 -2
  212. package/locale/eu.json +24 -24
  213. package/locale/eu.json.js +24 -24
  214. package/locale/ha.json +119 -65
  215. package/locale/ha.json.js +119 -65
  216. package/locale/he.json +0 -6
  217. package/locale/he.json.js +0 -6
  218. package/locale/hi-Latn.json +2 -2
  219. package/locale/hi-Latn.json.js +2 -2
  220. package/locale/ht/package.json +16 -0
  221. package/locale/ht.json +207 -0
  222. package/locale/ht.json.d.ts +4 -0
  223. package/locale/ht.json.js +207 -0
  224. package/locale/id.json +1 -1
  225. package/locale/id.json.js +1 -1
  226. package/locale/ie/package.json +16 -0
  227. package/locale/ie.json +159 -0
  228. package/locale/ie.json.d.ts +4 -0
  229. package/locale/ie.json.js +159 -0
  230. package/locale/ig.json +17 -17
  231. package/locale/ig.json.js +17 -17
  232. package/locale/ii/package.json +16 -0
  233. package/locale/ii.json +165 -0
  234. package/locale/ii.json.d.ts +4 -0
  235. package/locale/ii.json.js +165 -0
  236. package/locale/is.json +4 -1
  237. package/locale/is.json.js +4 -1
  238. package/locale/kaa/package.json +16 -0
  239. package/locale/kaa.json +159 -0
  240. package/locale/kaa.json.d.ts +4 -0
  241. package/locale/kaa.json.js +159 -0
  242. package/locale/kok-Latn/package.json +16 -0
  243. package/locale/kok-Latn.json +159 -0
  244. package/locale/kok-Latn.json.d.ts +4 -0
  245. package/locale/kok-Latn.json.js +159 -0
  246. package/locale/kok.json +8 -8
  247. package/locale/kok.json.js +8 -8
  248. package/locale/ks.json +9 -9
  249. package/locale/ks.json.js +9 -9
  250. package/locale/ku.json +55 -46
  251. package/locale/ku.json.js +55 -46
  252. package/locale/lld/package.json +16 -0
  253. package/locale/lld.json +291 -0
  254. package/locale/lld.json.d.ts +4 -0
  255. package/locale/lld.json.js +291 -0
  256. package/locale/mi.json +22 -22
  257. package/locale/mi.json.js +22 -22
  258. package/locale/ms-Arab/package.json +16 -0
  259. package/locale/ms-Arab.json +159 -0
  260. package/locale/ms-Arab.json.d.ts +4 -0
  261. package/locale/ms-Arab.json.js +159 -0
  262. package/locale/nb.json +2 -2
  263. package/locale/nb.json.js +2 -2
  264. package/locale/ne.json +1 -1
  265. package/locale/ne.json.js +1 -1
  266. package/locale/nn.json +4 -4
  267. package/locale/nn.json.js +4 -4
  268. package/locale/no.json +2 -2
  269. package/locale/no.json.js +2 -2
  270. package/locale/nqo/package.json +16 -0
  271. package/locale/nqo.json +159 -0
  272. package/locale/nqo.json.d.ts +4 -0
  273. package/locale/nqo.json.js +159 -0
  274. package/locale/om/package.json +16 -0
  275. package/locale/om.json +213 -0
  276. package/locale/om.json.d.ts +4 -0
  277. package/locale/om.json.js +213 -0
  278. package/locale/or.json +1 -1
  279. package/locale/or.json.js +1 -1
  280. package/locale/pl.json +59 -0
  281. package/locale/pl.json.js +59 -0
  282. package/locale/qu.json +46 -46
  283. package/locale/qu.json.js +46 -46
  284. package/locale/rhg/package.json +16 -0
  285. package/locale/rhg.json +159 -0
  286. package/locale/rhg.json.d.ts +4 -0
  287. package/locale/rhg.json.js +159 -0
  288. package/locale/sl.json +12 -12
  289. package/locale/sl.json.js +12 -12
  290. package/locale/sr-Cyrl-BA.json +2 -2
  291. package/locale/sr-Cyrl-BA.json.js +2 -2
  292. package/locale/sr-Latn-BA.json +2 -2
  293. package/locale/sr-Latn-BA.json.js +2 -2
  294. package/locale/sv.json +1 -1
  295. package/locale/sv.json.js +1 -1
  296. package/locale/syr/package.json +16 -0
  297. package/locale/syr.json +303 -0
  298. package/locale/syr.json.d.ts +4 -0
  299. package/locale/syr.json.js +303 -0
  300. package/locale/ti.json +6 -6
  301. package/locale/ti.json.js +6 -6
  302. package/locale/tn/package.json +16 -0
  303. package/locale/tn.json +159 -0
  304. package/locale/tn.json.d.ts +4 -0
  305. package/locale/tn.json.js +159 -0
  306. package/locale/to.json +26 -26
  307. package/locale/to.json.js +26 -26
  308. package/locale/uk.json +1 -1
  309. package/locale/uk.json.js +1 -1
  310. package/locale/ur-IN.json +9 -6
  311. package/locale/ur-IN.json.js +9 -6
  312. package/locale/vec/package.json +16 -0
  313. package/locale/vec.json +267 -0
  314. package/locale/vec.json.d.ts +4 -0
  315. package/locale/vec.json.js +267 -0
  316. package/locale/xnr/package.json +16 -0
  317. package/locale/xnr.json +159 -0
  318. package/locale/xnr.json.d.ts +4 -0
  319. package/locale/xnr.json.js +159 -0
  320. package/locale/yo-BJ.json +17 -17
  321. package/locale/yo-BJ.json.js +17 -17
  322. package/locale/yo.json +17 -17
  323. package/locale/yo.json.js +17 -17
  324. package/locale-more-styles/pl/long-time.json +30 -0
  325. package/locale-more-styles/pl/mini.json +9 -0
  326. package/locale-more-styles/pl/now.json +7 -0
  327. package/locale-more-styles/pl/short-time.json +12 -0
  328. package/modules/LocaleDataStore.js +2 -3
  329. package/modules/LocaleDataStore.js.map +1 -1
  330. package/modules/PropTypes.js +11 -7
  331. package/modules/PropTypes.js.map +1 -1
  332. package/modules/TimeAgo.js +135 -174
  333. package/modules/TimeAgo.js.map +1 -1
  334. package/modules/TimeAgo.test.js +126 -115
  335. package/modules/TimeAgo.test.js.map +1 -1
  336. package/modules/cache.js +6 -22
  337. package/modules/cache.js.map +1 -1
  338. package/modules/cache.test.js.map +1 -1
  339. package/modules/isStyleObject.js +9 -7
  340. package/modules/isStyleObject.js.map +1 -1
  341. package/modules/isStyleObject.test.js.map +1 -1
  342. package/modules/locale.js +6 -16
  343. package/modules/locale.js.map +1 -1
  344. package/modules/locale.test.js +0 -4
  345. package/modules/locale.test.js.map +1 -1
  346. package/modules/round.js +2 -3
  347. package/modules/round.js.map +1 -1
  348. package/modules/steps/approximate.js +6 -2
  349. package/modules/steps/approximate.js.map +1 -1
  350. package/modules/steps/approximate.test.js +0 -2
  351. package/modules/steps/approximate.test.js.map +1 -1
  352. package/modules/steps/getStep.js +36 -48
  353. package/modules/steps/getStep.js.map +1 -1
  354. package/modules/steps/getStep.test.js +6 -2
  355. package/modules/steps/getStep.test.js.map +1 -1
  356. package/modules/steps/getStepDenominator.js +2 -3
  357. package/modules/steps/getStepDenominator.js.map +1 -1
  358. package/modules/steps/getStepDenominator.test.js.map +1 -1
  359. package/modules/steps/getStepMinTime.js +17 -29
  360. package/modules/steps/getStepMinTime.js.map +1 -1
  361. package/modules/steps/getStepMinTime.test.js.map +1 -1
  362. package/modules/steps/getTimeToNextUpdate.js +19 -31
  363. package/modules/steps/getTimeToNextUpdate.js.map +1 -1
  364. package/modules/steps/getTimeToNextUpdate.test.js +27 -18
  365. package/modules/steps/getTimeToNextUpdate.test.js.map +1 -1
  366. package/modules/steps/getTimeToNextUpdateForUnit.js +4 -10
  367. package/modules/steps/getTimeToNextUpdateForUnit.js.map +1 -1
  368. package/modules/steps/getTimeToNextUpdateForUnit.test.js +0 -4
  369. package/modules/steps/getTimeToNextUpdateForUnit.test.js.map +1 -1
  370. package/modules/steps/helpers.js +1 -1
  371. package/modules/steps/helpers.js.map +1 -1
  372. package/modules/steps/helpers.test.js.map +1 -1
  373. package/modules/steps/index.js +2 -1
  374. package/modules/steps/index.js.map +1 -1
  375. package/modules/steps/renameLegacyProperties.js +6 -13
  376. package/modules/steps/renameLegacyProperties.js.map +1 -1
  377. package/modules/steps/renameLegacyProperties.test.js.map +1 -1
  378. package/modules/steps/round.js.map +1 -1
  379. package/modules/steps/round.test.js +0 -3
  380. package/modules/steps/round.test.js.map +1 -1
  381. package/modules/steps/units.js +5 -9
  382. package/modules/steps/units.js.map +1 -1
  383. package/modules/style/approximate.js +5 -1
  384. package/modules/style/approximate.js.map +1 -1
  385. package/modules/style/approximateTime.js +6 -2
  386. package/modules/style/approximateTime.js.map +1 -1
  387. package/modules/style/approximateTime.test.js +115 -70
  388. package/modules/style/approximateTime.test.js.map +1 -1
  389. package/modules/style/getStyleByName.js +4 -17
  390. package/modules/style/getStyleByName.js.map +1 -1
  391. package/modules/style/mini.js +8 -4
  392. package/modules/style/mini.js.map +1 -1
  393. package/modules/style/mini.test.js +14 -20
  394. package/modules/style/mini.test.js.map +1 -1
  395. package/modules/style/miniMinute.js +6 -6
  396. package/modules/style/miniMinute.js.map +1 -1
  397. package/modules/style/miniMinute.test.js +10 -12
  398. package/modules/style/miniMinute.test.js.map +1 -1
  399. package/modules/style/miniMinuteNow.js +6 -6
  400. package/modules/style/miniMinuteNow.js.map +1 -1
  401. package/modules/style/miniMinuteNow.test.js +10 -12
  402. package/modules/style/miniMinuteNow.test.js.map +1 -1
  403. package/modules/style/miniNow.js +6 -6
  404. package/modules/style/miniNow.js.map +1 -1
  405. package/modules/style/miniNow.test.js +10 -12
  406. package/modules/style/miniNow.test.js.map +1 -1
  407. package/modules/style/renameLegacyProperties.js +8 -10
  408. package/modules/style/renameLegacyProperties.js.map +1 -1
  409. package/modules/style/renameLegacyProperties.test.js +0 -1
  410. package/modules/style/renameLegacyProperties.test.js.map +1 -1
  411. package/modules/style/round.js +3 -2
  412. package/modules/style/round.js.map +1 -1
  413. package/modules/style/round.test.js +50 -62
  414. package/modules/style/round.test.js.map +1 -1
  415. package/modules/style/roundMinute.js +8 -7
  416. package/modules/style/roundMinute.js.map +1 -1
  417. package/modules/style/roundMinute.test.js +19 -22
  418. package/modules/style/roundMinute.test.js.map +1 -1
  419. package/modules/style/twitter.js +35 -32
  420. package/modules/style/twitter.js.map +1 -1
  421. package/modules/style/twitter.test.js +48 -50
  422. package/modules/style/twitter.test.js.map +1 -1
  423. package/modules/style/twitterFirstMinute.js +8 -7
  424. package/modules/style/twitterFirstMinute.js.map +1 -1
  425. package/modules/style/twitterFirstMinute.test.js +15 -18
  426. package/modules/style/twitterFirstMinute.test.js.map +1 -1
  427. package/modules/style/twitterMinute.js +6 -6
  428. package/modules/style/twitterMinute.js.map +1 -1
  429. package/modules/style/twitterMinute.test.js +19 -20
  430. package/modules/style/twitterMinute.test.js.map +1 -1
  431. package/modules/style/twitterMinuteNow.js +6 -6
  432. package/modules/style/twitterMinuteNow.js.map +1 -1
  433. package/modules/style/twitterMinuteNow.test.js +19 -20
  434. package/modules/style/twitterMinuteNow.test.js.map +1 -1
  435. package/modules/style/twitterNow.js +6 -6
  436. package/modules/style/twitterNow.js.map +1 -1
  437. package/modules/style/twitterNow.test.js +17 -19
  438. package/modules/style/twitterNow.test.js.map +1 -1
  439. package/package.json +261 -4
@@ -1,8 +1,10 @@
1
1
  import TimeAgo from './TimeAgo.js';
2
- import { getLocaleData } from './LocaleDataStore.js'; // Load locale specific relative date/time messages
2
+ import { getLocaleData } from './LocaleDataStore.js';
3
3
 
4
- import english from '../locale/en.json' assert { type: 'json' }; // Just so this function code is covered.
4
+ // Load locale specific relative date/time messages
5
+ import english from '../locale/en.json' assert { type: 'json' };
5
6
 
7
+ // Just so this function code is covered.
6
8
  TimeAgo.setDefaultLocale('en');
7
9
  describe("javascript-time-ago", function () {
8
10
  it('should default to "round-minute" style', function () {
@@ -40,8 +42,8 @@ describe("javascript-time-ago", function () {
40
42
  }, {
41
43
  future: true,
42
44
  now: 0
43
- }).should.equal('now'); // `flavour` is a legacy name of `labels` property.
44
-
45
+ }).should.equal('now');
46
+ // `flavour` is a legacy name of `labels` property.
45
47
  timeAgo.format(0, {
46
48
  flavour: 'mini'
47
49
  }, {
@@ -61,8 +63,8 @@ describe("javascript-time-ago", function () {
61
63
  }, {
62
64
  future: true,
63
65
  now: 0
64
- }).should.equal('in 0 minutes'); // `gradation` is a legacy name of `steps` property.
65
-
66
+ }).should.equal('in 0 minutes');
67
+ // `gradation` is a legacy name of `steps` property.
66
68
  timeAgo.format(0, {
67
69
  gradation: [{
68
70
  formatAs: 'minute'
@@ -135,16 +137,16 @@ describe("javascript-time-ago", function () {
135
137
  past: '{0} minute(s) ago',
136
138
  future: 'in {0} minute(s)'
137
139
  };
138
- TimeAgo.addLocale(english); // Past.
139
-
140
+ TimeAgo.addLocale(english);
141
+ // Past.
140
142
  timeAgo.format(Date.now() - 60 * 1000, {
141
143
  labels: 'long-time'
142
- }).should.equal('1 minute(s) ago'); // Future (covers an "else" branch).
143
-
144
+ }).should.equal('1 minute(s) ago');
145
+ // Future (covers an "else" branch).
144
146
  timeAgo.format(Date.now() + 60 * 1000, {
145
147
  labels: 'long-time'
146
- }).should.equal('in 1 minute(s)'); // Undo.
147
-
148
+ }).should.equal('in 1 minute(s)');
149
+ // Undo.
148
150
  english['long-time'].minute = englishLongTimeMinute;
149
151
  timeAgo.format(Date.now() - 60 * 1000, {
150
152
  labels: 'long-time'
@@ -157,43 +159,43 @@ describe("javascript-time-ago", function () {
157
159
  }).should.equal('in a moment');
158
160
  });
159
161
  it('should accept a string style name argument', function () {
160
- var timeAgo = new TimeAgo('en'); // "mini".
161
-
162
+ var timeAgo = new TimeAgo('en');
163
+ // "mini".
162
164
  timeAgo.format(Date.now() - 0 * 1000, 'mini').should.equal('0s');
163
- timeAgo.format(Date.now() - 1 * 1000, 'mini').should.equal('1s'); // "mini-now".
164
-
165
+ timeAgo.format(Date.now() - 1 * 1000, 'mini').should.equal('1s');
166
+ // "mini-now".
165
167
  timeAgo.format(Date.now() - 0 * 1000, 'mini-now').should.equal('now');
166
- timeAgo.format(Date.now() - 1 * 1000, 'mini-now').should.equal('1s'); // "mini-minute-now".
167
-
168
+ timeAgo.format(Date.now() - 1 * 1000, 'mini-now').should.equal('1s');
169
+ // "mini-minute-now".
168
170
  timeAgo.format(Date.now() - 29 * 1000, 'mini-minute-now').should.equal('now');
169
- timeAgo.format(Date.now() - 60 * 1000, 'mini-minute-now').should.equal('1m'); // "mini-minute".
170
-
171
+ timeAgo.format(Date.now() - 60 * 1000, 'mini-minute-now').should.equal('1m');
172
+ // "mini-minute".
171
173
  timeAgo.format(Date.now() - 29 * 1000, 'mini-minute').should.equal('0m');
172
- timeAgo.format(Date.now() - 60 * 1000, 'mini-minute').should.equal('1m'); // "twitter".
173
-
174
+ timeAgo.format(Date.now() - 60 * 1000, 'mini-minute').should.equal('1m');
175
+ // "twitter".
174
176
  timeAgo.format(Date.now() - 0 * 1000, 'twitter').should.equal('0s');
175
- timeAgo.format(Date.now() - 1 * 1000, 'twitter').should.equal('1s'); // "twitter-now".
176
-
177
+ timeAgo.format(Date.now() - 1 * 1000, 'twitter').should.equal('1s');
178
+ // "twitter-now".
177
179
  timeAgo.format(Date.now() - 0 * 1000, 'twitter-now').should.equal('now');
178
- timeAgo.format(Date.now() - 1 * 1000, 'twitter-now').should.equal('1s'); // "twitter-minute-now".
179
-
180
+ timeAgo.format(Date.now() - 1 * 1000, 'twitter-now').should.equal('1s');
181
+ // "twitter-minute-now".
180
182
  timeAgo.format(Date.now() - 29 * 1000, 'twitter-minute-now').should.equal('now');
181
- timeAgo.format(Date.now() - 60 * 1000, 'twitter-minute-now').should.equal('1m'); // "twitter-minute".
182
-
183
+ timeAgo.format(Date.now() - 60 * 1000, 'twitter-minute-now').should.equal('1m');
184
+ // "twitter-minute".
183
185
  timeAgo.format(Date.now() - 29 * 1000, 'twitter-minute').should.equal('0m');
184
- timeAgo.format(Date.now() - 60 * 1000, 'twitter-minute').should.equal('1m'); // "twitter-first-minute".
185
-
186
+ timeAgo.format(Date.now() - 60 * 1000, 'twitter-minute').should.equal('1m');
187
+ // "twitter-first-minute".
186
188
  timeAgo.format(Date.now() - 29 * 1000, 'twitter-first-minute').should.equal('');
187
- timeAgo.format(Date.now() - 60 * 1000, 'twitter-first-minute').should.equal('1m'); // "approximate".
188
-
189
- timeAgo.format(Date.now() - 45 * 1000, 'approximate').should.equal('just now'); // "convenient" style was renamed to "approximate".
190
-
189
+ timeAgo.format(Date.now() - 60 * 1000, 'twitter-first-minute').should.equal('1m');
190
+ // "approximate".
191
+ timeAgo.format(Date.now() - 45 * 1000, 'approximate').should.equal('just now');
192
+ // "convenient" style was renamed to "approximate".
191
193
  timeAgo.format(Date.now() - 45 * 1000, 'convenient').should.equal('just now');
192
- timeAgo.format(Date.now() - 45 * 1000, 'round').should.equal('45 seconds ago'); // "default" style was renamed to "round".
193
-
194
+ timeAgo.format(Date.now() - 45 * 1000, 'round').should.equal('45 seconds ago');
195
+ // "default" style was renamed to "round".
194
196
  timeAgo.format(Date.now() - 45 * 1000, 'default').should.equal('45 seconds ago');
195
- timeAgo.format(Date.now() - 29 * 1000, 'round-minute').should.equal('just now'); // "time" style was renamed to "approximate-time".
196
-
197
+ timeAgo.format(Date.now() - 29 * 1000, 'round-minute').should.equal('just now');
198
+ // "time" style was renamed to "approximate-time".
197
199
  timeAgo.format(Date.now() - 2 * 60 * 1000, 'time').should.equal('2 minutes');
198
200
  timeAgo.format(Date.now() - 2 * 60 * 1000, 'approximate-time').should.equal('2 minutes');
199
201
  timeAgo.format(Date.now(), 'exotic').should.equal('just now');
@@ -213,11 +215,9 @@ describe("javascript-time-ago", function () {
213
215
  });
214
216
  it('should not accept anything but Dates and timestamps', function () {
215
217
  var timeAgo = new TimeAgo('en');
216
-
217
218
  var thrower = function thrower() {
218
219
  return timeAgo.format('Jan 14, 2017');
219
220
  };
220
-
221
221
  thrower.should["throw"]('Unsupported relative time formatter input: string, Jan 14, 2017');
222
222
  });
223
223
  it('should return an empty string if the specified units are not available in locale data', function () {
@@ -227,24 +227,26 @@ describe("javascript-time-ago", function () {
227
227
  }).should.equal('');
228
228
  });
229
229
  it('should format for a style with "custom" function', function () {
230
- var timeAgo = new TimeAgo('en'); // `custom` returns a string
230
+ var timeAgo = new TimeAgo('en');
231
231
 
232
+ // `custom` returns a string
232
233
  timeAgo.format(Date.now(), {
233
234
  custom: function custom(_ref) {
234
235
  var now = _ref.now,
235
- time = _ref.time,
236
- date = _ref.date,
237
- locale = _ref.locale;
236
+ time = _ref.time,
237
+ date = _ref.date,
238
+ locale = _ref.locale;
238
239
  return locale;
239
240
  }
240
- }).should.equal('en'); // `custom` returns `undefined`
241
+ }).should.equal('en');
241
242
 
243
+ // `custom` returns `undefined`
242
244
  timeAgo.format(Date.now(), {
243
245
  custom: function custom(_ref2) {
244
246
  var now = _ref2.now,
245
- time = _ref2.time,
246
- date = _ref2.date,
247
- locale = _ref2.locale;
247
+ time = _ref2.time,
248
+ date = _ref2.date,
249
+ locale = _ref2.locale;
248
250
  return;
249
251
  }
250
252
  }).should.equal('just now');
@@ -258,7 +260,9 @@ describe("javascript-time-ago", function () {
258
260
  new TimeAgo('en').format(Date.now()).should.equal('just now');
259
261
  new TimeAgo('en').format(Date.now(), 'approximate', {
260
262
  future: true
261
- }).should.equal('in a moment'); // Non-"now" unit, "long" style.
263
+ }).should.equal('in a moment');
264
+
265
+ // Non-"now" unit, "long" style.
262
266
  // const style = {
263
267
  // gradation: [{
264
268
  // factor: 1,
@@ -268,8 +272,8 @@ describe("javascript-time-ago", function () {
268
272
  // }
269
273
  // new TimeAgo('en').format(Date.now(), style).should.equal('0 seconds ago')
270
274
  // new TimeAgo('en').format(Date.now(), style, { future: true }).should.equal('in 0 seconds')
271
- // Non-"now" unit, "mini" style.
272
275
 
276
+ // Non-"now" unit, "mini" style.
273
277
  var style2 = {
274
278
  style: [{
275
279
  unit: 'year'
@@ -329,8 +333,8 @@ describe("javascript-time-ago", function () {
329
333
  english['mini'].second = secondLabels;
330
334
  });
331
335
  it('should get time to next update (round: "floor")', function () {
332
- var timeAgo = new TimeAgo('en'); // in 1 second -> in 0 seconds.
333
-
336
+ var timeAgo = new TimeAgo('en');
337
+ // in 1 second -> in 0 seconds.
334
338
  timeAgo.format(1000, 'twitter', {
335
339
  getTimeToNextUpdate: true,
336
340
  now: 0,
@@ -338,62 +342,63 @@ describe("javascript-time-ago", function () {
338
342
  }).should.deep.equal(['1s', 1]);
339
343
  });
340
344
  it('should get time to next update (round: "round")', function () {
341
- var timeAgo = new TimeAgo('en'); // in 1 second -> in 0 seconds.
342
-
345
+ var timeAgo = new TimeAgo('en');
346
+ // in 1 second -> in 0 seconds.
343
347
  timeAgo.format(1000, 'twitter', {
344
348
  getTimeToNextUpdate: true,
345
349
  now: 0
346
350
  }).should.deep.equal(['1s', 501]);
347
351
  });
348
352
  it('should get time to next update ("mini-now" style) (round: "floor")', function () {
349
- var timeAgo = new TimeAgo('en'); // In 1 minute.
350
-
353
+ var timeAgo = new TimeAgo('en');
354
+ // In 1 minute.
351
355
  timeAgo.format(60 * 1000, 'mini-now', {
352
356
  getTimeToNextUpdate: true,
353
357
  now: 0,
354
358
  round: 'floor'
355
- }).should.deep.equal(['1m', 1]); // Almost in 1 minute.
356
-
359
+ }).should.deep.equal(['1m', 1]);
360
+ // Almost in 1 minute.
357
361
  timeAgo.format(60 * 1000, 'mini-now', {
358
362
  getTimeToNextUpdate: true,
359
363
  now: 1,
360
364
  round: 'floor'
361
- }).should.deep.equal(['59s', 1000]); // In 1 second.
362
-
365
+ }).should.deep.equal(['59s', 1000]);
366
+ // In 1 second.
363
367
  timeAgo.format(60 * 1000, 'mini-now', {
364
368
  getTimeToNextUpdate: true,
365
369
  now: 59 * 1000,
366
370
  round: 'floor'
367
- }).should.deep.equal(['1s', 1]); // Almost in 1 second.
368
-
371
+ }).should.deep.equal(['1s', 1]);
372
+ // Almost in 1 second.
369
373
  timeAgo.format(60 * 1000, 'mini-now', {
370
374
  getTimeToNextUpdate: true,
371
375
  now: 59 * 1000 + 1,
372
376
  round: 'floor'
373
- }).should.deep.equal(['now', // Right after zero point.
374
- 1000]); // Zero point (future to past).
377
+ }).should.deep.equal(['now',
378
+ // Right after zero point.
379
+ 1000]);
380
+ // Zero point (future to past).
375
381
  // `future: true`.
376
-
377
382
  timeAgo.format(60 * 1000, 'mini-now', {
378
383
  getTimeToNextUpdate: true,
379
384
  now: 60 * 1000,
380
385
  future: true,
381
386
  round: 'floor'
382
- }).should.deep.equal(['now', 1]); // Zero point (future to past).
387
+ }).should.deep.equal(['now', 1]);
388
+ // Zero point (future to past).
383
389
  // `future: false`.
384
-
385
390
  timeAgo.format(60 * 1000, 'mini-now', {
386
391
  getTimeToNextUpdate: true,
387
392
  now: 60 * 1000,
388
393
  round: 'floor'
389
- }).should.deep.equal(['now', 1000]); // Right after zero point (past).
390
-
394
+ }).should.deep.equal(['now', 1000]);
395
+ // Right after zero point (past).
391
396
  timeAgo.format(60 * 1000, 'mini-now', {
392
397
  getTimeToNextUpdate: true,
393
398
  now: 60 * 1000 + 1,
394
399
  round: 'floor'
395
- }).should.deep.equal(['now', 1000 - 1]); // 1 second ago.
396
-
400
+ }).should.deep.equal(['now', 1000 - 1]);
401
+ // 1 second ago.
397
402
  timeAgo.format(60 * 1000, 'mini-now', {
398
403
  getTimeToNextUpdate: true,
399
404
  now: 60 * 1000 + 1000,
@@ -401,57 +406,59 @@ describe("javascript-time-ago", function () {
401
406
  }).should.deep.equal(['1s', 1000]);
402
407
  });
403
408
  it('should get time to next update ("mini-now" style) (round: "round")', function () {
404
- var timeAgo = new TimeAgo('en'); // In 1 minute.
405
-
409
+ var timeAgo = new TimeAgo('en');
410
+ // In 1 minute.
406
411
  timeAgo.format(60 * 1000, 'mini-now', {
407
412
  getTimeToNextUpdate: true,
408
413
  now: 0
409
- }).should.deep.equal(['1m', 500 + 1]); // Almost in 1 minute.
410
-
414
+ }).should.deep.equal(['1m', 500 + 1]);
415
+ // Almost in 1 minute.
411
416
  timeAgo.format(60 * 1000, 'mini-now', {
412
417
  getTimeToNextUpdate: true,
413
418
  now: 500 + 1
414
- }).should.deep.equal(['59s', 1000]); // In 1 second.
415
-
419
+ }).should.deep.equal(['59s', 1000]);
420
+ // In 1 second.
416
421
  timeAgo.format(60 * 1000, 'mini-now', {
417
422
  getTimeToNextUpdate: true,
418
423
  now: 59.5 * 1000
419
- }).should.deep.equal(['1s', 1]); // Almost in 1 second.
420
-
424
+ }).should.deep.equal(['1s', 1]);
425
+ // Almost in 1 second.
421
426
  timeAgo.format(60 * 1000, 'mini-now', {
422
427
  getTimeToNextUpdate: true,
423
428
  now: 59.5 * 1000 + 1
424
- }).should.deep.equal(['now', // Right after zero point.
425
- 500]); // Zero point (future to past).
429
+ }).should.deep.equal(['now',
430
+ // Right after zero point.
431
+ 500]);
432
+ // Zero point (future to past).
426
433
  // `future: true`.
427
-
428
434
  timeAgo.format(60 * 1000, 'mini-now', {
429
435
  getTimeToNextUpdate: true,
430
436
  now: 60 * 1000,
431
437
  future: true
432
- }).should.deep.equal(['now', 1]); // Zero point (future to past).
438
+ }).should.deep.equal(['now', 1]);
439
+ // Zero point (future to past).
433
440
  // `future: false`.
434
-
435
441
  timeAgo.format(60 * 1000, 'mini-now', {
436
442
  getTimeToNextUpdate: true,
437
443
  now: 60 * 1000
438
- }).should.deep.equal(['now', 500]); // Right after zero point (past).
439
-
444
+ }).should.deep.equal(['now', 500]);
445
+ // Right after zero point (past).
440
446
  timeAgo.format(60 * 1000, 'mini-now', {
441
447
  getTimeToNextUpdate: true,
442
448
  now: 60 * 1000 + 1
443
- }).should.deep.equal(['now', 500 - 1]); // 1 second ago.
444
-
449
+ }).should.deep.equal(['now', 500 - 1]);
450
+ // 1 second ago.
445
451
  timeAgo.format(60 * 1000, 'mini-now', {
446
452
  getTimeToNextUpdate: true,
447
453
  now: 60 * 1000 + 500
448
454
  }).should.deep.equal(['1s', 1000]);
449
455
  });
450
456
  it('should get time to next update (first step has non-zero "minTime") (round: "floor")', function () {
451
- var timeAgo = new TimeAgo('en'); // Future.
457
+ var timeAgo = new TimeAgo('en');
458
+
459
+ // Future.
452
460
  // Inside the first step.
453
461
  // Updates soon.
454
-
455
462
  timeAgo.format(60 * 1000, {
456
463
  steps: [{
457
464
  formatAs: 'minute',
@@ -462,10 +469,11 @@ describe("javascript-time-ago", function () {
462
469
  }, {
463
470
  getTimeToNextUpdate: true,
464
471
  now: -0.5 * 1000
465
- }).should.deep.equal(['1m', 0.5 * 1000 + 1]); // Future.
472
+ }).should.deep.equal(['1m', 0.5 * 1000 + 1]);
473
+
474
+ // Future.
466
475
  // Outside of the first step.
467
476
  // Updates right after zero point.
468
-
469
477
  timeAgo.format(60 * 1000, {
470
478
  steps: [{
471
479
  formatAs: 'minute',
@@ -476,10 +484,11 @@ describe("javascript-time-ago", function () {
476
484
  }, {
477
485
  getTimeToNextUpdate: true,
478
486
  now: 1 * 1000
479
- }).should.deep.equal(['', 59 * 1000 + 1]); // Zero point.
487
+ }).should.deep.equal(['', 59 * 1000 + 1]);
488
+
489
+ // Zero point.
480
490
  // Outside of the first step.
481
491
  // Updates at the first step's `minTime`.
482
-
483
492
  timeAgo.format(60 * 1000, {
484
493
  steps: [{
485
494
  formatAs: 'minute',
@@ -490,10 +499,11 @@ describe("javascript-time-ago", function () {
490
499
  }, {
491
500
  getTimeToNextUpdate: true,
492
501
  now: 60 * 1000
493
- }).should.deep.equal(['', 60 * 1000]); // Past.
502
+ }).should.deep.equal(['', 60 * 1000]);
503
+
504
+ // Past.
494
505
  // Inside the first step.
495
506
  // Updates at the next minute.
496
-
497
507
  timeAgo.format(60 * 1000, {
498
508
  steps: [{
499
509
  formatAs: 'minute',
@@ -504,50 +514,51 @@ describe("javascript-time-ago", function () {
504
514
  }, {
505
515
  getTimeToNextUpdate: true,
506
516
  now: 60 * 1000 + 60 * 1000
507
- }).should.deep.equal(['1m', 60 * 1000]); // Almost in 1 minute.
517
+ }).should.deep.equal(['1m', 60 * 1000]);
508
518
 
519
+ // Almost in 1 minute.
509
520
  timeAgo.format(60 * 1000, 'mini-now', {
510
521
  getTimeToNextUpdate: true,
511
522
  now: 1,
512
523
  round: 'floor'
513
- }).should.deep.equal(['59s', 1000]); // In 1 second.
514
-
524
+ }).should.deep.equal(['59s', 1000]);
525
+ // In 1 second.
515
526
  timeAgo.format(60 * 1000, 'mini-now', {
516
527
  getTimeToNextUpdate: true,
517
528
  now: 59 * 1000,
518
529
  round: 'floor'
519
- }).should.deep.equal(['1s', 1]); // Almost in 1 second.
530
+ }).should.deep.equal(['1s', 1]);
531
+ // Almost in 1 second.
520
532
  // Updates right after the zero point.
521
-
522
533
  timeAgo.format(60 * 1000, 'mini-now', {
523
534
  getTimeToNextUpdate: true,
524
535
  now: 59 * 1000 + 1,
525
536
  round: 'floor'
526
- }).should.deep.equal(['now', 1000]); // Zero point (future to past).
537
+ }).should.deep.equal(['now', 1000]);
538
+ // Zero point (future to past).
527
539
  // `future: true`.
528
540
  // Updates right after zero point.
529
-
530
541
  timeAgo.format(60 * 1000, 'mini-now', {
531
542
  getTimeToNextUpdate: true,
532
543
  now: 60 * 1000,
533
544
  future: true,
534
545
  round: 'floor'
535
- }).should.deep.equal(['now', 1]); // Zero point (future to past).
546
+ }).should.deep.equal(['now', 1]);
547
+ // Zero point (future to past).
536
548
  // `future: false`.
537
549
  // Updates at the next second.
538
-
539
550
  timeAgo.format(60 * 1000, 'mini-now', {
540
551
  getTimeToNextUpdate: true,
541
552
  now: 60 * 1000,
542
553
  round: 'floor'
543
- }).should.deep.equal(['now', 1000]); // Right after zero point (past).
544
-
554
+ }).should.deep.equal(['now', 1000]);
555
+ // Right after zero point (past).
545
556
  timeAgo.format(60 * 1000, 'mini-now', {
546
557
  getTimeToNextUpdate: true,
547
558
  now: 60 * 1000 + 1,
548
559
  round: 'floor'
549
- }).should.deep.equal(['now', 1000 - 1]); // 1 second ago.
550
-
560
+ }).should.deep.equal(['now', 1000 - 1]);
561
+ // 1 second ago.
551
562
  timeAgo.format(60 * 1000, 'mini-now', {
552
563
  getTimeToNextUpdate: true,
553
564
  now: 60 * 1000 + 1000,
@@ -569,8 +580,8 @@ describe("javascript-time-ago", function () {
569
580
  it('should support `polyfill: false` option', function () {
570
581
  var timeAgo = new TimeAgo('en', {
571
582
  polyfill: false
572
- }); // Still uses "now" labels, even when not polyfilled.
573
-
583
+ });
584
+ // Still uses "now" labels, even when not polyfilled.
574
585
  timeAgo.format(0, 'round', {
575
586
  now: 0
576
587
  }).should.equal('just now');
@@ -622,12 +633,12 @@ describe("javascript-time-ago", function () {
622
633
  TimeAgo.addDefaultLocale({
623
634
  locale: 'el'
624
635
  });
625
- TimeAgo.getDefaultLocale().should.equal('el'); // expect(() => {
626
-
636
+ TimeAgo.getDefaultLocale().should.equal('el');
637
+ // expect(() => {
627
638
  TimeAgo.addDefaultLocale({
628
639
  locale: 'el'
629
- }); // }).to.throw('`TimeAgo.addDefaultLocale()` can only be called once')
630
-
640
+ });
641
+ // }).to.throw('`TimeAgo.addDefaultLocale()` can only be called once')
631
642
  TimeAgo.setDefaultLocale('en');
632
643
  });
633
644
  it('should support "floor" rounding', function () {