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

@paulwib/query-dom

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

@paulwib/query-dom

query-focused & somewhat standards compliant subset of the DOM

  • 3.4.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

query-dom Build Status

query-focused & somewhat standards compliant subset of the DOM

Installation

Download node at nodejs.org and install it, if you haven't already.

npm install query-dom --save

Usage

import {parse, parseFragment} from 'query-dom';

const document = parse('<div><foo style="font-size: 12px" class="bar"></foo></div>');
const child = document.getElementsByTagName('foo')[0];

console.log(child.style.fontSize);
console.log(child.classList.contains('bar'), child.classList.contains('bas'));
console.log(child.innerHTML);

const fragment = parseFragment('<div><foo style="font-size: 12px" class="bar"></foo><foo class="bar">bas</bar></div>');
const children = fragment.querySelectorAll('.bar');

console.log('children', children);

Tests

npm install
npm test

Dependencies

  • camelcase-css: Convert a dash-separated CSS property to a camelCased DOM property.
  • cssauron: create matching selectors from css for your very own nested object hierarchy
  • object-assign: ES2015 Object.assign() ponyfill
  • parse5: WHATWG HTML5 specification-compliant, fast and ready for production HTML parsing/serialization toolset for Node.js
  • to-fast-properties: Force V8 to use fast properties for an object

Dev Dependencies

  • ava: Futuristic test runner 🚀
  • babel-cli: Babel command line.
  • babel-core: Babel compiler core.
  • babel-preset-es2015: Babel preset for all es2015 plugins.
  • devtool: runs Node.js programs through Chromium DevTools
  • jsdom: A JavaScript implementation of the DOM and HTML standards
  • minidom: Small DOM level 1 implementation
  • npm-run-all: A CLI tool to run multiple npm-scripts in parallel or sequential.
  • nyc: the Istanbul command line interface
  • package-json-to-readme: Generate a README.md from package.json contents
  • semistandard: All the goodness of feross/standard with semicolons sprinkled on top.
  • snazzy: Format JavaScript Standard Style as Stylish (i.e. snazzy) output
  • tsml: ES6 template string tag for multi-line cleaning - squash multi-line strings into a single line

License

MIT

Generated by package-json-to-readme

FAQs

Package last updated on 10 Dec 2017

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