Skip to content

ghuntley/vibepad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 vibepad

Left-pad strings using the raw power of Anthropic's Claude AI

Why do string manipulation locally when you can leverage a billion-parameter neural network running in a data center somewhere? Welcome to the future of padding.

🌟 Features

  • AI-Powered: Uses Anthropic's Claude to left-pad your strings
  • 🚀 Async/Await: Modern JavaScript with Promise-based API
  • 🎯 100% Compatible: Drop-in replacement for leftpad
  • 🧠 Neural Intelligence: Each padding operation benefits from transformer architecture
  • 💸 Cost-Effective: Only costs ~$0.000015 per padding operation*

*Based on Claude 3 Haiku pricing. Your mileage may vary.

📦 Installation

npm install vibepad

🔑 Setup

Set your Anthropic API key:

export ANTHROPIC_API_KEY="your-api-key-here"

🚀 Usage

const vibepad = require('vibepad');

// Basic usage
const padded = await vibepad('hello', 10);
console.log(padded); // "     hello"

// Custom pad character
const padded = await vibepad('42', 5, '0');
console.log(padded); // "00042"

// Error handling
try {
  await vibepad('test', 10);
} catch (error) {
  console.error(error.message);
}

🎭 Why?

Because sometimes you need to ask yourself: "What would happen if we used a large language model to do the simplest possible string operation?"

The answer is vibepad.

⚠️ Disclaimer

This is a parody of the infamous leftpad incident. Please don't use this in production unless you really, really want to explain to your boss why your string padding costs $50/month.

But hey, at least your strings will have vibes.

🤝 Contributing

PRs welcome! Especially if you can make it use GPT-4 for even more expensive padding.

📄 License

MIT - Because even AI-powered string padding should be free.


"In a world of simple string operations, one library dared to think different."

About

No description, website, or topics provided.

Resources

Stars

8 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors