You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@
11
11
## Why Obscenity?
12
12
13
13
-**Accurate:** Though Obscenity is far from perfect (as with all profanity filters), it makes reducing false positives as simple as possible: adding whitelisted phrases is as easy as adding a new string to an array, and using word boundaries is equally simple.
14
-
-**Robust:** Obscenity's transformer-based design allows it to match on variants of phrases other libraries are typically unable to, e.g. `f...u c k`, `fuuuuuuuckkk`, `ʃṳ𝒸𝗄`, `wordsbeforefuckandafter` and so on. There's no need to manually write out all the variants either: just adding the pattern `fuck` will match all of the cases above by default.
14
+
-**Robust:** Obscenity's transformer-based design allows it to match on variants of phrases other libraries are typically unable to, e.g. `fuuuuuuuckkk`, `ʃṳ𝒸𝗄`, `wordsbeforefuckandafter` and so on. There's no need to manually write out all the variants either: just adding the pattern `fuck` will match all of the cases above by default.
15
15
-**Extensible:** With Obscenity, you aren't locked into anything - removing phrases that you don't agree with from the default set of words is trivial, as is disabling any transformations you don't like (perhaps you feel that leet-speak decoding is too error-prone for you).
16
16
17
17
## Installation
@@ -60,7 +60,7 @@ Now, we can use our matcher to search for profanities in the text. Here's two ex
60
60
**Check if there are any matches in some text:**
61
61
62
62
```javascript
63
-
if (matcher.hasMatch('f.uck you')) {
63
+
if (matcher.hasMatch('fuck you')) {
64
64
console.log('The input text contains profanities.');
65
65
}
66
66
// The input text contains profanities.
@@ -70,7 +70,7 @@ if (matcher.hasMatch('f.uck you')) {
70
70
71
71
```javascript
72
72
// Pass "true" as the "sorted" parameter so the matches are sorted by their position.
0 commit comments