Buckets:
3.85 GB
70,867 files
Updated 17 days ago
Ctrl+K
| Name | Size | Uploaded | Xet hash |
|---|---|---|---|
| History.md | 180 Bytes xet | 17c1ce46 | |
| LICENSE | 1.1 kB xet | 17fdb7fe | |
| README.md | 2.51 kB xet | 8f51ee4b | |
| index.js | 2 kB xet | 6bdce2ad | |
| package.json | 793 Bytes xet | ef09caf8 |
thenify-all
Promisifies all the selected functions in an object.
var thenifyAll = require('thenify-all');
var fs = thenifyAll(require('fs'), {}, [
'readFile',
'writeFile',
]);
fs.readFile(__filename).then(function (buffer) {
console.log(buffer.toString());
});
API
var obj = thenifyAll(source, [obj], [methods])
Promisifies all the selected functions in an object.
source- the source object for the async functionsobj- the destination to set all the promisified methodsmethods- an array of method names ofsource
var obj = thenifyAll.withCallback(source, [obj], [methods])
Promisifies all the selected functions in an object and backward compatible with callback.
source- the source object for the async functionsobj- the destination to set all the promisified methodsmethods- an array of method names ofsource
thenifyAll.thenify
Exports thenify this package uses.
- Total size
- 3.85 GB
- Files
- 70,867
- Last updated
- Nov 3
- Pre-warmed CDN
- US EU US EU