function | since v0.0-927 | clojure.core/ancestors | Edit |
(ancestors tag)
(ancestors h tag)
Returns the immediate and indirect parents of tag, either via a JavaScript type inheritance relationship or a relationship established via derive. h must be a hierarchy obtained from make-hierarchy, if not supplied defaults to the global hierarchy
(defn ancestors
([tag] (ancestors @(get-global-hierarchy) tag))
([h tag] (not-empty (get (:ancestors h) tag))))