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

@internetderdinge/web

v1.229.26

Published

Shared web library for functionality used by both memo-web and paperlesspaper web apps.

Readme

@internetderdinge/web

Shared web library for functionality used by both memo-web and paperlesspaper web apps.

What this package contains

  • Shared utility functions (string, date, URL, object helpers)
  • Shared React hooks (device, touch, visibility, media)
  • Shared loading/reset state primitives for app-level global loading overlays
  • Shared loading/reset UI + context provider for auth/route guards

Install

yarn add @internetderdinge/web

Development

yarn build
yarn dev

Scripts

  • yarn build - build to dist/
  • yarn dev - watch mode

Exports

Utils

  • capitalize
  • capitalizeFirstLetter
  • flatten
  • formatDistanceShort
  • distanceInDaysFunc
  • mediaQueries
  • pickValues
  • roleList
  • scrollToTop
  • urlToken
  • devAppsBaseReplacement
  • resolvePossiblyRelativeUrl

Hooks

  • useContainerDimensions
  • useIsDesktop
  • useIsPrint
  • useIsIos
  • useLocaleDate
  • useLongPress
  • useTouch
  • useVisibility
  • useSyncLoadingWithResetState

Loading/Reset shared values

  • defaultLoadingWithResetText
  • hiddenLoadingWithResetState
  • LoadingWithResetState (type)
  • LoadingWithResetStateSetter (type)

Loading/Reset components

  • LoadingWithReset
  • LoadingWithResetProvider
  • useLoadingWithResetContext

External re-export

  • useMediaQuery from react-responsive

Global loading/reset integration

The package now includes both state helpers and the shared loader UI/provider. Apps can use LoadingWithResetProvider directly and drive visibility/text through useSyncLoadingWithResetState.

Typical flow:

  1. Wrap router/app content in LoadingWithResetProvider.
  2. Route guards/screens call useLoadingWithResetContext() and pass the setter to useSyncLoadingWithResetState(...).
  3. Return null while route auth/token checks are pending so the global loader is shown.

Provider setup

import { LoadingWithResetProvider } from "@internetderdinge/web";

<LoadingWithResetProvider
  onLogout={logout}
  resetDelayMs={3000}
  resetLabel="Reset local data"
  appVersion={import.meta.env.REACT_APP_VERSION}
>
  {children}
</LoadingWithResetProvider>;

Provider props:

  • onLogout?: () => Promise<void> | void
  • resetDelayMs?: number (default: 15000)
  • resetLabel?: React.ReactNode (default: Reset local data)
  • appVersion?: React.ReactNode
  • logoutPath?: string (default: /logout)

Example route usage:

import {
  defaultLoadingWithResetText,
  useLoadingWithResetContext,
  useSyncLoadingWithResetState,
} from "@internetderdinge/web";

const { setLoadingWithResetState } = useLoadingWithResetContext();

useSyncLoadingWithResetState({
  isVisible: showLoading,
  setLoadingWithResetState,
  ...defaultLoadingWithResetText,
});

Example login callback usage:

import { useSyncLoadingWithResetState } from "@internetderdinge/web";

useSyncLoadingWithResetState({
  isVisible: isProcessingLogin,
  setLoadingWithResetState,
  title: "Processing login",
  message: isDelayedLoading
    ? "Authorization is getting processed"
    : "You will be redirected",
});

Local package testing (yalc)

When testing unpublished changes in another repo:

# inside this package
yalc publish

# inside consumer package
yalc add @internetderdinge/web
yarn install