1.3.1 • Published 8 years ago

fuhk v1.3.1

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

fuhk

npm version npm download count XO code style

Return all "bad words" found in a JavaScript string

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

Install

npm install --save fuhk

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>

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.

1.3.1

8 years ago

1.3.0

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago

0.0.0

8 years ago