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

bianco.query

Package Overview
Dependencies
Maintainers
3
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bianco.query

Modern DOM query selectors helpers written in es2015

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
529
decreased by-19.6%
Maintainers
3
Weekly downloads
 
Created
Source

bianco.query

Build Status NPM version NPM downloads MIT License

Modern DOM query selectors helpers written in es2015

Usage

import $ from 'bianco.query'

const footer = document.querySelector('.main-footer')
const header = document.querySelector('.main-header')

// convert DOM nodes to arrays
$(footer)
  .concat($(header))
  .forEach(el => el.classList.add('fade-in'))

// handle DOM queries
$('h1', 'main').forEach(h1 => h1.classList.add('main-title'))

API

Table of Contents

$

Simple helper to find DOM nodes returning them as array like loopable object

Parameters
  • selector (string | DOMNodeList) either the query or the DOM nodes to arraify
  • ctx HTMLElement context defining where the query will search for the DOM nodes

Returns Array DOM nodes found as array

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