hast-util-parse-selector
Advanced tools
Comparing version 2.1.1 to 2.2.0
@@ -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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5902
84