select-parent
querySelector but for parent nodes. Given a node, selects the parent/ancestor that matches the given selector.
Install
$ npm install --save select-parent
Usage
var selectParent = var redDiv =
Or you can use the curried form as well.
var selectParent = var selectRed = var redDiv =