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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@corbie.dev/lorem-image

v1.0.1

Published

Create a placehodler image with custom color and dimensions

Readme

About The Project

You might or might not know about https://corbie.dev but one thing you can do there, is to create placehodler images. And here we go with that. I've taken the logic out and put it into an NPM package for you to use.

Install

npm i @corbie.dev/lorem-image

How to use?

import cbLoremImage from '@corbie.dev/lorem-image';

The prefix cb is short for corbie to prevent clashes with other convert libaries that you might use. But the name is up to you and cbLoremImage is only an example usage. If you can't decide on any background you can simply pass "random" instead of a color and you'll receive a random color background like this:

With the import in place you can already use the libary like this:

cbLoremImage.svg(1200, 800, '#FFdd01'); // returns image 1200 by 800px using the default background
cbLoremImage.svg(600, 200); // returns image using the default background
cbLoremImage.svg(800, '#FFdd01'); // returns a square image 800 by 800px with #ffdd01 as background
cbLoremImage.svg(900); // returns a square image 900 by 900px using the default background
cbLoremImage.svg(400, 300, 'random'); // returns an image 400px by 300px with a random* background
cbLoremImage.svg(1600, 'random'); // returns a square image 1600 by 1600px with a random* background

NOTE: cbLoremImage is still an example but if you change its name in the import you need to use that name here aswell
*) random is limited to a couple of colors I chose to be fitting, so no colors that commonly would be seen as unfitting will be generated

What comes in and what comes out?

| param1 | param2 (optional) | param3 (optional) | output | | -------------- | ----------------- | ------------------ | ------------------ | | width (number) | height (number) | color (hex string) | data:image/svg+xml |

NOTE: For the color the leading # (hash) is mandatory - at least for now

Contact

Michael Holzer - @linkedin - [email protected]

Project Link: https://corbie.dev

Acknowledgments

totaltypescript.com - Provided some great hints and tricks