| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,6 @@ | |||
| 1 | 1 | --- | |
| 2 | 2 | category: Time | |
| 3 | + utils: formatTimeAgo | ||
| 3 | 4 | --- | |
| 4 | 5 | ||
| 5 | 6 | # useTimeAgo | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,6 @@ | |||
| 1 | 1 | --- | |
| 2 | 2 | category: Time | |
| 3 | + utils: formatTimeAgoIntl | ||
| 3 | 4 | --- | |
| 4 | 5 | ||
| 5 | 6 | # useTimeAgoIntl | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -94,6 +94,9 @@ export async function readMetadata() { | |||
| 94 | 94 | let variants = frontmatter.variants | |
| 95 | 95 | if (typeof variants === 'string') | |
| 96 | 96 | variants = variants.split(',').map(s => s.trim()).filter(Boolean) | |
| 97 | + let utils = frontmatter.utils | ||
| 98 | + if (typeof utils === 'string') | ||
| 99 | + utils = utils.split(',').map(s => s.trim()).filter(Boolean) | ||
| 97 | 100 | let related = frontmatter.related | |
| 98 | 101 | if (typeof related === 'string') | |
| 99 | 102 | related = related.split(',').map(s => s.trim()).filter(Boolean) | |
@@ -126,6 +129,8 @@ export async function readMetadata() { | |||
| 126 | 129 | fn.alias = alias | |
| 127 | 130 | if (variants?.length) | |
| 128 | 131 | fn.variants = variants | |
| 132 | + if (utils?.length) | ||
| 133 | + fn.utils = utils | ||
| 129 | 134 | ||
| 130 | 135 | if (related?.length) | |
| 131 | 136 | fn.related = related | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -34,6 +34,7 @@ export interface VueUseFunction { | |||
| 34 | 34 | alias?: string[] | |
| 35 | 35 | related?: string[] | |
| 36 | 36 | variants?: string[] | |
| 37 | + utils?: string[] | ||
| 37 | 38 | } | |
| 38 | 39 | ||
| 39 | 40 | export interface VueUsePackage extends PackageManifest { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -141,7 +141,7 @@ export default defineNuxtModule<VueUseNuxtOptions>({ | |||
| 141 | 141 | && !disabledFunctions.includes(i.name), | |
| 142 | 142 | ) | |
| 143 | 143 | .flatMap((i): Import[] => { | |
| 144 | - const names = [i.name, ...i.alias || [], ...i.variants || []] | ||
| 144 | + const names = [i.name, ...i.alias || [], ...i.variants || [], ...i.utils || []] | ||
| 145 | 145 | return names.map(n => ({ | |
| 146 | 146 | from: `@vueuse/${i.importPath || i.package}`, | |
| 147 | 147 | name: n, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -58,6 +58,7 @@ export interface VueUseFunction { | |||
| 58 | 58 | alias?: string[]; | |
| 59 | 59 | related?: string[]; | |
| 60 | 60 | variants?: string[]; | |
| 61 | + utils?: string[]; | ||
| 61 | 62 | } | |
| 62 | 63 | export interface VueUsePackage extends PackageManifest { | |
| 63 | 64 | dir: string; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments