Skip to content

anim-format (runtime format) / nearestSlotName

Function: nearestSlotName() ​

ts
function nearestSlotName<T>(wanted, entries): T | undefined;

The entry a library gives for wanted: the same name, else the nearest of its family (see the file comment); undefined = nothing of the family.

Type Parameters ​

Type Parameter
T extends SlotEntryName

Parameters ​

ParameterType
wantedstring
entriesreadonly T[]

Returns ​

T | undefined

HereSplash — 2D animation for the web