promisify-4loc
Convert a Node.js-style callback API (err, val) => void
to a Promise. Much like pify, but implemented in just 4 lines of code, with only the core functionality provided.
npm install --save promisify-4loc
Before:
const fs = { fs}
After:
const fs = const pify = { try const val = await './test.js' console catch err console }
Source code
It's called "4loc" because the implementation is only 4 lines of code:
module { }
That's 144 bytes.