x-remove

Remove an HTML tag with an x directive

Usage no npm install needed!

<script type="module">
  import xRemove from 'https://cdn.skypack.dev/x-remove';
</script>

README

x-remove

JavaScript Style Guide

Deletes any nodes this directive is attached to.

directives: {
  'remove': require('x-remove')
}

This

<!DOCTYPE html>
<head>
  <script src="dev-dependency.js" x-remove>
</head>

becomes this

<!DOCTYPE html>
<head>
</head>