A library that lets your code support any ES6-compatible Promise implementation while letting application authors choose their preferred one.
Any Promise is a JavaScript library that provides a uniform interface for using ES6-compatible Promise implementations. It solves the problem of library authors needing to support multiple Promise libraries by letting application developers choose and register their preferred implementation (e.g., Bluebird, Q, native Promises) while keeping library code implementation-agnostic.
Library developers who want their promise-based packages to be compatible with any ES6 Promise implementation without forcing a specific one on users, and application developers who need to standardize on a particular Promise library across their dependency tree.
Developers choose Any Promise because it eliminates the friction of conflicting Promise dependencies in projects, allows performance optimizations through specialized Promise libraries, and maintains forward compatibility with native Promises without breaking existing code.
NOTE: You probably want native promises now
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Allows libraries to depend on any ES6-compatible Promise without forcing a specific implementation, promoting flexibility for users.
Applications can register a preferred Promise library once, and all dependent libraries transparently use it, avoiding dependency conflicts.
Supports older Node.js versions (≤ v0.12) with auto-discovery, though explicit registration is recommended for reliability.
Defaults to the global Promise in modern Node.js and browsers, reducing setup for users who don't need customization.
Libraries must stick to documented ES6 Promise functions, preventing use of advanced features from implementations like Bluebird's cancellations.
Requires registration before any require calls, which can be error-prone and adds initial setup overhead, especially in large applications.
For Node.js ≤ v0.12, auto-discovery is non-deterministic and may fail, necessitating manual registration to avoid runtime errors.