This repository has been archived by the owner on Jul 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: skip nextTick in nodeify (#103)
- Loading branch information
1 parent
1b6a070
commit f20267b
Showing
5 changed files
with
23 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,14 +35,13 @@ | |
"browserify-aes": "^1.0.6", | ||
"keypair": "^1.0.1", | ||
"libp2p-crypto-secp256k1": "~0.2.1", | ||
"nodeify": "^1.0.1", | ||
"multihashing-async": "~0.4.6", | ||
"pem-jwk": "^1.5.1", | ||
"protocol-buffers": "^3.2.1", | ||
"rsa-pem-to-jwk": "^1.1.3", | ||
"safe-buffer": "^5.1.1", | ||
"tweetnacl": "^1.0.0", | ||
"webcrypto-shim": "github:dignifiedquire/webcrypto-shim#master", | ||
"multihashing-async": "~0.4.6" | ||
"webcrypto-shim": "github:dignifiedquire/webcrypto-shim#master" | ||
}, | ||
"devDependencies": { | ||
"aegir": "^11.0.2", | ||
|
@@ -79,4 +78,4 @@ | |
"greenkeeper[bot] <greenkeeper[bot]@users.noreply.github.com>", | ||
"nikuda <[email protected]>" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
'use strict' | ||
|
||
// Based on npmjs.com/nodeify but without additional `nextTick` calls | ||
// to keep the overhead low | ||
module.exports = function nodeify (promise, cb) { | ||
return promise.then((res) => { | ||
cb(null, res) | ||
}, (err) => { | ||
cb(err) | ||
}) | ||
} |