Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bianco.dom-to-array

Package Overview
Dependencies
Maintainers
3
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bianco.dom-to-array

Converts any DOM node/s to a loopable array

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
678
decreased by-30.32%
Maintainers
3
Weekly downloads
 
Created
Source

bianco.dom-to-array

Build Status

NPM version NPM downloads MIT License

Usage

import domToArray from 'bianco.dom-to-array'

var div = document.createElement('div')
div.innerHTML = `
  <ul>
    <li>one</li>
    <li>two</li>
  </ul>
`
body.appendChild(div)

// It can convert node list
const lis = document.querySelectorAll('li')
const $lis = domToArray(lis)
$lis.length // => 2
Array.isArray($lis) // => true

// It can convert a single node
const li = document.querySelector('li')
const $li = domToArray(li)
$li.length // => 1
Array.isArray($li) // => true

API

Table of Contents

domToArray

Converts any DOM node/s to a loopable array

Parameters

Returns Array always a loopable object

Keywords

FAQs

Package last updated on 01 Dec 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc