New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fn.name and fn.length? #1
Comments
OK, perhaps I wasn't clear enough. I do want to set Regarding function foo (a, b, callback) { ... } We want to universalify it: const newFoo = universalify.fromCallback(foo) Now, we can use it like this: newFoo(1, 2)
.then(..)
.catch(..) or like this: newFoo(1, 2, (err, res) => {
// Do something
}) Note that in the first example, we called micro-promisify doesn't support calling the transformed functions with callbacks, so it sets However, if we keep the old Therefore, I was thinking of just leaving |
Ah, everything makes sense. Got it. |
OK, I'll fix |
Piggybacking from this comment... jprichardson/node-fs-extra#403 (comment)
Why wouldn't you want to set
fn.name
andfn.length
? Stated another way, why wouldn't you want to take the implementation from https://github.com/paulmillr/micro-promisify/blob/600daee25abc75af3cef8145ef6eb55aafdd2d54/index.js#L11? I'm not saying that implementation is correct, I'm just interested in your reasoning.The text was updated successfully, but these errors were encountered: