faker-js / faker

Generate massive amounts of fake data in the browser and node.js
https://fakerjs.dev
Other
12.15k stars 884 forks source link

Generate Planet names #2867

Open matthewmayer opened 2 months ago

matthewmayer commented 2 months ago

Clear and concise description of the problem

As a developer using faker i want to generate planet names.

Suggested solution

Implement faker.science.planet() with the following data in English

[
    "Mercury",
    "Venus",
    "Earth",
    "Mars",
    "Jupiter",
    "Saturn",
    "Uranus",
    "Neptune"
]

Alternative

faker.location.planet()?

Additional context

No response

github-actions[bot] commented 2 months ago

Thank you for your feature proposal.

We marked it as "waiting for user interest" for now to gather some feedback from our community:

ST-DDT commented 2 months ago

Do you want exactly those well known planet names or any planet names?

Shinigami92 commented 2 months ago

Do you want exactly those well known planet names or any planet names?

This was exactly my first thought. Even if we dont want scientific planets now, we might want to consider a method name that does not get in conflict if we want to generate names like KMT-2021-BLG-1150L b

matthewmayer commented 2 months ago

Just the major planets

matthewmayer commented 2 months ago

Pluto is not a planet 😀

matthewmayer commented 2 months ago

For comparison Faker-Ruby has a few space methods. Their "planet" method is "planet (in our solar System)" https://github.com/faker-ruby/faker/blob/main/doc/default/space.md

ST-DDT commented 2 months ago

Currently, I think space is the best match, followed by location and then science. From science.planet I would except the numbered planet notation.

xDivisionByZerox commented 2 months ago

Currently, I think space is the best match, followed by location and then science. From science.planet I would except the numbered planet notation.

I understand your reasoning, but I'm not a big fan of introducing new modules at the current moment. We still have some places where we are not sure whether a function would be better located in module X or Y. Adding more modules makes this problem potentially worse until we have clear definitions about the "Module" term, or we introduce an easy way to reference aliases.

That being said, I would not expect planet to be located under the LocationModule as this has more of an "on earth locations"-vibe to me. Science sounds reasonable to me. But again, @ST-DDT made a good point with the "numbered planet notations".


Another thing I want to point out is the method faker.person.zodiacSign. While not directly related, they could end out being on the same meta level. I just want this to be considered. Not putting "planet" into the PersonModule, but the fact of potential relation in general.

ST-DDT commented 2 months ago

Nothing we have to decide now, lets wait on more input/upvotes.