New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@acanto/core-dom

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@acanto/core-dom - npm Package Compare versions

Comparing version 0.0.15 to 0.0.16

12

index.ts

@@ -29,2 +29,3 @@ /**

* @param {HTMLElement | Document} [parent] It falls back to `window.document`
* @param {boolean} [avoidEscape] Whether to avoid escaping `:` in the selector string
* @example <caption>Basic DOM selection</caption>

@@ -36,6 +37,7 @@ * const $container = $(".my-section:");

selector: string,
parent?: HTMLElement | Document
parent?: HTMLElement | Document,
avoidEscape?: boolean
) {
return ((parent ? parent : document).querySelector(
selector.replace(/:/g, "\\:")
avoidEscape ? selector : selector.replace(/:/g, "\\:")
) as unknown) as T;

@@ -50,9 +52,11 @@ }

* @param {HTMLElement | Document} [parent] It falls back to `window.document`
* @param {boolean} [avoidEscape] Whether to avoid escaping `:` in the selector string
*/
export function $$<T extends Element = HTMLElement>(
selector: string,
parent?: HTMLElement | Document
parent?: HTMLElement | Document,
avoidEscape?: boolean
) {
return ((parent ? parent : document).querySelectorAll(
selector.replace(/:/g, "\\:")
avoidEscape ? selector : selector.replace(/:/g, "\\:")
) as unknown) as NodeListOf<T>;

@@ -59,0 +63,0 @@ }

{
"name": "@acanto/core-dom",
"version": "0.0.15",
"version": "0.0.16",
"author": "Acanto <info@acanto.net> (https://acanto.agency/)",

@@ -18,3 +18,3 @@ "license": "ISC",

"sideEffects": false,
"gitHead": "7c45c0d8dcb33b3e5d87e0f4c27ef9087c10ed35"
"gitHead": "d72bfa57c6debe42b34eb6eb81f22d0021297eaf"
}
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