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

@nebulaai/combine-words

v0.1.2

Published

Combine multiple words into a clean, formatted string.

Readme

🧩 combine-words

Mix strings and numbers like a wizard. Any separator. Any combination. Pure magic.

String alchemy from the NebulaAI lab


⚡ Get Started (One command)

npm install @nebulaai/combine-words

🔥 Watch it work miracles

import { combineWords } from "@nebulaai/combine-words";

// Build file names like a boss
combineWords(["user", 123, "profile"], "_");     // → "user_123_profile"

// Create CSS classes dynamically  
combineWords(["btn", "primary", "lg"]);          // → "btnprimarylg"
combineWords(["nav", "item", 2], "-");           // → "nav-item-2"

// Generate URLs that just work
const path = combineWords(["api", "v2", "users", userId], "/");
// → "api/v2/users/42"

// Database table naming
combineWords(["order", "item", "history"], "_"); // → "order_item_history"

// Mixed data types? No problem.
combineWords([2024, "Q", 1, "report"], "-");     // → "2024-Q-1-report"

🚀 Why smart devs use this

  • Type flexible: Strings, numbers, whatever - it handles it
  • Separator freedom: Use any character or none at all
  • Zero surprises: Predictable output every single time
  • TypeScript ready: IntelliSense knows what you're doing
  • Performance beast: Optimized for speed and memory
  • No edge cases: Works with empty arrays, nullish values, everything

🛠️ API That Adapts

combineWords(parts: Array<string | number>, sep?: string): string

| Parameter | Type | Default | What it does | |-----------|------|---------|--------------| | parts | Array<string \| number> | - | The pieces to combine | | sep | string | "" | What goes between each piece |

Returns: A perfectly combined string that does exactly what you expect.


🎯 Perfect for

  • Dynamic class names"btn-primary-lg" without the headache
  • File path generation → Build paths that actually work
  • API endpoint construction → Clean URLs every time
  • Database naming → Consistent table/column names
  • Template strings → Dynamic content assembly
  • Data serialization → Turn arrays into readable strings

💡 Before vs After

// Before: Verbose, fragile, forgettable
function buildClassName(base, modifier, size) {
  return [base, modifier, size].filter(Boolean).join("-");
}

// After: Clean, confident, bulletproof  
import { combineWords } from "@nebulaai/combine-words";
const className = combineWords(["btn", modifier, size], "-");

🔥 Pro moves

// Empty separator for tight combinations
combineWords(["React", "Hook", "Form"]);          // → "ReactHookForm"

// Space-separated for natural language
combineWords(["Hello", "world", 2024], " ");      // → "Hello world 2024"

// Custom separators for any format
combineWords(["user", 42, "admin"], "::");        // → "user::42::admin"

// Works with mixed arrays
combineWords([...tags, timestamp, userLevel]);    // → Dynamic goodness

📄 License

MIT © Jorge Gonzalez / Temporal AI Technologies Inc.

Building tools that make complex simple