Socket
Socket
Sign inDemoInstall

hast-util-parse-selector

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hast-util-parse-selector - npm Package Compare versions

Comparing version 2.1.1 to 2.2.0

4

index.js

@@ -9,5 +9,5 @@ 'use strict'

/* Parse a simple CSS selector into a HAST node. */
function parse(selector) {
function parse(selector, defaultTagName) {
var value = selector || ''
var name = 'div'
var name = defaultTagName || 'div'
var props = {}

@@ -14,0 +14,0 @@ var index = -1

{
"name": "hast-util-parse-selector",
"version": "2.1.1",
"version": "2.2.0",
"description": "Parse a simple CSS selector to a HAST node",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -32,3 +32,3 @@ # hast-util-parse-selector [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]

### `parseSelector([selector])`
### `parseSelector([selector][, defaultTagName])`

@@ -43,2 +43,7 @@ Parse a CSS `selector` to a [HAST][] node.

###### `defaultTagName`
`string`, optional, defaults to `div` — Tag name to use if `selector` does not
specify one.
###### Returns

@@ -45,0 +50,0 @@

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