htmx-remove
Advanced tools
| import i from"htmx.org";(function(){i.defineExtension("remove",{onEvent:(n,o)=>{const e=o.detail.elt;if(n==="htmx:afterProcessNode"){const t=e.querySelector("[data-remove]");t!==null&&t.addEventListener("click",r=>{r.preventDefault(),e.remove()})}}})})(); |
@@ -1,1 +0,1 @@ | ||
| "use strict";(function(){htmx.defineExtension("remove",{onEvent:(e,t)=>{const n=t.detail.elt;if(e==="htmx:afterProcessNode"){const o=n.querySelector("[data-remove]");if(o!==null){o.addEventListener("click",e=>{e.preventDefault();n.remove()})}}}})})(); | ||
| "use strict";(function(){htmx.defineExtension("remove",{onEvent:(n,r)=>{const e=r.detail.elt;if(n==="htmx:afterProcessNode"){const t=e.querySelector("[data-remove]");t!==null&&t.addEventListener("click",o=>{o.preventDefault(),e.remove()})}}})})(); |
+4
-9
| { | ||
| "name": "htmx-remove", | ||
| "version": "2.7.0", | ||
| "version": "2.8.0", | ||
| "description": "A htmx extension for DOM element removal via click events.", | ||
| "main": "build/htmx-remove.js", | ||
| "main": "build/htmx-remove.esm.js", | ||
| "type": "module", | ||
@@ -14,7 +14,2 @@ "files": [ | ||
| "unpkg": "build/htmx-remove.js", | ||
| "scripts": { | ||
| "build": "bin/build", | ||
| "quality": "eslint . && bin/rake quality", | ||
| "uglify": "uglifyjs -m eval -o build/htmx-remove.js lib/htmx-remove.js" | ||
| }, | ||
| "repository": { | ||
@@ -40,5 +35,5 @@ "type": "git", | ||
| "devDependencies": { | ||
| "eslint": "~9.32", | ||
| "uglify-js": "~3.19" | ||
| "esbuild": "^0.25.9", | ||
| "eslint": "^9.34" | ||
| } | ||
| } |
+5
-19
@@ -38,3 +38,3 @@ :toc: macro | ||
| <script src="https://unpkg.com/htmx-remove@latest" | ||
| integrity="sha384-v6VOSW2F42qo+95FGFDZCY72+0md5SolbibTa8Kgn8DkCrevZNkgTsWXdEMXyeRX" | ||
| integrity="sha384-NwB2Xh66PNEYfVki0ao13UAFmdNtMIdBKZ8sNGRT6hKfCPaINuZ4ScxS6vVAycPT" | ||
| crossorigin="anonymous"> | ||
@@ -57,3 +57,3 @@ </script> | ||
| <script type="module"> | ||
| import * as htmx_remove from "htmx-remove"; | ||
| import "htmx-remove"; | ||
| </script> | ||
@@ -69,7 +69,7 @@ ---- | ||
| Once the library is installed, you only need to require it: | ||
| Once the library is installed, you only need to import it: | ||
| [source,html] | ||
| [source,js] | ||
| ---- | ||
| <script src="htmx-remove.js"></script> | ||
| import "htmx-remove"; | ||
| ---- | ||
@@ -158,16 +158,2 @@ | ||
| To only check code quality, run: | ||
| [source,bash] | ||
| ---- | ||
| npm run quality | ||
| ---- | ||
| To only check specs, run: | ||
| [source,bash] | ||
| ---- | ||
| bin/rspec | ||
| ---- | ||
| == Deployment | ||
@@ -174,0 +160,0 @@ |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
6
20%2
Infinity%0
-100%15110
-0.6%187
-6.97%1
Infinity%