This commit creates two little shim functions called isOK and
isNotOK that check a given element's tag values for either yes or
only in the case of the former function and for the presence of a
no tag value in the case of the latter. These two functions can then
be called by isDiet() and isNotDiet() directly without changing the
logic or interface of the rest of the project. So what's the point?
By including these additional more generic methods, code can be more
easily reused for other elements, such as for whether an element has a
toilets:unisex=yes tag or other such value either in the future in
this own codebase or in forked codebases such as the (new!)
OpenToiletMap project, which is forked from here.
This commit creates two little shim functions called
isOK
andisNotOK
that check a given element's tag values for eitheryes
oronly
in the case of the former function and for the presence of ano
tag value in the case of the latter. These two functions can then be called byisDiet()
andisNotDiet()
directly without changing the logic or interface of the rest of the project. So what's the point?By including these additional more generic methods, code can be more easily reused for other elements, such as for whether an element has a
toilets:unisex=yes
tag or other such value either in the future in this own codebase or in forked codebases such as the (new!) OpenToiletMap project, which is forked from here.