Skip to content

Conversation

s-inu
Copy link
Contributor

@s-inu s-inu commented Nov 12, 2024

import { faker } from "@faker-js/faker";

const animals = faker.helpers.uniqueArray(faker.animal.type, 1e3);

const animalSet = new Set(animals);

console.log(animals.length); // 44
console.log(animalSet.size); // 44

`faker.animal.type` now has **44** possible animals

```ts
import { faker } from "@faker-js/faker";

const animals = faker.helpers.uniqueArray(faker.animal.type, 1e3);

const animalSet = new Set(animals);

console.log(animals.length); // 44
console.log(animalSet.size); // 44
```
@s-inu s-inu requested a review from a team as a code owner November 12, 2024 18:33
Copy link

netlify bot commented Nov 12, 2024

Deploy Preview for fakerjs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit cad8a27
🔍 Latest deploy log https://app.netlify.com/sites/fakerjs/deploys/67339f73cdf76b0008cbc9cc
😎 Deploy Preview https://deploy-preview-3258.fakerjs.dev
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@s-inu s-inu changed the title Update unique.md fix: faker.animal.type now has 44 possible animals Nov 12, 2024
@ejcheng ejcheng added c: docs Improvements or additions to documentation p: 1-normal Nothing urgent labels Nov 12, 2024
@ejcheng ejcheng added this to the vAnytime milestone Nov 12, 2024
@ejcheng ejcheng changed the title fix: faker.animal.type now has 44 possible animals docs: faker.animal.type now has 44 possible animals Nov 12, 2024
Copy link

codecov bot commented Nov 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.96%. Comparing base (1633c8d) to head (cad8a27).
Report is 1 commits behind head on next.

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #3258   +/-   ##
=======================================
  Coverage   99.96%   99.96%           
=======================================
  Files        2806     2806           
  Lines      217144   217144           
  Branches      979      976    -3     
=======================================
+ Hits       217065   217070    +5     
+ Misses         79       74    -5     

see 2 files with indirect coverage changes

@ST-DDT ST-DDT requested review from a team November 12, 2024 19:35
Copy link
Member

@xDivisionByZerox xDivisionByZerox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch 👍

@matthewmayer
Copy link
Contributor

Maybe we could switch to faker.location.continent() which should be a fairly stable length for the next few million years.

@ST-DDT
Copy link
Member

ST-DDT commented Nov 13, 2024

Maybe we could switch to faker.location.continent() which should be a fairly stable length for the next few million years.

IMO 44 entries is sufficiently small to get the point across.
I wouldn't mind a PR to change the method reference to that either.

@ST-DDT ST-DDT merged commit 467bd83 into faker-js:next Nov 13, 2024
32 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: docs Improvements or additions to documentation p: 1-normal Nothing urgent
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants