API Reference / rankMomentsAsync · function

Function: rankMomentsAsync()

function rankMomentsAsync(
   opts, 
   score, 
chunk?): Promise<RankedMoment[]>;

rankMoments that yields to the event loop every chunk samples, so a long main-thread scan does not freeze the UI. Same result as rankMoments.

Parameters

ParameterTypeDefault value
optsRankOptionsundefined
score(jd) => numberundefined
chunknumber256

Returns

Promise<RankedMoment[]>

Start building

Quickstart →