faker icon indicating copy to clipboard operation
faker copied to clipboard

add multipleOf to faker.number.int

Open matthewmayer opened this issue 1 year ago • 5 comments

Originally posted by @matthewmayer in https://github.com/faker-js/faker/pull/2581#discussion_r1431611815

Similar to faker.number.float, faker.number.int should also support a multipleOf parameter

matthewmayer avatar Dec 20 '23 13:12 matthewmayer

Personal opinion: I'm not sure if this is needed at all, just for symmetry is not a so good reason :thinking:
We could discuss this in one of the next meetings

Shinigami92 avatar Feb 09 '24 17:02 Shinigami92

I think the main advantage is it could be used in helpers.fake patterns for other methods.

matthewmayer avatar Feb 10 '24 01:02 matthewmayer

I think the main advantage is it could be used in helpers.fake patterns for other methods.

This is a really good point :+1:

Shinigami92 avatar Feb 10 '24 09:02 Shinigami92

For example in the new food module there was a description like "400g of delicious steak"

A menu might realistically have a 350g or 400g steak but not a 362g steak.

matthewmayer avatar Feb 10 '24 10:02 matthewmayer

Team Decision

  • We want this

ST-DDT avatar Feb 15 '24 16:02 ST-DDT