JSFiddle - React, Tailwind, and code Playground

by Matt

HTML

<script type="module">
	import Alpine from 'https://cdn.jsdelivr.net/npm/[email protected]/+esm'
	import Filter from 'https://cdn.jsdelivr.net/npm/[email protected]/+esm'

	const filter = new Filter()
	window.isProfane = (text) => filter.isProfane(text)

	Alpine.start()
</script>

<div x-data="{ input: '' }">
  <input x-model="input" />
  <p>
    Is profane? <span x-text="isProfane(input)"></span>
  </p>
</div>