getify/asynquence

improve `wrap(..)`

Open

#108 aperta il 23 mag 2018

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)JavaScript (156 fork)batch import
help wanted

Metriche repository

Star
 (1739 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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.

Guida contributor