iterateRefs
Official
If callback returns true, the iteration process will be interrupted.
Import:
import { iterateRefs } from 'obsidian';Example:
iterateRefs(refs, (ref) => { console.log(ref); return true;});
**Signature:**
```tsfunction iterateRefs(refs: Reference[], cb: (ref: Reference) => boolean | void): booleanParameters:
| Parameter | Type | Description |
|---|---|---|
refs | Reference[] | The references to iterate. |
cb | (ref: Reference) => boolean | void | The callback to call for each reference. |
Returns: boolean — true if callback ever returns true, false otherwise.
Example:
iterateRefs(refs, (ref) => { console.log(ref); return true;});