📄 useArrayMap¶
📊 Analysis Summary¶
| Metric | Count |
|---|---|
| 🔧 Functions | 1 |
| 📦 Imports | 4 |
| 🟢 Vue Composition API | 1 |
| 📑 Type Aliases | 1 |
📚 Table of Contents¶
🛠️ File Location:¶
📂 packages/shared/useArrayMap/index.ts
📦 Imports¶
| Name | Source |
|---|---|
ComputedRef |
vue |
MaybeRefOrGetter |
vue |
computed |
vue |
toValue |
vue |
Vue Composition API¶
| Name | Type | Reactive Variables | Composables |
|---|---|---|---|
computed |
computed | none | none |
Functions¶
useArrayMap(list: MaybeRefOrGetter<MaybeRefOrGetter<T>[]>, fn: (element: T, index: number, array: T[])…): UseArrayMapReturn<U>¶
Reactive Array.map
Parameters:
listany: the array was called upon.fnany: a function that is called for every element of the givenlist. Each timefnexecutes, the returned value is added to the new array.
Returns: undefined
a new array with each element being the result of the callback function.
See: https://vueuse.org/useArrayMap
Tags: @__NO_SIDE_EFFECTS__
Raw JSDoc
/**
* Reactive `Array.map`
*
* @see https://vueuse.org/useArrayMap
* @param list - the array was called upon.
* @param fn - a function that is called for every element of the given `list`. Each time `fn` executes, the returned value is added to the new array.
*
* @returns a new array with each element being the result of the callback function.
*
* @__NO_SIDE_EFFECTS__
*/
Calls:
computed (from vue)toValue(list).map(i => toValue(i)).map
Code
Type Aliases¶
UseArrayMapReturn<T = any>¶
Generated by Syntax Scribe