Open dancasey opened 7 years ago
Yes, that would be the best option. Currently I moved ajv
instance creation inside constructor (otherwise there could be conflicts since different instances use the same ajv
instance), but it would be easier to handle ajv
myself and pass it to a function.
As @alexkuz pointed out, there's not a need for this module to be a class. My initial thought would be to make the user instantiate
ajv
with the schema, and then pass this module's function the ajv instance and the schemaid
string.