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

@awesomeness-js/utils

v1.2.7

Published

Awesomeness - Utils

Readme

Nothing Special

Just some zero dependency* utils that every Awesomeness.js project uses.

Perfect? Far from it.

Better than what you have now? For sure.


🚀 Auto-Generate API Exports for Your Node.js Project

📌 Why "build" Exists

When you’re building a Node.js project, pulling functions together into a clean, predictable API shouldn’t feel like busywork. But maintaining a manual index.js is a waste of time, and Webpack? That’s a browser bundler—great for shipping front-end bundles, useless for building a logical backend export layer.

This script takes that grunt work off your plate and does it right:

Consolidates all exports into a single, perfectly structured API object
Keeps function names and namespaces exactly as your folder structure dictates—no mystery, no guessing
Pulls in JSDoc comments so your documentation is baked right into the build. Intellisense loves this.
Runs in plain Node.js—zero bundlers, zero fluff, zero excuses

Hint: Use the Awesomeness Intellitip VS Code Extension for classy hover documentation.


💡 Why Use This Over Webpack or Manual Indexing?

Webpack is a great bundler, but it’s not suited for building a structured export layer for backend code. This script offers a focused, ergonomic solution:

Automatic export generation — no more maintaining index.js by hand
JSDoc extraction—Includes comments directly in the generated file.
Simple and predictable—You control how exports are structured.
Namespace support—Uses folder structure to organize functions logically.
Minimal setup — one line to generate your exports


⚙️ How It Works

  1. Scans the ./src directory for .js files
  2. Generates import statements
  3. Creates an API object that mirrors your folder structure.
  4. Extracts JSDoc comments from each file and attaches them to the exports.
  5. Outputs a clean, structured index.js file, ready to use.

🔧 Usage

To run it:

import { build } from '@awesomeness-js/utils';

await build();

This will:

  • Scan the ./src directory
  • Create or overwrite ./index.js
  • Structure exports based on your file and folder layout

Customize it:

await build({
  src: './my-functions',
  dest: './api.js',
  includeComments: true,
  useTabs: true,
});

📦 Example Output

Given this folder structure:

src/
├── roxbury/
│   ├── didYouJustGrabMyAss.js
│   ├── areYouGuysBrothers.js
├── bros/
│   ├── didWeJustBecomeBestFriends.js
│   ├── prestigeWorldwide.js
├── rickyBobby/
│   ├── iWakeUpAndPissExcellence.js
│   ├── iRaiseWinners.js
│   ├── shakeAndBake.js
├── oldSchool/
│   ├── youMyBoyBlue.js
├── news/
│   ├── thatEscalatedQuickly.js
│   ├── stayClassy.js
│   ├── milkWasABadChoice.js
├── tommy/
│   ├── roomService.js
│   ├── fatGuyInALittleCoat.js
├── menInTights/
│   ├── youGrewBoobs.js
│   ├── merryMen/
│   │   ├── snipTheTip.js

Use it like:


// Default import: full API
import api from './index.js';

// Use the full API
api.roxbury.didYouJustGrabMyAss();

// perfect for CTRL+F
api.rickyBobby.shakeAndBake();

// deep
api.menInTights.youGrewBoobs();
api.menInTights.merryMen.snipTheTip();

// Named import also work
import { youMyBoy, roxbury } from './api.js';

// Use the named group
youMyBoy.blue();
roxbury.didYouGrabMyAss();

💪 Who’s This For?

  • Teams who want clean and consistent APIs
  • Expert ~~developers~~ architects obsessed with
    • organization
    • hierarchy
    • explicit namespacing
    • clean code
  • Champions who know CTRL+F app.roxbury.didYouJustGrabMyAss will always beat any “magic” refactor tool when it comes to finding every. single. usage.
  • Developers who refuse to hide functions behind lazy aliases, and instead demand predictable, grep-able APIs that tell you exactly where the code lives.

If you want a smarter way to manage and structure exports in a Node.js project — without extra tooling bloat — this script was built for you.

If that makes you hard, you’re in the right place.

If it makes you mad… you’ve probably never built a scalable codebase.


Ready to make development great again? 👉 awesomenessjs.com


✱ disclaimer... Kinda zero dependencies. Zero prod dependencies.

dev dependencies: vitest for testing