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

@imerss/inat-components-utils

v1.2.0

Published

Writes the data files which the components of [@imerss/inat-components](https://github.com/IMERSS/inat-components) read with their `"url"` data source. It requests each from iNaturalist's API in turn, a second apart to keep within iNaturalist's limits, an

Readme

@imerss/inat-components-utils

Writes the data files which the components of @imerss/inat-components read with their "url" data source. It requests each from iNaturalist's API in turn, a second apart to keep within iNaturalist's limits, and writes it as a small JSON file holding just what the components show. See How it works for why.

Usage

npm install @imerss/inat-components-utils

Write a short Node script, and run it on a schedule - e.g. every 10 or 15 minutes, with cron - so that the files stay fresh. Write the files into a folder which your site serves, at the URL you give TaxonPanel as dataSourceBaseUrl.

const { generate } = require("@imerss/inat-components-utils");

const config = {
    taxa: [{ id: 47157, str: "leps" }],
    places: [{ id: 7085, str: "bc" }],
    features: {
        recentObservations: { numResults: 100 },
        commonTaxa: { numResults: 100, numYears: 10 },
        favourites: { numResults: 100, numYears: 10 },
        stats: { numTopObservers: 10, numYears: 10 }
    }
};

generate(config, "/var/www/my-site/inat");

The config

| Setting | Description | | --- | --- | | taxa | The taxa, each { id, str }, as TaxonPanel's taxon. Files are written for each taxon in each place. | | places | The places, each { id, str }, as TaxonPanel's place. | | project | Optional - { id, str }, as TaxonPanel's project. It may stand in place of taxa and places, or be narrowed by each of them. | | features | The settings of each feature, keyed by feature as above, or as the array of TaxonPanel's features, so that one config may serve both. |

The settings of each feature are those of TaxonPanel's, and each has its default there: numResults for all but stats, numYears for all but recentObservations, and numTopObservers for stats. Files are written for every feature, for all years together and for each of the last numYears years, matching the years which TaxonPanel offers. Give each feature the same settings as your TaxonPanel, so that each tab finds the files it asks for.

The files' names are listed in the components' documentation.

generate returns a promise which resolves once every file is written, and shows its progress on the console. A file which could not be fetched is logged and skipped, leaving its previous version in place. The script was first exported as process, which remains as another name for generate.