huh

2.0.1 • Public • Published

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

  • - Add CLI support
  • - Add multi-language support?
  • - Add Browser support

What's new?

See RELEASES

License

MIT -- see LICENSE

Package Sidebar

Install

npm i huh

Weekly Downloads

4

Version

2.0.1

License

MIT

Last publish

Collaborators

  • slobodan