-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please remove sexual
from adjectives dict
#66
Comments
Please leave the word sexual and any other words you see fit. I think adults can handle Sexual Damselfly. |
But that will cause concerns for customer facing apps, imaging a children app send notification contains that word in url to users... |
That is a very Woke opinion, but it is by no means fact. If you want to exclude words on your apps you can do this: import { uniqueNamesGenerator, Config, adjectives, animals } from 'unique-names-generator';
import stringHash from 'string-hash';
export function uniqueName(param1: string, param2: string | number, wordToExclude: string) {
const seed = stringHash(`${param1}${param2}`);
const customConfig: Config = {
dictionaries: [adjectives, animals],
separator: ' ',
length: 2,
style: 'capital',
seed,
};
let name = uniqueNamesGenerator(customConfig);
console.log(name); // Purring Swordfish <-------------------------------
const split = name.split(' ');
if (split[0] === wordToExclude) {
name = `Woke ${split[1]}`;
}
return name;
}
const param1 = '4rq8r50988Fsdfaxcjvhlnxq1t4g379-rqeorg32';
const param2 = 1234565;
const appropriateWokeChildRandomName = uniqueName(param1, param2, 'Purring');
console.log(appropriateWokeChildRandomName); // Woke Swordfish <------------------------------- My issue with your request is that you ask to remove It's not the job of an open source project to know which words you find offensive and then exclude them for the benefit of your app. Take responsibility for your needs, code a solution, or create your own NPM module where you control the words allowed. |
https://www.npmjs.com/package/@joaomoreno/unique-names-generator is a forked version Microsoft uses for the VS Code project with some of the more commonly offensive words removed. Feel free to use that instead, but there is no guarantees it will always be completely synced with the upstream project. |
See joaomoreno#3 |
Please remove the word
sexual
from adjectives dict, or if any other similar words can also be removed? Thanks.The text was updated successfully, but these errors were encountered: