You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Node.js v8+ for util.promisify, v10+ for fs.promises, Deno and Bun via node:
Rationale
mz wraps node's core modules (fs, child_process, crypto, dns, readline, zlib) with thenify-all, which wraps every method with thenify. ~72M weekly downloads each, most of it through sucrase. same idea as es6-promisify and pify, which are already mapped to util.promisify. one difference: thenify resolves an array when the callback gets more than one value, while util.promisify resolves only the first one unless the function has a custom promisify (like child_process.exec, which resolves { stdout, stderr })
Activity