Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/dawsbot/fuhk
- Owner: dawsbot
- License: mit
- Created: 2016-03-10T06:10:23.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2019-04-20T11:11:50.000Z (over 5 years ago)
- Last Synced: 2024-11-13T00:48:38.797Z (about 2 months ago)
- Topics: censored-words, children, parenting
- Language: JavaScript
- Homepage:
- Size: 28.3 KB
- Stars: 10
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: license
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)
> 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.