Function
useArrayJoin
(
list: MaybeRefOrGetter<MaybeRefOrGetter<any>[]>,
separator?: MaybeRefOrGetter<string>,
)
Source from the content-addressed store, hash-verified
| 11 | * @returns a string with all array elements joined. If arr.length is 0, the empty string is returned. |
| 12 | */ |
| 13 | export function useArrayJoin( |
| 14 | list: MaybeRefOrGetter<MaybeRefOrGetter<any>[]>, |
| 15 | separator?: MaybeRefOrGetter<string>, |
| 16 | ): ComputedRef<string> { |
| 17 | return computed(() => toValue(list).map(i => toValue(i)).join(toValue(separator))) |
| 18 | } |
Tested by
no test coverage detected