promise-solo
Installation
$ npm install --save promise-solo
Example
var solo = ;var { thisstart = thisstart || Date; return Date - thisstart;}; var { var self = this; var ts = ; if !ms throw ts + selfname + ' oops'; console; return { ; };}; var who = name: ' joey'; var singSolo = ;var saySolo = ; ;;;;console; // Output:// 0 start// 3 joey begin sing 1000// 1011 joey end sing 1000// 1011 joey say hi// 1011 joey oops// 1012 joey begin sing 100// 1118 joey end sing 100// 1118 done
API
Return a solo wrap function, and the wrap function will return promise and guarantee one async function be run for order async flow.
solo(func[, thisArg])
const funcAsync = { return { //... ; };} const funcSolo = ;;
solo.spy(instance, methodName)
const solo = { solo } async { console await { } console } const controller = controllercontroller