Package Exports
- ancestors
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ancestors) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ancestors
return a list of a node's ancestors, optionally filtered with a provided function.
var parents = require('ancestors')
, el = document.getElementById('target')
var p = parents(el)
// [list, of, parent, elements]
var p = parents(el, function(node) { return node.tagName == 'div' })
// [list, of, parent, div, elements]
API
parents(element[, filterFunction]) -> [list of elements]
License
MIT
