MCPcopy
hub / github.com/MithrilJS/mithril.js / done

Function done

ospec/ospec.js:135–140  ·  view source on GitHub ↗
(err)

Source from the content-addressed store, hash-verified

133 var isDone = false
134 // public API, may only be called once from use code (or after returned Promise resolution)
135 function done(err) {
136 if (!isDone) isDone = true
137 else throw new Error("`" + arg + "()` should only be called once")
138 if (timeout === undefined) console.warn("# elapsed: " + Math.round(new Date - s) + "ms, expected under " + delay + "ms\n" + o.cleanStackTrace(task.err))
139 finalizeAsync(err)
140 }
141 // for internal use only
142 function finalizeAsync(err) {
143 if (err == null) {

Callers 15

test-promise.jsFile · 0.85
test-xhrMock.jsFile · 0.85
finishFunction · 0.85
finish2Function · 0.85
test-domMock.jsFile · 0.85
test-callAsync.jsFile · 0.85
test-jsonp.jsFile · 0.85
test-request.jsFile · 0.85
testonreadystatechangeFunction · 0.85
removeFunction · 0.85

Calls 1

finalizeAsyncFunction · 0.85

Tested by 1

testFunction · 0.68