bianco.query
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -10,8 +10,8 @@ 'use strict'; | ||
* @param { string|DOMNodeList } selector - either the query or the DOM nodes to arraify | ||
* @param { HTMLElement } ctx - context defining where the query will search for the DOM nodes | ||
* @param { HTMLElement } scope - context defining where the query will search for the DOM nodes | ||
* @returns { Array } DOM nodes found as array | ||
*/ | ||
function $(selector, ctx) { | ||
function $(selector, scope) { | ||
return domToArray(typeof selector === 'string' ? | ||
(ctx || document).querySelectorAll(selector) : | ||
(scope || document).querySelectorAll(selector) : | ||
selector | ||
@@ -18,0 +18,0 @@ ) |
@@ -6,10 +6,10 @@ import domToArray from 'bianco.dom-to-array' | ||
* @param { string|DOMNodeList } selector - either the query or the DOM nodes to arraify | ||
* @param { HTMLElement } ctx - context defining where the query will search for the DOM nodes | ||
* @param { HTMLElement } scope - context defining where the query will search for the DOM nodes | ||
* @returns { Array } DOM nodes found as array | ||
*/ | ||
export default function $(selector, ctx) { | ||
export default function $(selector, scope) { | ||
return domToArray(typeof selector === 'string' ? | ||
(ctx || document).querySelectorAll(selector) : | ||
(scope || document).querySelectorAll(selector) : | ||
selector | ||
) | ||
} |
{ | ||
"name": "bianco.query", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Modern DOM query selectors helpers written in es2015", | ||
@@ -8,2 +8,3 @@ "main": "index.js", | ||
"module": "index.next.js", | ||
"types": "index.d.ts", | ||
"scripts": { | ||
@@ -10,0 +11,0 @@ "prepare": "npm run build && npm test", |
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
5433