@acanto/core-dom
Advanced tools
Comparing version 0.0.12 to 0.0.14
10
index.ts
@@ -10,4 +10,2 @@ /** | ||
* ``` | ||
* | ||
* | ||
*/ | ||
@@ -37,3 +35,3 @@ | ||
*/ | ||
export function $(selector: string, parent: HTMLElement | Document) { | ||
export function $(selector: string, parent?: HTMLElement | Document) { | ||
return (parent ? parent : document).querySelector( | ||
@@ -52,3 +50,3 @@ selector.replace(/:/g, "\\:") | ||
*/ | ||
export function $$(selector: string, parent: HTMLElement | Document) { | ||
export function $$(selector: string, parent?: HTMLElement | Document) { | ||
return (parent ? parent : document).querySelectorAll( | ||
@@ -88,3 +86,3 @@ selector.replace(/:/g, "\\:") | ||
callback: ($element: T) => any, | ||
parent: HTMLElement, | ||
parent?: HTMLElement, | ||
scope?: object | ||
@@ -102,3 +100,2 @@ ) { | ||
* @param {NodeList | HTMLFormControlsCollection} nodeList | ||
* @returns {HTMLElement[] | HTMLFormElement[]} | ||
*/ | ||
@@ -135,3 +132,2 @@ export function toArray(nodeList: NodeList | HTMLFormControlsCollection) { | ||
* @param {any} nodes The object to check | ||
* @returns {boolean} | ||
*/ | ||
@@ -138,0 +134,0 @@ export function isNodeList(nodes: any) { |
{ | ||
"name": "@acanto/core-dom", | ||
"version": "0.0.12", | ||
"version": "0.0.14", | ||
"author": "Acanto <info@acanto.net> (https://acanto.agency/)", | ||
@@ -18,3 +18,3 @@ "license": "ISC", | ||
"sideEffects": false, | ||
"gitHead": "2a2792b2e58ee111ec7e261565a91d6bc36a52f7" | ||
"gitHead": "4ea109edd9705c50a55aceac1b604d271466849c" | ||
} |
23305
767