piece of strapi integration

This commit is contained in:
tmshv committed 2021-02-13 19:01:34 +03:00
1 parent 00197d4f9a
commit 91982b8c99
7 files changed
+252 -16

No files matched your search

+11
View File
@@ -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
}