lafyis a ridiculously small module that adds a simpler way to promisify instance methods. It can obviously be used on normal promisifiable methods:const fs = ;const lafy = ;// Don't want to bother promisifying a function ?let contents = await ;// Oh no, this class' methods use callbacks ;(// The only way to promisify methods would be to bind them to an instanceconst userManager = /* ... */;let users = await ;// Much simpler if you only need to do this once or twice !
npm install lafy
Bugs & Suggestions
If you notice any bug or have a suggestion, please tell me about it in the issues, it will help everyone!
You can run the suite using
lafy is licensed under the very permissive MIT License. You may use it for commercial projects if you comply to the license.