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

@fullstackcraftllc/react-use-please-stay

v1.0.1

Published

A fun React hook that animates the document title and/or favicon when focus from the page is lost.

Downloads

4

Readme

react-use-please-stay

A fun React hook that animates the document title and/or favicon when focus from the page is lost.

Parameters

Parameters for usePleaseStay are passed via an object of type UsePleaseStayOptions (click me!).

| Name | Type | Default Value | Description | | ------------------ | -------------------------- | --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | titles | ArrayOfOneOrMore<string> | Required, an array of strings with at least one value | The titles to iterate through. Note that with certain AnimationType only the first title is taken. | | animationType | AnimationType | AnimationType.LOOP | The animation type on the title. There are three types:- AnimationType.LOOP: each title in the titles is iterated sequentially- AnimationType.CASCADE: Only the first title in the titles array is taken, and the title is modified by adding one letter at a time- AnimationType.MARQUEE - only the first title in the titles array is taken, and the title animates across the tab in a marquee fashion | | faviconLinks | ArrayOfTwoOrMore<string> | undefined | The desired favicon links to animate through | | interval | number | 500 | The rate in milliseconds at which the title and favicon change occurs | | shouldAlwaysPlay | boolean | false | The rate in milliseconds at which the title and favicon change occurs |

Warning Logs

This hook will display various warning messages if the NODE_ENV environment variable is set to "development". These messages are a helpful reminder in development only, and will not be displayed in production.