format: apply repo prettier (3.8.1) to the folded skills tree
963 markdown files reformatted with the repository's pinned prettier so pnpm format:check covers the folded tree like every other repo file. The formatter's embedded-language pass also normalized code fences (TS semicolons, closed HTML tags in examples, lowercased CSS hex colors, one renumbered list that skipped an index). Alphanumeric token deltas vs the fold commit were audited file-by-file; all are formatter-equivalent markup normalizations plus the four sanitized skills.
This commit is contained in:
@@ -9,29 +9,29 @@ Reactive `Array.find`.
|
||||
## Usage
|
||||
|
||||
```ts
|
||||
import { useArrayFind } from '@vueuse/core'
|
||||
import { useArrayFind } from '@vueuse/core';
|
||||
|
||||
const list = [ref(1), ref(-1), ref(2)]
|
||||
const positive = useArrayFind(list, val => val > 0)
|
||||
const list = [ref(1), ref(-1), ref(2)];
|
||||
const positive = useArrayFind(list, (val) => val > 0);
|
||||
// positive.value: 1
|
||||
```
|
||||
|
||||
### Use with reactive array
|
||||
|
||||
```ts
|
||||
import { useArrayFind } from '@vueuse/core'
|
||||
import { useArrayFind } from '@vueuse/core';
|
||||
|
||||
const list = reactive([-1, -2])
|
||||
const positive = useArrayFind(list, val => val > 0)
|
||||
const list = reactive([-1, -2]);
|
||||
const positive = useArrayFind(list, (val) => val > 0);
|
||||
// positive.value: undefined
|
||||
list.push(1)
|
||||
list.push(1);
|
||||
// positive.value: 1
|
||||
```
|
||||
|
||||
## Type Declarations
|
||||
|
||||
```ts
|
||||
export type UseArrayFindReturn<T = any> = ComputedRef<T | undefined>
|
||||
export type UseArrayFindReturn<T = any> = ComputedRef<T | undefined>;
|
||||
/**
|
||||
* Reactive `Array.find`
|
||||
*
|
||||
@@ -46,5 +46,5 @@ export type UseArrayFindReturn<T = any> = ComputedRef<T | undefined>
|
||||
export declare function useArrayFind<T>(
|
||||
list: MaybeRefOrGetter<MaybeRefOrGetter<T>[]>,
|
||||
fn: (element: T, index: number, array: MaybeRefOrGetter<T>[]) => boolean,
|
||||
): UseArrayFindReturn<T>
|
||||
): UseArrayFindReturn<T>;
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user