Skip to Content
DocumentationAPI Reference2DCodeFunctionsFunction: findAllCodeRanges()

@revideo/2d


@revideo/2d / code / findAllCodeRanges

Function: findAllCodeRanges()

findAllCodeRanges(code, pattern, limit?): CodeRange[]

Defined in: 2d/src/lib/code/CodeRange.ts:174 

Find all code ranges that match the given pattern.

Parameters

code

string

The code to search in.

pattern

string | RegExp

Either a string or a regular expression to search for.

limit?

number = Infinity

An optional limit on the number of ranges to find.

Returns

CodeRange[]

© 2026 Haven Technologies, Inc.
Function: findAllCodeRanges() – Revideo