Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(formatTimeAgo): typo foramtTimeAgo -> formatTimeAgo (#2568)
  • Loading branch information
QGIsK committed Dec 23, 2022
1 parent 4dea4be commit bb0fd59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/useTimeAgo/index.ts
Expand Up @@ -138,7 +138,7 @@ export function useTimeAgo<UnitNames extends string = UseTimeAgoUnitNamesDefault
} = options

const { now, ...controls } = useNow({ interval: updateInterval, controls: true })
const timeAgo = computed(() => foramtTimeAgo(new Date(resolveUnref(time)), options, unref(now.value)))
const timeAgo = computed(() => formatTimeAgo(new Date(resolveUnref(time)), options, unref(now.value)))

if (exposeControls) {
return {
Expand All @@ -151,7 +151,7 @@ export function useTimeAgo<UnitNames extends string = UseTimeAgoUnitNamesDefault
}
}

export function foramtTimeAgo<UnitNames extends string = UseTimeAgoUnitNamesDefault>(from: Date, options: FormatTimeAgoOptions<UnitNames> = {}, now: Date | number = Date.now()): string {
export function formatTimeAgo<UnitNames extends string = UseTimeAgoUnitNamesDefault>(from: Date, options: FormatTimeAgoOptions<UnitNames> = {}, now: Date | number = Date.now()): string {
const {
max,
messages = DEFAULT_MESSAGES as UseTimeAgoMessages<UnitNames>,
Expand Down

0 comments on commit bb0fd59

Please sign in to comment.