MCPcopy Create free account
hub / github.com/blacksmithgu/datacore / find

Method find

src/api/data-array.ts:54–54  ·  view source on GitHub ↗

Return the first element that satisfies the given predicate.

(pred: ArrayFunc<T, boolean>)

Source from the content-addressed store, hash-verified

52 indexOf(element: T, fromIndex?: number): number;
53 /** Return the first element that satisfies the given predicate. */
54 find(pred: ArrayFunc<T, boolean>): T | undefined;
55 /** Find the index of the first element that satisfies the given predicate. Returns -1 if nothing was found. */
56 findIndex(pred: ArrayFunc<T, boolean>, fromIndex?: number): number;
57 /** Returns true if the array contains the given element, and false otherwise. */

Callers 4

extractFileLinksFunction · 0.65
resolveLinkMethod · 0.65
linkMethod · 0.65
resolveSourceMethod · 0.65

Implementers 1

DataArrayImplsrc/api/data-array.ts

Calls

no outgoing calls

Tested by

no test coverage detected