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

@anywhichway/quick-component

v0.0.15

Published

A small utility for rapidly creating remotely loadable, on-demand, isolatable web components

Readme

quick-component

A small utility for rapidly creating remotely loadable, on-demand, isolatable web components

Script Tag Usage

The easiest way to use @anywhichway/quick-component is to load both it and the component it is using from a CDN, e.g.

<script src="https://cdn.jsdelivr.net/npm/@anywhichway/quick-component.j" 
        component="https://cdn.jsdelivr.net/npm/@anywhichway/[email protected]"></script>

If you are using JSDelivr, by default the tag name will be the file or terminal directory name of the component without a version number. Component versioning is currently only supported for JSDeliver.

You can provide an alternate tag with the 'as' attribute:

<script src="https://cdn.jsdelivr.net/npm/@anywhichway/[email protected]" 
        component="https://cdn.jsdelivr.net/npm/@anywhichway/[email protected]" 
        as="hosted-repl"></script>

These additional attributes are available:

import - An array of CSS selectors that allow importing component elements into the head of the requesting document. This is sometimes necessary to support styling or JavaScript libraries that were not necessarily designed to run in a shadowDOM. If import is not specified it defaults to ["link","style","script"].

isolate - Takes the value "true" or "false". The value "true" places the actual contents of the component into an iframe and creates a proxy around the iframe to support automatic resizing.

If isolate is "true", you can configure the iframe security using the same attributes used by an iframe, i.e. allow, allowfullscren, allowpaymentrequest, referrerpolicy, csp, sandbox. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe.

API Usage

To be written.

Defining Components

To be written.

Version History (reverse chronological order)

2022-12-26 v0.0.15 Adjusted shadowRoot script handling that would sometimes throw a silent error

2022-11-27 v0.0.14 Added error handling for defining a component twice

2022-10-13 v0.0.13 Added runtime debug support. Removed isCustomelement() use customElements.get(tagName) instead.

2022-10-11 v0.0.12 Prevent infinite loops when innerHTML is changed to same value. Added ability to pass in extra properties when defining component.

2022-10-09 v0.0.11 Added support for subclassing standard HTML tags.

2022-09-25 v0.0.10 Optimized for third-party libraries loading.

2022-09-25 v0.0.9 Removed excess code. Eliminated memory leak from event handler.

2022-09-25 v0.0.8 Optimized to reduce frequency of loading component scripts.

2022-09-10 v0.0.7 Added support for imports then loading components via a script tag.

2022-09-10 v0.0.6 Ensure that components defined using ./index.js do not cache the ./index.js file since it needs to be applied every time an element is created.

2022-09-10 v0.0.5 Added documentation and better support for loading both module and regular script based components.