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

@fandridis/teeheo

v0.5.0

Published

A group of useful random-generators in one simple javascript library

Readme

Teeheo

Teeheo is a small library for generating all kind of pseudo-random numbers and strings. With teeheo, you can easily generate integers, floats, alphanumerics and uuids.

INSTALL

There are 3 ways to install the library.

  1. With a script
<script src="https://cdn.jsdelivr.net/npm/@fandridis/[email protected]/index.js"></script>
  1. As an npm package (TBA)

  2. (TBA)

METHODS

1. Integers

With teeheo.int(min, max) you can generate random integers between a desired range.

| Parameters | Description | | ----------- | ----------- | | min | (Optional) Number: The lower limit - inclusive | | max | (Optional) Number: The higher limit - inclusive |

When two parameters are passed, they act as a range.

Example:

teeheo.int(5, 20) // Will return a integer between 5 and 20

If only one parameter is passed, it will return:

  • an integer from 0 to the parameter, if the parameter is positive
  • an integer from the parameter to 0, if the parameter is negative

Example:

teeheo.int(20) // Will return a integer between 0 and 20
teeheo.int(-10) // Will return a integer between -10 and 0

If no parameters are passed, it will act like a coinflip and return either 0 or 1 Example:

teeheo.int() // Will return 0 or 1

2. Floats

Similar to integers, with teeheo.float(min, max, options) you can generate random floats between a desired range. You can also limit the amount of decimal points returned.

| Parameters | Description | | ----------- | ----------- | | min | (Optional) Number: The lower limit - inclusive | | max | (Optional) Number: The higher limit - inclusive | | options | (Optional) Object: To specify the maximum amount of decimals |

When two parameters are passed, they act as the range. Example:

teeheo.float(5, 20) // Will return a float between 5 and 20

If only one parameter is passed, it will return:

  • a float from 0 to the parameter, if the parameter is positive
  • a float from the parameter to 0, if the parameter is negative

Example:

teeheo.float(20) // Will return a float between 0 and 20
teeheo.float(-10) // Will return a float between -10 and 0

If no parameters are passed, it will return a random float from 0 to 1 Example:

teeheo.float() // Will return a float between 0 and 1 

You can pass an object as a third parameter to state how many decimals should be returned

teeheo.float(5, 10, { decimals: 3 }) // Will return a random float between 5 and 10 with 3 decimals. ex: 7.348

3. Strings

With teeheo.str(length, options) you can generate random floats between a desired range. You can also limit the amount of decimal points returned. By default, the generated string will include lowercase letters, uppercase letters and numbers.

| Parameters | Description | | ----------- | ----------- | | length | Number: The character length of the generated string | | options | (Optional) Object: To configure the list of characters to be included |

The options can be:

| Option | Description | | ----------- | ----------- | | excludeUpper | Boolean: Excludes uppercase letters | | excludeLower | Boolean: Excludes lowercase letters | | excludeNumbers | Boolean: Excludes numbers | | excludeZero | Boolean: Excludes the number 0 | | customList | String: To specify the exact characters to use |

Examples:

teeheo.str(9) // ex: abcABC012
teeheo.str(9, { excludeUpper: true }) // ex: abcabc012
teeheo.str(9, { excludeLower: true }) // ex: ABCABC012
teeheo.str(9, { excludeNumbers: true }) // ex: abcABCabc
teeheo.str(9, { excludeZero: true }) // ex: abcABC123
teeheo.str(9, { customList: 'xy' }) // ex: xyxxyyxxx

4. UUID

With teeheo.uuid4() you can generate random uuid4 string

Example:

teeheo.uuid4() // ex: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx