1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 4x 3x 2x 1x 1x 3x 3x 2x | function handleFunctionDeclaration(insertKeyFunc, debug, { id, declarations }){
if(!id && !declarations) throw new Error('handleFunctionDeclaration:id or declarations were not passed')
let name
if(id){
name = id.name
}else Eif(declarations){
name = declarations[0].init.callee.name
}
debug(`Function: ${name}`)
insertKeyFunc(name)
}
module.exports = {
handleFunctionDeclaration
} |