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

inadequado

v0.5.5

Published

For the most part this package is for personal use, but you can use it too.

Readme

For the most part this package is for personal use, but you can use it too :)

Version License

Currently implemented: LocalStorage KeyTracking Prototypes Tools

Already done, but no instructions.

WebObserver


namespace LocalStorage

Allows you to use LocalStorage conveniently.

Examples

LocalStorage.setItem("key", 1);
LocalStorage.getItem("key"); // 1 (number)

LocalStorage.setItem("key", "1");
LocalStorage.getItem("key"); // "1" (string)

LocalStorage.setItem("key", { a: "A" });
LocalStorage.getItem("key"); // { a: "A" } (object)

class A {}
LocalStorage.setItem("key", { a: new A() });
LocalStorage.getItem("key"); // { a: {} } (object)

In the case of class A {}, the information that it is an instance of class A will be lost when the object is received.

Types

type localStorageTypes = number | string | (number | string[]) | object;
export function getItem<T extends localStorageTypes>(key: string): T | null;

export function setItem(key: string, value: localStorageTypes): void;

namespace KeyTracking

Helps you keep track of keystrokes and perform functions when certain combinations are pressed.

Examples

KeyTracking.createCombination("KeyH", () => console.log("Hello"));

KeyTracking.createCombination(["ControlLeft", "KeyS"], () => console.log("Save"));


KeyTracking.deleteCombination(["ControlLeft", "KeyS"]);

It is not recommended to create combinations of more than 3 keys.


namespace Prototypes

Expansion for primitive types

How to use

import { Prototypes } from "inadequado/dist/Tools";

Prototypes.Array();
Prototypes.String();
// ... OR ...
Prototypes.All();

List of new methods for String:

/** Removes HTML tags from the string */
stripTags(): this;
/** Converts special characters into HTML entities */
htmlspecialchars(remquotes?: boolean): this;

List of new methods for Array:

/** Shuffle the array */
shuffle(): T[];
/** Get random elements from an array.
 * @module Inadequado
 */
randomElements(count: number, prohibitRepetition?: boolean): T[];
randomElements(count?: 1): T;

Tools

Contains small and useful functionality

random(100, true) // 100%, be true
random(50, true) // 50%, be true | null,
random(0, true) // 0%, be null
randomRange(100, 500) // number from 100 to 500