positionOfValue

Returns the position a value stands at: the index of that name for a categorical parameter, the number itself for every other. The inverse of valueAtPosition.

@internote/canvas-sdkFunction
On this page
import { positionOfValue } from '@internote/canvas-sdk';

A name the parameter does not have gives its initial position.

#Signature

(parameter: Parameter, value: ParameterValue): number

#Parameters

parameter
A parameter from ctx.parameters.all.
value
A value of the parameter, a number or one of its names.

Declared in packages/canvas-sdk/src/parameters/index.ts:497.

Last updated