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

bettertools-js

v1.0.3

Published

Some Small js function to make it easy to work

Readme

BetterTools

Some basic tools to make your project easier and better! All of the function are not dependent for each other and can run by it self. That mean you can just copy the code of one of the function that you need without downloading all the function. And some will have comments to explain how it works

Setup

First Run

git clone https://github.com/GamerXR-637/BetterTools-js.git

in you terminal or download the file BetterTools

Second, in your main file, add:

const "name" = require("File Path to the "BetterTools" folder");
// Name can be anything
//or
const { "Functions you want to use" } = require("File Path to the "BetterTools" folder");
// This is better to allow you to use only certain functions
// [See at the end for a list of function]

npm

npm i bettertools-js
const { FunctionName } = require("bettertools-js/BetterTools");

// or

const "name" = require("bettertools-js/BetterTools");

List of Function

If you use the first option, then the function should be called as Due to you are using this option you are importing all the function.

"name".FunctionName(parameters)

Else, this works fine with the second option You will be importing the function that you only need

FunctionName(parameters)
// Only the function that you are calling

Examples and Usage

betterUUID(number)

// betterUUID(number)
// Allows you to have a custom-made UUID based on your needs
// Input: Number how many sections to have ( Default: 3 )
  let uuid = betterUUID()
  console.log(uuid)
// Output: 7Uyzvv-ZXhsvFp-K9025qqGPG

Randcolor(number, hash)

// Randcolor(number, hash)
// Allows you to get any amount of random colors with the # or out
// Input:
// number / how many color to be returned ( Default: 1 )
// hash / True or False
  let color = Randcolor(3, true)
  console.log(color)
// Output: #eba3b5,#5c9f33,#4c7bd5

  let color_no_hash = Randcolor(3, false)
  console.log(color_no_hash)
// Output: eba3b5,5c9f33,4c7bd5

seededRandom(seed)

console.log(seededRandom(37))
// Will return 0.0002615799930373639

Functions Names

Math

cylinderVolume - Calculate the volume of a cylinder | Input: [radius (Default: 3), pi (Default: true), hight (Default: 2)] multiplyPoly - Calculate the product of 2 polynomials | Input: [poly1 (Array), poly2 (Array)] pointSlope - Calculate the y=mx+b formula from 2 point | Input: [x1, y1, x2, y2] circleArea - Calculate the area of a circle | Input: [radius (Default: 3), pi (Default: true)] randomInt - Get a random Integer | Input: [number (Default: 10)] quadratic - Get the zeros of a quadratic formula | Input: [a (Default: 1), b (Default: 4), c (Default: 3)] triangle - Calculate the area of a triangle | Input: [legOne (Default: 3), legTwo (Default: 4)] average - Calculate the average of a array | Input: [numbers (Array)] inRange - Get if a number is in range | Input: [x (Default: 0), y (Default: 10), value (Default: 1)] percent - Calculate the percentage of a ratio | Input: [numerator (Default: 3), denominator (Default: 4)] median - Calculate the median of a array | Input: [numbers (Array)] pointY - Calculates where the p0int is when y = n | Input: [x (Default: 3), y (Default: 4), n (Default: 1)] pointX - Calculates where the p0int is when x = n | Input: [x (Default: 3), y (Default: 4), n (Default: 1)] temp - Calculate the temperature conversion | Input: [n, from, to]

Text

binary - Turn text into Binary | Input: [text] morseCode - Turn text into Morse Code | Input: [text] truncate - Cut the text with "..." | Input: [text, number (Default: 5)]

Tools

colorTerminal -> Logs in color | Input: [text, color] seededRandom -> Get a random number based on a seed | Input: [seed (Default: 37)] seededRandom -> Get a random number based on a seed with Math.random() | Input: [seed (Default: 37)] betterUUID -> Create a custom UUID | Input: [number (Default: 3)] Randcolor -> Get random color | Input: [number (Default: 1), hash (Default: true)] rgbtohex -> Convert RGB to Hex | Input: [r, g, b] sleep -> Cause a the code to pause for n | Input: [seconds (Default: 10)]

Useless

cat - Just Cat | Input: [text] load - Create a loading sign | Input: [message, n]