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

strumenti

v1.0.9

Published

Useful utility functions

Downloads

12

Readme

🛠️ Strumenti

An ever-growing collection of useful utility functions.

There's no need to reinvent the wheel…!

Functions

bool

Converts a given value to its Boolean equivalent

calculatePixelsFromPoints

Converts a given 'pt' value to 'px'

copyStringToClipboard

Adds the given input to the user's clipboard

delay

Delays the running of the next function

generateUUID

Generates RFC4122 guid

getCssValue

Finds the value of a given element's given css property

getFileExtension

Returns the file extension from the given path

getFilename

Returns the filename from the given path

getKeyByValue

Finds the first key matching the given value in a given object

hasTrailingSlash

Detects whether the given string ends in a / character

htmlEntities

Replaces problematic characters with HTML Entity equivalents

humanReadableDate

Returns a date as a string value appropriate to the host environment's current locale

humanReadableDateTime

Returns a date and time as a string value appropriate to the host environment's current locale

humanReadableFilesize

Converts a given filesize in bytes to a human-readable string

humanReadableNumber

Converts a number to a string by using the current or specified locale

Params

  1. value: The number to convert
  2. lang (Optional): The language to use when converting
  3. compact (Optional): Whether to display short-form or long form

Examples

humanReadableNumber(12345.67) // 12,345.67
humanReadableNumber(12345.67, 'de') // 12.345,67
humanReadableNumber(12345.67, null, true) // 123K

indexOfMax

Provides the index of the largest number in an array

numberizeValue

Removes the units from a given string value

objectsMatch

Compares the given objects

salt

Provides a unique-ish identifier

slugify

Converts string to RFC 952 Hostname format

sortObjectByKeyAlphabetically

Sorts the given object's keys alphabetically

stripLogs

Prevents console logging in the provided environment

toCamelCase

Returns the given string in camelCase format

toTitleCase

Capitalizes The First Letter Of Each Word In A Given String

trimTrailingSlash

Removes / character from a given string

whichMotionEvent

Detects the end of a css animation or transition based on a given element's css