3.0.0 • Published 5 months ago

in-memory-of-ataturk v3.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 months ago

in-memory-of-ataturk Build status codecov NPM version Downloads License twitter

Shows a quote from Ataturk after nodejs exit.

Install

$ npm install --save-dev in-memory-of-ataturk

Usage

Basic Usage

Just add and call it in your main app:

const { app } = require('in-memory-of-ataturk');
app(); // Uses English quotes by default

Language Selection

You can specify the language (supports 'en' for English and 'tr' for Turkish):

const { app } = require('in-memory-of-ataturk');
app('tr'); // Uses Turkish quotes

Getting Random Quotes Directly

You can also use the getRandomQuote function to get quotes programmatically:

const { getRandomQuote } = require('in-memory-of-ataturk');
const quote = getRandomQuote('en'); // Get a random English quote
console.log(quote);

Error Handling

The module includes proper error handling:

try {
    app('fr'); // Will throw an error for unsupported language
} catch (error) {
    console.error(error.message); // "Unsupported language: fr. Supported languages are: en, tr"
}

Supported Languages

  • English (en)
  • Turkish (tr)