
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@daviddarnes/live-filter
Advanced tools
live-filter
A Web Component for filtering items using a text input.
General usage example:
<script type="module" src="live-filter.js"></script>
<live-filter>
<label>Filter: <input type="search" aria-controls="list" /></label>
<ul role="region" id="list" aria-live="polite">
<li>African Violet</li>
<li>Aloe Tiger Plant</li>
<li>Aralia Ming</li>
<li>Autograph Tree</li>
</ul>
</live-filter>
Example setting the selector
option to select dt
elements:
<script type="module" src="live-filter.js"></script>
<live-filter selector="dt">
<label>Filter: <input type="search" aria-controls="data" /></label>
<dl role="region" id="data" aria-live="polite">
<dt>Beast of Bodmin</dt>
<dd>A large feline inhabiting Bodmin Moor.</dd>
<dt>Morgawr</dt>
<dd>A sea serpent.</dd>
<dt>Owlman</dt>
<dd>A giant owl-like creature.</dd>
</dl>
</live-filter>
Example setting the case
option to change the search to be case insensitive:
<script type="module" src="live-filter.js"></script>
<live-filter case="insensitive">
<label>Filter: <input type="search" aria-controls="list" /></label>
<ul role="region" id="list" aria-live="polite">
<li>African Violet</li>
<li>Aloe Tiger Plant</li>
<li>Aralia Ming</li>
<li>Autograph Tree</li>
</ul>
</live-filter>
This Web Component allows you to:
data-live-filter-match="true"
and data-live-filter-match="false"
selector
attribute on the live-filter
element itselfcase
attribute on the live-filter
element itselfYou have a few options (choose one of these):
npm install @daviddarnes/live-filter
Make sure you include the <script>
in your project (choose one of these):
<!-- Host yourself -->
<script type="module" src="live-filter.js"></script>
<!-- 3rd party CDN, not recommended for production use -->
<script
type="module"
src="https://www.unpkg.com/@daviddarnes/live-filter@1.1.0/live-filter.js"
></script>
<!-- 3rd party CDN, not recommended for production use -->
<script
type="module"
src="https://esm.sh/@daviddarnes/live-filter@1.1.0"
></script>
selector
and case
:By default live-filter
will select all the li
elements within it to search through. However with the selector
attribute you can pass in a different selector string to search through:
<live-filter selector="dt">
<!-- ... -->
</live-filter>
By default live-filter
will be case sensitive, which can be restrictive when searching through proper nouns and titles. This can be adjusted using the case
attribute and setting the value to insensitive
:
<live-filter case="insensitive">
<!-- ... -->
</live-filter>
With thanks to the following people:
FAQs
A Web Component for filtering items using a text input
We found that @daviddarnes/live-filter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.