Please click here
This module only exposes one interface
create(factory function). At that time, when designing the interface, we did not consider too much and directly referred to a similar module.
Now think back and return to the constructor
IDCardOCRIt seems that it can also be done.
However, there seems to be a difference: constructors can access methods on the prototype chain, while factory functions cannot.
So, will there be any bad consequences if the constructor is returned? What are the other differences?
Are you sure you are right about the “difference”?
createAccess is to call the constructor new to create an instance, so the returned results can of course also access methods on the prototype chain. why not?