MCPcopy
hub / github.com/PuerkitoBio/goquery / IsFunction

Method IsFunction

query.go:26–28  ·  view source on GitHub ↗

IsFunction checks the current matched set of elements against a predicate and returns true if at least one of these elements matches.

(f func(int, *Selection) bool)

Source from the content-addressed store, hash-verified

24// IsFunction checks the current matched set of elements against a predicate and
25// returns true if at least one of these elements matches.
26func (s *Selection) IsFunction(f func(int, *Selection) bool) bool {
27 return s.FilterFunction(f).Length() > 0
28}
29
30// IsSelection checks the current matched set of elements against a Selection object
31// and returns true if at least one of these elements matches.

Callers 3

BenchmarkIsFunctionFunction · 0.80
TestIsFunctionFunction · 0.80
TestIsFunctionRollbackFunction · 0.80

Calls 2

FilterFunctionMethod · 0.95
LengthMethod · 0.80

Tested by 3

BenchmarkIsFunctionFunction · 0.64
TestIsFunctionFunction · 0.64
TestIsFunctionRollbackFunction · 0.64