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 🙏

© 2025 – Pkg Stats / Ryan Hefner

utilzed

v0.2.5

Published

Despite lodash and many functionalities out there, there are still some utilities didn't achive what I intend to have.

Downloads

21

Readme

JS Library (utilzed)

Despite lodash and many functionalities out there, there are still some utilities didn't achive what I intend to have.

Install:

npm install utilzed

Upgrade:

# set specific version
npm install [email protected]

Usage

This library has both flow and ts declarations

For compiled library:

import utilzed from 'utilzed';

// for promise module and functions
const { waitForTrue, sleep } = utilzed.promise;

// for timeconvert module
const { TimeConverter, Format } = utilzed.timeconvert;

// If index module getting too big for the size you can import specific module
import timeconvert from 'utilzed/dist/timeconvert';

Important for pure ES6 (require)

// If uses require function you will need to use .default
// For import in typescript or flow, this is not required

const utilzed = require('utilzed').default;
const timeconvert = require('utilzed/dist/timeconvert').default;

Library Functions:

This library has jsdoc generated comment.

Promise Related:

waitForTrue

In case you might be polling for a condition before proceed:

import utilzed from 'utilzed'
// import waitForTrue from 'utilzed/dist/promise/waitForTrue'

const checkCondition = async () => (await somePollCheckFunction());

// this will waitForTrue checkCondition to be true
// checkCondition will be called every 100ms
const success = await utilzed.waitForTrue(100, checkCondition, 1000);

if (success) {
  // Meaning checkCondition function returns true before 1000 ms
  return;
}

// meaning after 1000ms the checkCondition returns false still
// handle unsuccessful poll for true

sleep

await sleep(100) will await for 100ms before proceed to next function

import utilzed from 'utilzed'

await utilzed.sleep(100);

// will proceed after sleep for 100 ms

Validation Related:

isEmptyOrZero

This will return true if object is empty, string is empty, number is 0 or array is empty

import utilzed from 'utilzed'

// if lodash isEmpty the following will return true
utilzed.isEmptyOrZero(100); // returns false
utilzed.isEmptyOrZero(0); // returns true

versionCheck

This module checks if the versioning meets the condition

import utilzed from 'utilzed'

const { OPERATORS, isVersionValid } = utilzed.versionCheck

// this will return true
isVersionValid('v2.1.1', OPERATORS.MORE_THAN_EQUAL, 'v1.1.1')

// this will return false
isVersionValid('v1.1.1', OPERATORS.LESS_THAN, 'v1.1.1')

Others

TimeConverter

Convert time value without mathematical headache

import utilzed from 'utilzed'

// Can use destructured assignment
const { TimeConverter, Format } = utilzed.timeconvert;

// returns 123000 (target in ms) from 123 (seconds)
TimeConverter.target(Format.MILISECONDS).from(Format.SECONDS, 123);

TODO: host it on github pages

This Library is Generated From create-tslibs

Can refer to create-tslibs

To run development following will be recommended:

Use VS Code as IDE:

The library template is already setup with vscode settings for auto format.

Ensure the following plugins are enabled:

Optional but Recommended: