Spaces:
No application file
No application file
Download node_modules/bad-words/test/removeWords.js from Thrisha04/chatApplication: direct link, hf CLI and curl.
- Browser
- Download file 794 Bytes
-
https://huggingface.co/spaces/Thrisha04/chatApplication/resolve/main/node_modules/bad-words/test/removeWords.js
- Command line
-
hf download hf://spaces/Thrisha04/chatApplication/node_modules/bad-words/test/removeWords.js
-
curl -L -o removeWords.js https://huggingface.co/spaces/Thrisha04/chatApplication/resolve/main/node_modules/bad-words/test/removeWords.js
794 Bytes
| require('assert'); | |
| var Filter = require('../lib/badwords.js'), | |
| filter = new Filter(), | |
| assert = require('better-assert'); | |
| describe('filter', () => { | |
| describe('removeWords',() => { | |
| it('Should allow you to remove words from the filter blacklist and no longer filter them (case-insensitive)', () => { | |
| filter.removeWords('Hells'); | |
| assert(filter.clean('This is a hells good test') === 'This is a hells good test'); | |
| }); | |
| it ('Should allow you to remove an array of words from the filter blacklist and no longer filter them', () => { | |
| let removingWords = ['hells', 'sadist']; | |
| filter = new Filter(); | |
| filter.removeWords(...removingWords); | |
| assert(filter.clean('This is a hells sadist test') === 'This is a hells sadist test'); | |
| }); | |
| }); | |
| }); |