findPath

@twine-protocol/twine-core v0.1.0Docs


twine-js / @twine-protocol/twine-core / findPath

Function: findPath()

findPath(start, target, resolver): Promise<Path | null>

Find a path between two pulses

This function is a convenience function that uses the crawl function to find a path between two pulses. It will return a path if one is found, or null if no path is found.

Parameters

Parameter
Type
Description

start

The starting pulse, or a query for the starting pulse

target

The target pulse, or a query for the target pulse

resolver

The resolver to use for resolving pulses

Returns

Promise<Path | null>

  • A path if one is found, or null if no path is found

Example

Defined in

packages/twine-core/src/crawl.ts:357

Last updated