Thanks to visit codestin.com
Credit goes to github.com

Skip to content

dawsbot/fuhk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

37 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

fuhk

npm version npm download count XO code style

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

const fuhk = require('fuhk');

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

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

Web

<script src="https://rawgit.com/dawsonbotsford/fuhk/master/bundle.js"></script>
<script>
  alert(fuhk('shit fuck rubber duck'));
  //=> ['shit', 'fuck']
</script>

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

<script src="node_modules/fuhk/bundle.js"></script>

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



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

About

๐Ÿ–• Get all "bad words" in a string

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published