Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

method libtmux-ts latest

Selection.filter

Keep the members predicate accepts.

Source and package
Qualified name
Selection.filter
Module
selection
Declared in
Selection
Package
libtmux
Source
packages/libtmux/src/selection.ts
filter<Narrowed extends Model>( predicate: ( value: Model, index: number, values: readonly Model[], ) => value is Narrowed, thisArg?: unknown, ): Selection<Narrowed>filter( predicate: ( value: Model, index: number, values: readonly Model[], ) => unknown, thisArg?: unknown, ): Selection<Model>

Description#

For a question that has to run code. When the question can be expressed as criteria, where() says the same thing as data — which can be logged, sent to another process, or stored.

Examples#

snapshot.panes.filter((entry) => entry.currentCommand?.startsWith("v") === true);
Type parameters
Parameters

Guides#

Pages that discuss filter.

Esc

Type to search.

Reference previewOpen reference