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

super-utilz

v2.0.0

Published

Private Utils

Readme

super-utilz ⚡

🚨 WARNING 🚨

This NPM package is just a collection of small helper functions. Don't use it unless you really need it. 🛑 **
This package offers the following function categories:
Each category is exported from a respective folder. 📁

The below functions are all exported from the super-utilz folder. Each function is exported from a folder.

export {
        createDate,
        createDateFromNowWithOffset,
        fsDeleteDirectory,
        fsDeleteFile,
        downloadFileFromUrl,
        fsReadJSONFile,
        fsWriteJsonToFile,
        fsWriteToFile,
        fsGetFile,
        fsReadFile,
        generateRandomNumberBetween,
        randomStringOfLength,
        genOpensslRand,
    } from "@/util";
export { isValidIpAddress, isValidJson, isValidUrl } from "@/isValid";
export { bytesToMb, epochToDate } from "@/convert";
export * from "@/helpers";

Utility Functions 🛠️

  • createDate: Convert date to formatted string 📅
  • createDateFromNowWithOffset: Create date with offset 🕒
  • fsDeleteDirectory: Delete directory 🗑️
  • fsDeleteFile: Delete file 🗑️

Validation Helpers ✔️

  • isValidIpAddress: Validate IP address 🌐
  • isValidJson: Validate JSON 📝
  • isValidUrl: Validate URL 🔗

Conversion Utilities 🔄

  • bytesToMb: Convert bytes to megabytes 💾
  • epochToDate: Transform epoch time to date ⏰

Miscellaneous Helpers 🎩

  • downloadFileFromUrl: Download file from URL ⬇️
  • fsReadJSONFile: Read JSON file 📂
  • fsWriteJsonToFile: Write JSON to file 📝
  • fsWriteToFile: Write to file 📝

So there you have it. A package you probably don't need, but hey, it's here if you want it. Use it wisely, or don't use it at all. Either way, we won't judge. 🎉

# Installation
# To install `super-utilz`, you can use npm, yarn, or pnpm.

npm install super-utilz
# or
yarn add super-utilz
# or
pnpm add super-utilz

Usage

Once installed, you can use the functions from super-utilz in your Node.js project:

const { createDateFromNowWithOffset, isValidIpAddress } = require('super-utilz');

// Example usage
const date = createDateFromNowWithOffset(5);
console.log(date); // Result: will be a date in the past 5 days

const ip = '192.168.1.1';
if (isValidIpAddress(ip)) {
  console.log('Valid IP address!');
} else {
  console.log('Invalid IP address!');
}

API Documentation

API Documentation

Contributing

Contributions are welcome! If you find any bugs or have suggestions for improvement, please open an issue or submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Changelog

  • All changes are tracked in the RELEASES file.
    • You can track changes in the releases update from github.
    • Note that this is not the same as the changelog.
    • We do not provide changelog for this package.
    • Also we not interested in support for this package.

Version History

  • v1.1.0 And Later:

    • No more updates to README.md and CHANGELOG. 🥲
    • Only very major changes will be listed. NOT SURE
  • v1.0.1 (2024-03-30):

    • Added readme and setup instructions
  • v1.0.0 (2024-03-26):

    • Initial release 🎉

Credits

Support

If you encounter any issues or need assistance, please feel free to open an issue on GitHub.