Skip to content

isPositionInOffsetRange

Checks if a position is fully contained within an offset range.

Containment is full and both bounds are inclusive: a position that coincides exactly with the range is inside it, and one that only partially overlaps it is not.

Import:

import { isPositionInOffsetRange } from '@mnaoumov/obsidian-lib/position';

Signature:

function isPositionInOffsetRange(position: Pos, offsetRange: OffsetRange): boolean

Parameters:

Parameter Type Description
position Pos The position to check.
offsetRange OffsetRange The offset range to check against.

Returns: boolean — Whether the position is fully contained within the offset range.