MCPcopy
hub / github.com/angular-ui/ui-grid / getDirectiveRequire

Function getDirectiveRequire

lib/test/angular/1.7.0/angular.js:8345–8357  ·  view source on GitHub ↗
(directive)

Source from the content-addressed store, hash-verified

8343 }
8344
8345 function getDirectiveRequire(directive) {
8346 var require = directive.require || (directive.controller && directive.name);
8347
8348 if (!isArray(require) && isObject(require)) {
8349 forEach(require, function(value, key) {
8350 var match = value.match(REQUIRE_PREFIX_REGEXP);
8351 var name = value.substring(match[0].length);
8352 if (!name) require[key] = match[0] + key;
8353 });
8354 }
8355
8356 return require;
8357 }
8358
8359 function getDirectiveRestrict(restrict, name) {
8360 if (restrict && !(isString(restrict) && /[EACM]/.test(restrict))) {

Callers 1

$CompileProviderFunction · 0.70

Calls 3

isArrayFunction · 0.70
isObjectFunction · 0.70
forEachFunction · 0.70

Tested by

no test coverage detected