In-game tools · function

divergentComponents

Which components two sides hash differently, into out. Returns how many.

Explained in In-game tools.

function divergentComponents(ours: ReadonlyMap<string, string>, theirs: ReadonlyMap<string, string>, out: string[]): number
import { divergentComponents } from '@driftengine/tools';

Parameters

ParameterTypeDescription
oursReadonlyMap<string, string>
theirsReadonlyMap<string, string>
outstring[]

In depth

A component only one side has is a divergence too, and the loudest kind: it means one peer created or destroyed something the other did not.