haterapps / fake-data

Fake Data - A form filler you won't hate
38 stars 2 forks source link

Use faker.helpers.fromRegExp #29

Closed BrayanCaro closed 1 year ago

BrayanCaro commented 1 year ago

I wasn't able to use the following expression from the fakerjs docs in the custom generator

return faker.helpers.fromRegExp('#{3}test[1-5]') // '###test3';

Is faker.helpers.fromRegExp available or is the dependency just outdated?

haterapps commented 1 year ago

Hello,

It seems that this function was added in a more recent version of faker.js which is not yet bundled with the Fake Data extension. I will work to release an update in the next days that will bring the latest version of faker.js library.

Thanks!

haterapps commented 1 year ago

Hello,

It took a little longer than I anticipated, due to some breaking changes on faker.js library, but now it's done.

The latest version of Fake Data extension (v 4.4.1) uses faker.js 8.0.2 (the latest stable version). And I can confirm that the code you wrote works in this version.

Please let me know if there is anything else that you encounter.

BrayanCaro commented 1 year ago

Works perfectly! thanks a lot!

:hibiscus: