Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
15 lines
394 B
Plaintext
15 lines
394 B
Plaintext
'use strict'
|
|
|
|
let callbacks = ['done', 'cb', 'callback', 'next']
|
|
|
|
module.exports = function isNamedCallback(potentialCallbackName, exceptions) {
|
|
for (let i = 0; i < exceptions.length; i++) {
|
|
callbacks = callbacks.filter((item) => {
|
|
return item !== exceptions[i]
|
|
})
|
|
}
|
|
return callbacks.some((trueCallbackName) => {
|
|
return potentialCallbackName === trueCallbackName
|
|
})
|
|
}
|