Skip to content

Commit

Permalink
docs: add upgrading guide
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT committed Feb 29, 2024
1 parent 2802e3c commit 5689c92
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/guide/upgrading_v9/2458.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
### Prices now return more price-like values

The `faker.commerce.price` method now produces values, that also return fractional values.

Old price: 828.00
New price: 828.59

The last digit of the price will adjusted to be more price-like:

- 50% of the time: `9`
- 30% of the time: `5`
- 10% of the time: `0`
- 10% of the time: a random digit from `0` to `9`

We plan to rethink this method some more in the future: [#2579](https://github.com/faker-js/faker/issues/2579)

0 comments on commit 5689c92

Please sign in to comment.