ngneat/falso

Possibility to set finance account length

Closed this issue · 1 comments

Description

I'm trying to migrate from faker to falso, and stuck with finance account, because faker provide possibility to generate account with any length, for example: finance.account(10) create random account with 10 digits, but when I use length in falso account I only can use it for create array of accounts.

Proposed solution

I check code:

return '#########'.replace(/#/g, () => {
return getRandomInRange({ min: 0, max: 9 }).toString();
});

And looks like length is hardcoded, could you please provide parameter for changing length of account? Because in some cases I need different length, but currently only 9 digits. I can prepare pull request if needed.

Alternatives considered

No response

Do you want to create a pull request?

Yes

@pumano Would love to see your PR 🙂