Open burmecia opened 2 years ago
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 sexual
and any other similar (e.g. offensive) words
.
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.
Please remove the word
sexual
from adjectives dict, or if any other similar words can also be removed? Thanks.