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

lib-id

v0.0.23

Published

li-bid provides a repeating web component. It extends [i-bid](https://github.com/bahrus/ib-id). Whereas i-bid has [no support for light children](https://github.com/bahrus/ib-id#what-if-i-want-to-repeat-some-web-components-that-require-non-shadow-light-

Readme

li-bid

li-bid provides a repeating web component. It extends i-bid. Whereas i-bid has no support for light children, li-bid does. Both i-bid and li-bid deviate from traditional repeating elements, in that the rendered content they produce is inserted adjacent to the i-bid/li-bid element.

The question is where to get the light children from for a repeating element? Most repeating elements allow us / force us to define the structure of the light children from within the tag. li-bid supports this as well, but we need to be explicit that that is our intent, since other alternative locations to pull in the light children from are also provided by li-bid.

li-bid provides basic support for dynamically setting attributes and interpolating inside tags. It uses a fork of github's template parts library for this moustache-style binding.

li-bid borrows similar syntax and even the "reverse binding" function library (discussed later) used by d-fine. So as far as locating the template (or HTML Element) which needs repeated appending / binding, we can use the attribute/property from-child-template/fromChildTemplate, or fct/fct for short.

Sample syntax I

The special template-id value of "innerTemplate" means just search inside for the template to use:

<ul>
    <li>header</li>
    <li-bid from-child-template list='[{"msg": "hello 1"}, {"msg": "hello 2"}]'>
        <li>
            <template>
                <span>{{msg}}</span>
            </template>
        </li>
    </li-bid>
    <li>footer</li>
</ul>

produces:

<ul>
    <li>header</li>
    <li-bid template-id=innerTemplate list='[{"msg": "hello 1"}, {"msg": "hello 2"}]' style="display:none;">
        <template>
            <span>{{msg}}</span>
        </template>
    </li-bid>
    <li>
        <span>hello 1</span>
    </li>
    <li>
        <span>hello 2</span>
    </li>    
    <li>footer</li>
</ul>

Sample syntax II [TODO]

<template id=message>
    <span>{{msg}}</span>
</template>
<ul>
    <li>header</li>
    <li-bid from=message list='[{"msg": "hello 1"}, {"msg": "hello 2"}]'></li-bid>
    <li>footer</li>
</ul>

Same results as before.

Sample syntax III [TODO]

<ul>
    <li><span id=message><a href="messages/all" data-bind='{"TextContent": "msg", "href": "messages/{{msgId}}"}'>Message of the day</a></span></li>
    <li-bid from=message bind-to=data-src bind-href-to= list='[{"msg": "hello 1", "msgId": 402203}, {"msg": "hello 2", "msgId": 204452}]'></li-bid>
    <li>Brought to you by Foot Blocker</li>
</ul>

produces:

<ul>
    <li>Message of the day</li>
    <li-bid from=message bind-textContent-to=data-target list='[{"msg": "hello 1"}, {"msg": "hello 2"}]' style="display:none;"></li-bid>
    <li>
        <span>hello 1</span>
    </li>
    <li>
        <span>hello 2</span>
    </li>    
    <li>Brought to you by Foot Blocker</li>
</ul>

In this case, we've used the "from" attribute, which we treat as an ID / property to "UpShadowSearch" for. Because the id matches a span element, not an HTML Template Element, the span element is "templified" in memory:

<template>
    <span>{{msg}}</span>
</template>

The bind-to attribute indicates to find all matching attributes, and replace the inner content with a moustache placeholder.

Sample syntax III

<template id=light-children>
    <span>{{msg}}</span>
</template>
<ul>
    <li>header</li>
    <li-bid id=libid template-map-ids='{"li":"/light-children"}'></li-bid>
    <li>footer</li>
</ul>


<script>
    libid.list = [
        {msg: 'hello 1'},
        {msg: 'hello 2'},
        {msg: 'hello 3'},
        {msg: 'hello 4'}
    ];
    setTimeout(() => {
        libid.list = [
            {msg: 'hello 3'},
            {msg: 'hello 4'}
        ];
        setTimeout(() => {
            libid.list = [
                {msg: 'hello 1'},
                {msg: 'hello 2'},
                {msg: 'hello 3'},
                {msg: 'hello 4'}
            ];
        }, 10000);
    }, 10000);
</script>

Sample syntax III [TODO]

Binding to a server-rendered / editable datastream.

<template id=light-children>
    <span>{{msg}}</span>
</template>
<ul>
    <li>header</li>
    <li-bid id=libid template-map-ids='{"li":"/light-children"}'>
        <templ-model>
            <obj-ml name=msg>hello 1</obj-ml>
            <obj-ml name=msg>hello 2</obj-ml>
            <obj-ml name=msg>hello 3</obj-ml>
            <obj-ml name=msg>hello 4</obj-ml>
        </templ-model>
        <p-u on=value-changed to=libid prop=list val=target.value clone></p-u>
    </li-bid>
    <li>footer</li>
</ul>

Viewing the component locally

  1. Install git
  2. Clone or fork repo https://github.com/bahrus/repetir
  3. Install node
  4. Open command window from cloned location of step 2.
  5. Run command "npm run install"
  6. Run command "npm run serve"
  7. Open browser to http://localhost:3030/demo/dev