We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
done
next
1 parent 66eab5f commit 6697d29Copy full SHA for 6697d29
index.js
@@ -12,6 +12,7 @@ module.exports = function isAsyncFn (fn, max) {
12
throw new TypeError('is-async-function expect a function')
13
}
14
15
- var fnStr = fn.toString().slice(8, Number(max) || 150)
16
- return fnStr.indexOf('callback') !== -1 || fnStr.indexOf('cb') !== -1
+ var fnStr = fn.toString().slice(8, Number(max) || 100)
+ return fnStr.indexOf('callback') !== -1 || fnStr.indexOf('cb') !== -1 ||
17
+ fnStr.indexOf('done') !== -1 || fnStr.indexOf('next') !== -1
18
0 commit comments