in rules/directive-restrict.js [103:125]
function getDirectiveFunctionName(node) {
var directiveArg = node.arguments[1];
// Three ways of creating a directive function: function expression,
// variable name that references a function, and an array with a function
// as the last item
if (utils.isFunctionType(directiveArg)) {
return directiveArg.id.name;
}
if (utils.isArrayType(directiveArg)) {
directiveArg = directiveArg.elements[directiveArg.elements.length - 1];
if (utils.isIdentifierType(directiveArg)) {
return directiveArg.name;
}
return directiveArg.id.name;
}
if (utils.isIdentifierType(directiveArg)) {
return directiveArg.name;
}
}