Pify is a JavaScript package for converting callback-based functions into promise-returning equivalents. It can promisify a single function or process the methods of an entire module automatically. This makes older Node.js callback APIs easier to use with async and await syntax. Developers can selectively include or exclude methods through names or regular-expression patterns. The library can return multiple callback values as an array when an API provides more than one successful result. It also supports APIs that do not follow the conventional error-first callback pattern. Additional options allow the module's main function to remain untouched and permit use of a custom Promise implementation.
Features
- Single-function promisification
- Whole-module method promisification
- Include and exclude method filtering
- Multiple callback-result support
- Non-error-first callback compatibility
- Custom Promise implementation support
Categories
LibrariesLicense
MIT LicenseFollow Pify
Other Useful Business Software
$300 Free Credits to Build on Google Cloud
Put your $300 in credit toward real workloads, then keep building with free monthly usage for 20+ products. No commitment and no charge until you upgrade.
Rate This Project
Login To Rate This Project
User Reviews
Be the first to post a review of Pify!