piece of strapi integration
This commit is contained in:
1 parent
00197d4f9a
commit
91982b8c99
7 files changed
+252
-16
No files matched your search
@@ -0,0 +1,11 @@
|
||||
export function asArray<T>(value: T | T[]) {
|
||||
return Array.isArray(value)
|
||||
? value
|
||||
: [value]
|
||||
}
|
||||
|
||||
export function asItem<T>(value: T | T[]) {
|
||||
return Array.isArray(value)
|
||||
? value[0]
|
||||
: value
|
||||
}
|
||||
Reference in new issue
Block a user