select-parent

WebJar for select-parent

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

select-parent
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

select-parent
WebJar for select-parent
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/radubrehar/select-parent

Download select-parent

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/select-parent/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>select-parent</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/select-parent/
implementation 'org.webjars.npm:select-parent:1.0.1'
// https://jarcasting.com/artifacts/org.webjars.npm/select-parent/
implementation ("org.webjars.npm:select-parent:1.0.1")
'org.webjars.npm:select-parent:jar:1.0.1'
<dependency org="org.webjars.npm" name="select-parent" rev="1.0.1">
  <artifact name="select-parent" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='select-parent', version='1.0.1')
)
libraryDependencies += "org.webjars.npm" % "select-parent" % "1.0.1"
[org.webjars.npm/select-parent "1.0.1"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

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 = require('select-parent')

var redDiv = selectParent('div.red', document.getElementById('inner-div'))

Or you can use the curried form as well.

var selectParent = require('select-parent')

var selectRed = selectParent('div.red')

var redDiv = selectRed(document.getElementById('nested-div'))

Versions

Version
1.0.1