Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dawsbot/fuhk

🖕 Get all "bad words" in a string
https://github.com/dawsbot/fuhk

censored-words children parenting

Last synced: about 2 months ago
JSON representation

🖕 Get all "bad words" in a string

Awesome Lists containing this project

README

        

# fuhk
[![npm version](https://img.shields.io/npm/v/fuhk.svg)](https://www.npmjs.com/package/fuhk)
[![npm download count](http://img.shields.io/npm/dm/fuhk.svg?style=flat)](http://npmjs.org/fuhk)
[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)



Linux
OS X
Windows












> Return all "bad words" found in a JavaScript string


**Warning - parts of this are NSFW due to the nature of the module**

## Usage

#### Node

```js
const fuhk = require('fuhk');

fuhk('shit fuck rubber duck');
//=> ['shit', 'fuck']

fuhk('nothing bad here!');
//=> []
```


#### Web

```html

alert(fuhk('shit fuck rubber duck'));
//=> ['shit', 'fuck']

```


Or download it with `npm install --save fuhk` and reference it as:
```html

```


## Install

```
npm install --save fuhk
```


## API

### fuhk(target)

##### target

Type: `string`

##### return value

Type: `array`

Returns all "bad words" found in a JavaScript string. Strips punctuation and preserves capitalization. If none are found, an empty array is returned.


## License

MIT © [Dawson Botsford](http://dawsonbotsford.com)


---
If you like this, star it. If you want to follow me, follow me.