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

Function getDirectiveRequire

test/angular/1.6/angular.js:8281–8293  ·  view source on GitHub ↗
(directive)

Source from the content-addressed store, hash-verified

8279 }
8280
8281 function getDirectiveRequire(directive) {
8282 var require = directive.require || (directive.controller && directive.name);
8283
8284 if (!isArray(require) && isObject(require)) {
8285 forEach(require, function(value, key) {
8286 var match = value.match(REQUIRE_PREFIX_REGEXP);
8287 var name = value.substring(match[0].length);
8288 if (!name) require[key] = match[0] + key;
8289 });
8290 }
8291
8292 return require;
8293 }
8294
8295 function getDirectiveRestrict(restrict, name) {
8296 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