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

tellmeabout

v1.0.1

Published

A function that can take in any variable or value, and tell you everything about it

Readme

TellMeAbout

Table of Contents

Description

TellMeAbout is a powerful backend/Node.js JavaScript/TypeScript utility that allows you to plug in any variable or value and automatically infers as much information about it as possible. Whether you're dealing with objects, arrays, strings, numbers, or even more complex data types, TellMeAbout provides insights and details to help you understand your data better. Perfect for debugging, data analysis, or just satisfying your curiosity about what a variable holds, this tool is a must-have for any developer looking to dive deeper into their code.

Installation

Install the npm package! In the root directory of your code base, open your IDE's integrated terminal and enter npm install tellmeabout. To stay current with the most recent version, enter npm install tellmeabout@latest. And that's it!

Usage

The TellMeAbout function is a versatile tool that provides detailed information about a given input. It accepts two optional parameters:

input: The value or variable you want to analyze. This can be of any type (string, number, object, array, etc.).

variableName: A string representing the name of the variable (if applicable). This helps distinguish whether the input is a variable or just a value.

This function returns a string, and it can be readily viewed with console.log.

What It Does

  • Type Detection: The function determines the data type of the input and provides relevant information such as length (for strings), factors and prime status (for numbers), and keys (for objects).

  • Detailed Analysis: Depending on the input type, the function checks for specific characteristics:

  • Strings: Length and palindrome detection.

  • Numbers: Type (integer, float, BigInt), sign, parity (odd/even), prime status, and whether it’s a perfect square or cube.

  • Objects/Arrays: Key and length analysis.

  • Functions: Function type (regular or arrow), the number of expected parameters, and in some cases - the entire code it contains.

  • Falsy/Truthy Check: The function also determines if the input is truthy or falsy.

The function returns a colored, detailed report about the input, making it useful for debugging, data analysis, or simply understanding more about the variables and values in your code.

How To Use It

After installing the package, you'll want to create a reference to it using the backend specific require() syntax like so:

const {TellMeAbout} = require("tellmeabout");

For demonstration, let's declare a variable called "mystery" and assign anything we want to it.

let mystery = "Hello World!"

From here, we can either:

  • Store TellMeAbout's return in a variable and console.log that very variable
let dialogue = TellMeAbout(mystery);
console.log(dialogue);

OR

  • Directly console.log the TellMeAbout function with parameters filled in
console.log(TellMeAbout(mystery));

The above example should display this in your terminal console when you run the source file with the node command:

That's pretty cool, but wait... I thought that if I directly plugged in a variable into the function that it would also give the name of the variable? I originally thought the same thing, until I learned that in the eyes of a JavaScript function, a value is a value. A variable is simply a reference to a value stored in memory, and not the literal name of said variable. While there are a few tricks to get that to work, they are quite vulnerable and leave you quite hackable.

To get around this, TellMeAbout has an optional second parameter variableName: string to explicitly have the variable's name accounted for:

const fullDialogue = TellMeAbout(mystery, "mystery");
console.log(fullDialogue);

That should yield a more informative response:

That's much better, and should help turn your debugging capabilities up to 11! TellMeAbout isn't simply limited to strings, either. You can plug in all kinds of variables and values, and learn more about the tools you use every day without realizing how deep they go.

Examples

  • Number (also if it's a Perfect Square or a Perfect Cube)
  • String (also if it's a Palindrome)
  • Falsy value (such as null)
  • Objects
  • Arrays (which are also Objects)
  • Error return if variableName parameter is not a String

License

ISC

Contributors

Questions

Noticed an edge case not covered or see an opportunity to improve this package's functionality?

  • Shoot a nice quick email here
  • Or make a pull request here