Socket
Book a DemoInstallSign in
Socket

get-nodes

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-nodes

Returns an array of all the elements within a dom element, including the dom element itself

latest
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

get nodes

Returns an array of all the elements within a dom element, including the dom element itself.

Installation

npm install get-nodes

How to use

Require get-nodes:

var getNodes = require("get-nodes");

Given this DOM structure:

<header></header>
<section>
    <div></div>
    <div></div>
    <div></div>
</section>
<footer></footer>

To retrieve all the elements in section:

getNodes(document.querySelector("section"));
// [
//    <section>,
//    <div>,
//    <div>,
//    <div>
// ]

LICENSE

MIT

Keywords

get

FAQs

Package last updated on 12 Apr 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts