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

jssoup-selector

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

jssoup-selector

This is yet another javascript CSS selector library.

  • 0.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
8
decreased by-20%
Maintainers
1
Weekly downloads
 
Created
Source

JSSoupSelector

This is a simple CSS selector written in pure JavaScript code. It aims to provide CSS selector functions to JSSoup. But it can do more as it has flexibility to support other dom packages as well (e.g. jsdom).

unit-tests npm version NPM

Supported CSS Selectors

JSSoupSelector has implemented most basic selectors:

  • Universal Selector *
  • Type Selector div
  • Class Selector .class
  • ID Selector #id
  • Attribute Selector [title]
  • Descendant Combinator body div
  • Child Combinator body > div
  • Next Sibling Combinator body + div
  • Subsequent Sibling Combinator body ~ div
  • Groups of Selectors div.class, span#id, p[title]

Install

$ npm install jssoup-selector 

usage

Import

//react-native
import SoupSelector from 'jssoup'; 
// nodejs
var SoupSelector = require('jssoup-selector').default;

select

JSSoupSelector requires a dom adaptor class as input so that it can adapt dom element access functions to dom package specific functions. Now it only supports JSSoup adapter.

var selector = new SoupSelector(new JSSoupAdapter());
var soup = new JSSoup(data);
var elements = selector.select("*", soup)

FAQs

Package last updated on 07 Oct 2021

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