kew is a lightweight promise/deferred library specifically designed for Node.js environments. Developed by Medium, its primary goal was to offer a high-performance alternative to the Q library, particularly for server-side applications experiencing CPU bottlenecks in chained database callbacks. Currently at version 0.7.0, the package appears to be unmaintained, with its last commit dating back several years, indicating an abandoned status and no active release cadence. It provides a subset of promise functionality, including methods like `Q.resolve()`, `Q.reject()`, `Q.defer()`, and promise chaining with `.then()` and `.fail()`. Unlike more comprehensive promise libraries, kew intentionally implements only the features necessary for the common server-side use cases identified by its original developers, prioritizing minimal footprint and speed.
npm install kewVerified import paths — ran on the pinned version, not inferred.
Demonstrates `Q.resolve()`, `Q.defer()`, handling deferred promises, and using `makeNodeResolver()` to integrate with Node.js-style callbacks, including error handling.
Thoroughly review kew's documentation and source code to confirm feature availability. For modern applications, consider using native ES6 Promises or actively maintained alternatives.
Migrate to a currently maintained promise library or utilize native ES6 Promises (supported in Node.js v6+).
For CommonJS projects, use `const Q = require('kew')`. For ESM projects, consider using a different, actively maintained promise library that supports ESM, or native `Promise`.Wrap kew promise-returning functions with `util.promisify` if necessary, or refactor to use native ES6 Promises for direct `async/await` compatibility.
Consider creating a custom `kew.d.ts` file or migrating to a promise library that provides TypeScript support out-of-the-box.
Ensure `const Q = require('kew');` is present and correctly scoped before `Q` is used.Access the `Q` object after requiring the module: `const Q = require('kew'); const promise = Q.resolve('value');`Use the CommonJS `require` syntax: `const Q = require('kew');`No dependency data recorded yet.