MCPcopy Create free account
hub / github.com/ReactiveX/RxGo / Filter

Method Filter

single.go:21–25  ·  view source on GitHub ↗

Filter emits only those items from an Observable that pass a predicate test.

(apply Predicate, opts ...Option)

Source from the content-addressed store, hash-verified

19
20// Filter emits only those items from an Observable that pass a predicate test.
21func (s *SingleImpl) Filter(apply Predicate, opts ...Option) OptionalSingle {
22 return optionalSingle(s.parent, s, func() operator {
23 return &filterOperatorSingle{apply: apply}
24 }, true, true, opts...)
25}
26
27// Get returns the item. The error returned is if the context has been cancelled.
28// This method is blocking.

Callers

nothing calls this directly

Calls 1

optionalSingleFunction · 0.85

Tested by

no test coverage detected