Skip to content

Editor.everyLine method

Editor › everyLine

Unofficial

Check whether every selected line satisfies a predicate.

Signature:

everyLine(predicate: (lineText: string) => boolean, skipEmpty?: boolean): boolean

Parameters:

ParameterTypeDescription
predicate(lineText: string) => booleanThe check applied to each selected line's text.
skipEmpty?booleanWhether to skip blank lines when the selection spans more than one line.

Returns: boolean — true when at least one line was checked and all of them passed, false otherwise.