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 🙏

© 2024 – Pkg Stats / Ryan Hefner

dino-sprint-namer

v2.1.2

Published

Provides a dinosaur sprint name in the format of `<adjective> <dinosaur>`.

Downloads

9

Readme

Dino Sprint Namer

NPM Version Node Publish Node Build Code Coverage License

Provides a dinosaur sprint name in the format of <adjective> <dinosaur>.

Installation

npm install --global dino-sprint-namer

Usage

Try CLI

npx dino-sprint-namer (a)

CLI

To use, invoke the CLI tool via:

dino-sprint-namer (a)

Module

const dinos = require('dino-sprint-namer');

console.log('random dino: ', dinos.random());
console.log('dino that starts with a: ', dinos.startsWith('a'));

Specifying Starting Letter

An optional starting letter can be specified as an argument. This will cause both the adjective (first word) and dinosaur name to start with the corresponding letter.

Updating

To rebuild the array of dinosaurs from dinos.js:

  • navigate to the A-Z listing
    • this must be done in a browser from the site, as they use the appropriate CORS and CSP headers to prevent fetching from another origin
  • in js console, execute:
    var list = document.querySelector('.dinosaurfilter--container');
    var dinoList = Array.from(list.querySelectorAll('p.dinosaurfilter--name')).map(el => el.innerText.trim());
    var dinoAr = Array.from(list.querySelectorAll('p.dinosaurfilter--name')).map(el => {
      return {
        name: el.innerText.trim(),
        url: el.parentElement.href
      };
    });
    console.log(dinoAr);

Images

The dinos.js array includes a reference to the dinosaur specific page. From that page, the image can be grabbed as such:

var article = document.querySelector('dinosaur--container');
var img = article.querySelector('img.dinosaur--image');

A future feature is to include an image from the resulting:

  • top clipart search result (a la "I'm feeling lucky" from Google) for the adjective
  • the selected dinosaur

Inspiration

To eliminate the madness of semi-randomly selecting dinosaur names as sprint names, this should provide a consistent naming scheme and ability to provision the starting letter, for progression.

Credits

I'm grabbing the list of dinosaurs from The Natural History Museum of the UK.

License

MIT