📄 useArrayReduce¶
📊 Analysis Summary¶
| Metric | Count |
|---|---|
| 🔧 Functions | 2 |
| 📦 Imports | 4 |
| 🟢 Vue Composition API | 1 |
| 📑 Type Aliases | 2 |
📚 Table of Contents¶
🛠️ File Location:¶
📂 packages/shared/useArrayReduce/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¶
useArrayReduce(list: MaybeRefOrGetter<MaybeRefOrGetter<T>[]>, reducer: UseArrayReducer<T, T, T>): UseArrayReduceReturn<T>¶
Reactive Array.reduce
Parameters:
listany: the array was called upon.reducerany: a "reducer" function.
Returns: undefined
the value that results from running the "reducer" callback function to completion over the entire array.
See: https://vueuse.org/useArrayReduce
Tags: @__NO_SIDE_EFFECTS__
Raw JSDoc
/**
* Reactive `Array.reduce`
*
* @see https://vueuse.org/useArrayReduce
* @param list - the array was called upon.
* @param reducer - a "reducer" function.
*
* @returns the value that results from running the "reducer" callback function to completion over the entire array.
*
* @__NO_SIDE_EFFECTS__
*/
Code
Internal helpers¶
Declared inside another function in this file.
reduceCallback(sum: any, value: any, index: number): any¶
Parameters:
sumanyvalueanyindexnumber
Returns: any
Calls:
reducer
Type Aliases¶
UseArrayReducer<PV, CV, R>¶
UseArrayReduceReturn<T = any>¶
Generated by Syntax Scribe