npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

be-evanescent

v0.0.8

Published

be-evanescent is a web component decorator that removes the element it adorns from the DOM tree when the web component definitions it monitors for become registered.

Readme

be-evanescent

be-evanescent is a web component decorator that removes the element it adorns from the DOM tree when the web component definitions it monitors for become registered.

Size of package, including custom element behavior framework (be-decorated):

How big is this package in your project?

Size of new code in this package:

Playwright Tests

The biggest use case is providing initial css rules for light children, prior to being slotted. This is important for avoiding FOUC. But leaving the styles behind when no longer applicable, could have a lasting negative impact on other light children waiting for their web components to become registered, as well as non-shadowed content. Not to mention the performance impact of having non applicable css sitting in memory.

be-evanescent is an attribute-based alternative to transient-style.

Syntax

<be-hive>
    <script type=emc src="be-evanescent/emc.json"></script>
</be-hive>
<style be-evanescent='["my-component"]'>
    div{
        color: red;
    }
</style>
<div>hello</div>
<script>
    setTimeout(() => {
        customElements.define('my-component', class extends HTMLElement {} );
    }, 3000);
</script>

The style tag is removed from the DOM tree as soon as web component "be-evanescent" is registered.

Assuming the parent element name

If no custom element names are specified, but the style element being enhanced is within a light child region of a custom element, assume that is the only one to wait for:

<be-hive>
    <script type=emc src="be-evanescent/emc.json"></script>
</be-hive>
<my-component>
<style be-evanescent>
    div{
        color: red;
    }
</style>
<div>hello</div>
</my-component>
<script>
    setTimeout(() => {
        customElements.define('my-component', class extends HTMLElement {} );
    }, 3000);
</script>

Viewing Locally

Any web server that serves static files with server-side includes will do but...

  1. Install git
  2. Fork/clone this repo
  3. Install node.js
  4. Open command window to folder where you cloned this repo
  5. git submodule add https://github.com/bahrus/types.git types

  6. git submodule update --init --recursive

  7. npm install

  8. npm run serve

  9. Open http://localhost:8000/demo/ in a modern browser

Using from CDN:

<script type=module crossorigin=anonymous>
    import 'https://esm.run/be-evanescent';
</script>