Utilities
Some functions used inside the library and that you can use for your code too.
Logs
The utilities exported are:
log
An instance of a logger from
utils-logger-avthat can log colors and icons and save your desired messages inside a specified file.
fullLogOk
A function that uses the log instance and print a succesful message in green on console and saves the message in the file specified in the envs
fullLogNok
Same as before but regarding errors.
i
utils-logger-avicons for logs
c
Utility funtion for the logger library that helps you crate custom combo-color logs
errorCatcher
An utility used inside the library.
It helps returning a standardized response alongs some error and status configurations.
Importants
Those methods return the type expected from the RouterWrapper api section.
apiOk
apiNok
Those methods return the type expected from the SocketWrapper middleware.
socketOk
socketNok
Those are some generics utilities exported by the package
sleep
getCompiledPath
This one let you fetch the right file both on production/dev environment with typescript
Last updated