I'm using the mongoose library in node and ran into a problem. When using pre hook for saving i can't get the reference of the document as 'this' using arrow functions.
I was suggested of using 'function' statement but there is a style guide I must follow. Is there a way to get the object intended for 'this' while using an arrow function?