Skip to content
This repository has been archived by the owner on Dec 7, 2020. It is now read-only.

improve wrap(..) #108

Open
getify opened this issue May 23, 2018 · 0 comments
Open

improve wrap(..) #108

getify opened this issue May 23, 2018 · 0 comments

Comments

@getify
Copy link
Owner

getify commented May 23, 2018

Take a trick from Node's promisify(..) utility... if asked to promisify a function that has a special symbol on it, the function at that symbol is returned, instead of creating a new one. Allows overriding the behavior of wrap not with the config params, but with meta data on the function being wrapped. Clever and useful.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant