Module: JMESPath::Util Private
- Defined in:
- lib/jmespath/util.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Class Method Summary collapse
-
.falsey?(value) ⇒ Boolean
private
Determines if a value is false as defined by JMESPath:.
Class Method Details
.falsey?(value) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Determines if a value is false as defined by JMESPath:
https://github.com/jmespath/jmespath.site/blob/master/docs/proposals/improved-filters.rst#and-expressions-1
10 11 12 13 14 15 16 17 18 |
# File 'lib/jmespath/util.rb', line 10 def falsey?(value) value.nil? || value === false || value == '' || value == {} || value == [] || (value.respond_to?(:entries) && value.entries.compact.empty?) # final case necessary to support Enumerable and Struct end |