# one-liner-joke

> A simple node module which provides one liner joke randomly and from specific category

Latest version **1.2.2** (published 2021-06-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install one-liner-joke
pnpm add one-liner-joke
yarn add one-liner-joke
bun add one-liner-joke
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.2 |
| Published | 2021-06-17 |
| First published | 2018-11-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.0.0 |
| Dependencies | 0 |
| Unpacked size | 299.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 22 |
| Author | Ahmad Faiyaz |
| Maintainers | faiyaz26 |
| Keywords | joke, funny, one-liner, humor, jokes, lol |

## Links

- npm: https://www.npmjs.com/package/one-liner-joke
- Repository: https://github.com/faiyaz26/one-liner-joke
- Homepage: https://github.com/faiyaz26/one-liner-joke#readme
- Issues: https://github.com/faiyaz26/one-liner-joke/issues
- npm.io page: https://npm.io/package/one-liner-joke

## Recent versions

- 1.2.2 (latest) — 2021-06-17
- 1.2.1 — 2021-06-17
- 1.2.0 — 2018-11-28
- 1.1.1 — 2018-11-27
- 1.1.0 — 2018-11-27

## README

# one-liner-joke
[![Build Status](https://api.travis-ci.org/faiyaz26/one-liner-joke.svg?branch=master)](https://travis-ci.org/faiyaz26/one-liner-joke)


A simple Node Module which can provide one line joke randomly or from specific tag


This module contains more than 2200 one line jokes.



### Installation
```
npm install one-liner-joke --save
```


### Usage

```
var oneLinerJoke = require('one-liner-joke');

/*
The variable getRandomJoke will contain a random joke with a format:
{"body":"Artificial intelligence is no match for natural stupidity.","tags":["intelligence","stupid"]}
*/
var getRandomJoke = oneLinerJoke.getRandomJoke();
console.log(getRandomJoke)

/*
One can add exclusion filter for the jokes tags
default is ['racist', 'dirty', 'sex']
*/
var getRandomJoke = oneLinerJoke.getRandomJoke({
    'exclude_tags': ['dirty', 'racist', 'marriage']
  });
console.log(getRandomJoke)


/*
The variable getRandomJoke will contain a random joke with a tag and with a format:
{"body":"Artificial intelligence is no match for natural stupidity.","tags":["intelligence","stupid"]}
*/

var getRandomJokeWithTag = oneLinerJoke.getRandomJokeWithTag('stupid');
console.log(getRandomJokeWithTag)

/*
One can add exclusion filter for the jokes tags
default is ['racist', 'dirty', 'sex']
*/
var getRandomJoke = oneLinerJoke.getRandomJokeWithTag('stupid', {
  'exclude_tags': ['dirty', 'racist', 'marriage']
});
console.log(getRandomJoke)

```

## Tests
```
npm test
```

---
_Source: https://npm.io/package/one-liner-joke · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
