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

cb-lazy-images

v0.3.2

Published

Super simple vanilla JS lazy loading of images, including srcset

Readme

lazy-images

Super simple vanilla JS lazy loading of images, including srcset.

Build Status

Installation

Add the lazyImages script to your page

<script src="path/to/LazyImages.min.js" type="text/javascript"></script>

Init the lazyImages class and run the loadImages function

var lazy = new LazyImages();
lazy.loadImages();

Add the lazy and src/srcset data attributes to images, and add the same image in a noscript tag for users without javascript

<img data-src="path/to/image.jpg" data-srcset="path/to/[email protected] 2x" data-lazy="true" alt="">
<noscript><img src="path/to/image.jpg" srcset="path/to/[email protected] 2x" alt=""></noscript>

Build Instructions

Install dependencies

$ npm install

Build/watch commands

$ npm run build
$ npm run watch

Production build

$ npm run prod

Eslint check and fix

$ npm run lint
$ npm run lintfix

Changelog

0.3.2

  • e49f765 Change viewport check to only need the top left of the image.
  • d4df7d5 Fix changelog format.

0.3.1

  • 9ff8493 Fix capitalization of source file.
  • 6d71677 Update changelog.

0.3.0

  • 63bad89 Fix issue with src being unset, moved from complete class to data attribute, capitalize class.
  • 17a35b4 Add dist to eslintignore and add new capitalization to readme.
  • 9213623 Updating webpack configs with new class capitalization.
  • 9bf1f77 Updating changelog.

0.2.2

  • f5ae6d9 Build dist files after 0.2.1 fixes.

0.2.1

  • 490d194 Fix assignment of selector and removal of data attributes.
  • 490d194 Updating readme with changelog.

0.2.0

  • 75e065e Fixing issue with ES6 transpiling and proper exporting -- no more global var.
  • 262a8a4 Change package name for npm.
  • 93f2233 Updating readme with new install instructions.
  • 1bccf2c Switching to using a global variable for export.
  • b854b22 Update README with link to TravisCI.
  • d468267 Splitting source into modules, removing setTimeout() in favour of promises, commenting code, adding to readme.
  • 41ff8f1 Rename webpack production config file.
  • 709e8b5 Adding build status to readme.
  • a37378f Adding eslint.
  • e0f505c Adding .travis.yml for CI.

0.1.0

  • b48af46 Adding project files and initial plugin code.
  • bdcfc26 Initial commit