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

lucos_search_component

v2.0.12

Published

Web Components for searching lucOS data

Readme

lucos_search_component

Web Component for searching lucOS data

Technologies used

  • ES Modules
  • Web Components

Usage

Include the following in your javascript:

import 'lucos_search_component';

Search

Searches all items available in lucos_arachne

Include the following in your html:

<span is="lucos-search">
	<select multiple>
		<option selected>https://contacts.l42.eu/people/2</option>
		<option selected>https://eolas.l42.eu/metadata/place/2/</option>
		<option selected>https://media-metadata.l42.eu/tracks/13713</option>
	</select>
</span>

Selected options use the item's URI as their value.

The following attributes can be added to the lucos-search span:

  • data-api-key [required] — a valid API key for the production instance of lucos_arachne, as generated by lucos_creds.
  • data-types — A comma separated list of item types to search for (defaults to all types).
  • data-exclude-types — A comma separated list of item types to exclude from the search (ignored if data-types is set).
  • data-no-lang — The name to give for a "no language" option. If set, a special entry with the URI https://eolas.l42.eu/metadata/language/zxx/ is added to the top of the list. Only meaningful when data-types="Language".
  • data-common — A comma separated list of item URIs to pin in a "Common" group at the top of the list, above the normal results. Only meaningful when data-types="Language".
  • data-preload — If present, all options are loaded upfront rather than fetched on search. Suitable for small, finite datasets such as languages.

Language selector

To use lucos-search as a language selector (the replacement for the removed lucos-lang component):

<span is="lucos-search"
    data-api-key="..."
    data-types="Language"
    data-no-lang="Instrumental / No Language"
    data-common="https://eolas.l42.eu/metadata/language/en/,https://eolas.l42.eu/metadata/language/ga/,https://eolas.l42.eu/metadata/language/zxx/"
    data-preload>
    <select multiple>
        <option selected value="https://eolas.l42.eu/metadata/language/en/">English</option>
    </select>
</span>

Selected options use the language's full URI as their value (e.g. https://eolas.l42.eu/metadata/language/en/).

Migrating from lucos-lang

lucos-lang has been removed in v2.0.0. Use lucos-search with data-types="Language" instead.

Key differences:

  • Values are URIs, not ISO codes. lucos-lang stored ISO 639 codes (e.g. en, ga). lucos-search stores full URIs (e.g. https://eolas.l42.eu/metadata/language/en/). Update any stored values and form handling accordingly.
  • data-common takes URIs, not codes. Pass full language URIs instead of ISO codes.
  • data-no-lang works the same way. The "no language" entry is added with URI https://eolas.l42.eu/metadata/language/zxx/.

Manual Testing

Expects a .env file in the root directory with the following environment variables:

  • KEY_LUCOS_ARACHNE - an API for lucos_arachne, as set by lucos_creds

(The .env file can be automatically generated using the command scp -P 2202 "creds.l42.eu:${PWD##*/}/development/.env" ., assuming the correct credentials are in place)

Run:

npm run example

This uses webpack to build the javascript and then opens a html page which includes the web component