MCPcopy
hub / github.com/flosch/pongo2 / IsNumber

Method IsNumber

value.go:76–78  ·  view source on GitHub ↗

IsNumber checks whether the underlying value is either an integer or a float.

()

Source from the content-addressed store, hash-verified

74// IsNumber checks whether the underlying value is either an integer
75// or a float.
76func (v *Value) IsNumber() bool {
77 return v.IsInteger() || v.IsFloat()
78}
79
80// IsTime checks whether the underlying value is a time.Time.
81func (v *Value) IsTime() bool {

Callers 4

EvaluateMethod · 0.80
filterAddFunction · 0.80
filterFloatformatFunction · 0.80
filterPluralizeFunction · 0.80

Calls 2

IsIntegerMethod · 0.95
IsFloatMethod · 0.95

Tested by

no test coverage detected