splitInterval

Splits interval notation such as [0, 10] or [>0, <8] into its two ends and whether each is included, or returns why it could not.

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

The ends come back as text, so a refiner for an interval whose ends may be expressions parses each itself. See IntervalParts for the notation.

#Signature

(input: string): IntervalParts | { error: string; }

#Parameters

input
The interval as written.

Declared in packages/canvas-sdk/src/refine/value-refiners.ts:89.

Last updated