All Projects → stojanovic → Huh

stojanovic / Huh

Licence: mit
"Virus due to computers having unsafe sex." - Random BOFH-style excuses

Programming Languages

javascript
184084 projects - #8 most used programming language

Build Status npm version

Huh

Random "The Bastard Operator From Hell"-style excuse generator.

Usage

Install module from npm - npm i huh.

Module API is simple, use excuse.get(lang) to get one random excuse or excuse.getAll(lang) to get an array with all of them.

Where lang is any ISO Alpha-2 2-letter country code for which .txt file exists in languages folder. Default language is english, if you select non-existing language error will be thrown.


const excuse = require('huh')

excuse.get('en') // Returns 1 random excuse

// ie. 'Bad user karma.'
// or 'Cache miss - please take better aim next time'
// or 'Sand fleas eating the Internet cables'
// or 'We are Microsoft.  What you are experiencing is not a problem; it is an undocumented feature.'

excuse.getAll('en') // Returns an array with all excuses

Or install module as global (npm i huh -g) and just run huh from terminal.

List

Basic list is taken from here.

To add new excuses update languages/xx.txt where xx is the language you want to update or simply add a file for a new language and send pull request.

Todo

  • [x] - Add CLI support
  • [x] - Add multi-language support?
  • [ ] - Add Browser support

What's new?

See RELEASES

License

MIT -- see LICENSE

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].