Faker.js: Custom helpers

Created on 8 Sep 2016  路  2Comments  路  Source: Marak/faker.js

Hi. Is there a preferred way to define custom helpers, other than just adding a dynamic method to the faker instance?

All 2 comments

There is the documented faker.fake method, outside of that developers are responsible for making their own modules for defining custom helpers / extending faker.

I guess the correct answer is no. We have to create our own modules. faker.fake interpolates existing methods. It is not possible to create new custom methods atm.

Was this page helpful?
0 / 5 - 0 ratings