Skip to content
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

Open
burmecia opened this issue Sep 23, 2022 · 5 comments
Open

Please remove sexual from adjectives dict #66

burmecia opened this issue Sep 23, 2022 · 5 comments

Comments

@burmecia
Copy link

Please remove the word sexual from adjectives dict, or if any other similar words can also be removed? Thanks.

@flavioespinoza
Copy link

Please leave the word sexual and any other words you see fit. I think adults can handle Sexual Damselfly.

@burmecia
Copy link
Author

But that will cause concerns for customer facing apps, imaging a children app send notification contains that word in url to users...

@flavioespinoza
Copy link

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.

@lramos15
Copy link

lramos15 commented Nov 8, 2022

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.

@sandro-pasquali
Copy link

See joaomoreno#3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants