1.0.0 • Published 4 months ago

multi-language-slangs v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
4 months ago

🌍 Multi-Language Slangs 🗣️

npm Downloads License

Hindi: शब्दों का खजाना, भाषाओं का ठिकाना ✨
Punjabi: ਬੋਲੀਆਂ ਦਾ ਪਿਟਾਰਾ, ਮਜ਼ੇਦਾਰ ਨਜ਼ਾਰਾ 🎭
Bengali: শব্দের মেলা, আনন্দের খেলা 🎪
Haryanvi: म्हारी भाषा म्हारा गौरव, शब्दां का ये सौरव 🌟

📚 Overview

Multi-Language Slangs is a vibrant package that brings the colorful world of slang expressions to your applications! With support for 15 different languages including English, Hindi, Punjabi, Bengali, French, Spanish, German, Italian, Japanese, Chinese, Russian, Arabic, Bhojpuri, Haryanvi, and Awadhi, this package lets you add cultural flavor and fun to your conversations.

✨ Features

  • 🌐 15 Languages: Access slangs from around the world
  • 🎲 Random Generation: Get random slangs with a simple function call
  • 🔢 Quantity Control: Request exactly how many slangs you need
  • 🧩 Easy Integration: Simple API that works with any JavaScript project
  • 🚀 Zero Dependencies: Lightweight and efficient

🛠️ Installation

# Using npm
npm install multi-language-slangs

# Using yarn
yarn add multi-language-slangs

# Using pnpm
pnpm add multi-language-slangs

# Using bun
bun add multi-language-slangs

🎮 Usage

Importing the Package

// CommonJS
const { slangs, random, languages } = require('multi-language-slangs');

// ES Modules
import { slangs, random, languages } from 'multi-language-slangs';

🔍 Available Functions

1. languages() - Get All Supported Languages

// Get the list of all supported languages
const supportedLanguages = languages();
console.log(supportedLanguages);
// Output: ['english', 'bengali', 'french', 'spanish', 'german', 'italian', 'japanese', 'chinese', 'russian', 'arabic', 'hindi', 'bhojpuri', 'punjabi', 'haryanvi', 'awadhi']

2. slangs(language, count) - Get Slangs from a Specific Language

// Get one slang from Hindi
console.log(slangs('hindi'));
// Output: ['बेवकूफ']

// Get 3 slangs from Punjabi
console.log(slangs('punjabi', 3));
// Output: ['बेवकूफ', 'मूरख', 'गधा']

// Get all slangs from all languages
console.log(slangs());
// Output: { english: [...], hindi: [...], ... }

3. random(language, count) - Get Random Slangs

// Get a random slang from Haryanvi
console.log(random('haryanvi'));
// Output: ['टिंडर']

// Get 3 random slangs from Bhojpuri
console.log(random('bhojpuri', 3));
// Output: ['अलसिया', 'बेकार', 'बेवकूफवा']

🌈 Examples

Fun Multilingual Slang Generator

const { slangs, random, languages } = require('multi-language-slangs');

// Create a multilingual slang exchange
const languageList = languages();
const randomLanguages = languageList.sort(() => 0.5 - Math.random()).slice(0, 3);

console.log("Today's Slang Exchange:");
randomLanguages.forEach(lang => {
  console.log(`${lang.toUpperCase()}: ${random(lang)}`);
});

Language Learning App

const { slangs } = require('multi-language-slangs');

function createSlangQuiz(language, count = 5) {
  const slangWords = slangs(language, count);
  
  console.log(`🎮 QUIZ TIME: How well do you know ${language.toUpperCase()} slangs?`);
  slangWords.forEach((word, index) => {
    console.log(`${index + 1}. ${word}`);
  });
}

createSlangQuiz('hindi');

🌟 Supported Languages

LanguageCode
Englishenglish
Hindihindi
Punjabipunjabi
Bengalibengali
Frenchfrench
Spanishspanish
Germangerman
Italianitalian
Japanesejapanese
Chinesechinese
Russianrussian
Arabicarabic
Bhojpuribhojpuri
Haryanviharyanvi
Awadhiawadhi

🤝 Contributing

Contributions are welcome! Feel free to add more languages, improve existing ones, or enhance the functionality.

हिंदी में योगदान, सबका सम्मान 🙏
ਪੰਜਾਬੀ ਵਿੱਚ ਹਿੱਸਾ ਪਾਓ, ਨਵੀਆਂ ਗੱਲਾਂ ਲਿਆਓ 🌱
বাংলায় অবদান রাখুন, নতুন শব্দ যুক্ত করুন 🌷

📜 License

This project is licensed under the ISC License - see the LICENSE file for details.