MCPcopy Index your code
hub / github.com/angular-ui/ui-router / getDirectiveRequire

Function getDirectiveRequire

test/angular/1.5/angular.js:7824–7836  ·  view source on GitHub ↗
(directive)

Source from the content-addressed store, hash-verified

7822 }
7823
7824 function getDirectiveRequire(directive) {
7825 var require = directive.require || (directive.controller && directive.name);
7826
7827 if (!isArray(require) && isObject(require)) {
7828 forEach(require, function(value, key) {
7829 var match = value.match(REQUIRE_PREFIX_REGEXP);
7830 var name = value.substring(match[0].length);
7831 if (!name) require[key] = match[0] + key;
7832 });
7833 }
7834
7835 return require;
7836 }
7837
7838 function getDirectiveRestrict(restrict, name) {
7839 if (restrict && !(isString(restrict) && /[EACM]/.test(restrict))) {

Callers 1

$CompileProviderFunction · 0.70

Calls 4

isArrayFunction · 0.85
matchMethod · 0.80
isObjectFunction · 0.70
forEachFunction · 0.70

Tested by

no test coverage detected