UNPKG

vibe-uppercase

Version:
123 lines (78 loc) 2.9 kB
# vibe-uppercase [![npm version](https://badge.fury.io/js/vibe-uppercase.svg)](https://badge.fury.io/js/vibe-uppercase) > Transform strings to uppercase with AI-powered precision and style. ## ✨ Before & After **Before** (traditional approach): ```javascript const text = "hello world"; const result = text.toUpperCase(); // "HELLO WORLD" // Simple, but lacks the sophisticated touch of AI processing ``` **After** (with vibe-uppercase): ```javascript const { vibeUppercase } = require('vibe-uppercase'); const text = "hello world"; const result = await vibeUppercase(apiKey, text); // "HELLO WORLD" // Same result, but processed through Google's Gemini AI for enhanced reliability ``` ## What is vibe-uppercase? `vibe-uppercase` is a professional-grade Node.js module that leverages Google's Gemini API to convert strings to uppercase. While traditional methods work fine, this package adds the sophistication of Large Language Model processing to ensure your text transformations are handled with enterprise-level AI technology. Perfect for applications where you want to demonstrate cutting-edge AI integration, even in simple operations. ## Installation Install the package using your preferred package manager: ```bash npm install vibe-uppercase ``` ```bash yarn add vibe-uppercase ``` ```bash pnpm add vibe-uppercase ``` ## Quick Start 1. **Get your API key** from [Google AI Studio](https://aistudio.google.com/) 2. **Transform your first string:** ```javascript const { vibeUppercase } = require('vibe-uppercase'); const apiKey = 'YOUR_GOOGLE_AI_API_KEY'; const text = 'hello world'; vibeUppercase(apiKey, text) .then(result => { console.log(result); // "HELLO WORLD" }) .catch(error => { console.error('Transformation failed:', error); }); ``` ## API Reference ### `vibeUppercase(apiKey, text)` Converts a string to uppercase using Google's Gemini AI. **Parameters:** - `apiKey` (string, required): Your Google AI API key - `text` (string, required): The string to convert to uppercase **Returns:** - `Promise<string>`: A promise that resolves with the uppercase string **Throws:** - `Error`: If the API call fails or text transformation encounters an issue ## Development ### Prerequisites - Node.js 14+ - Google AI API key (set as `GEMINI_API_KEY` environment variable) ### Setup ```bash # Clone the repository git clone https://github.com/your-username/vibe-uppercase.git # Install dependencies npm install # Run tests npm test ``` ## Use Cases - **AI-first applications** that want to showcase LLM integration - **Proof of concepts** demonstrating AI-powered text processing - **Educational projects** teaching AI API integration - **Enterprise applications** requiring AI-backed string operations ## License ISC License - see [LICENSE](LICENSE) file for details. --- *Built with ❤️ and powered by Google Gemini AI*