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

Function getDirectiveRequire

lib/test/angular/1.8.0/angular.js:8793–8805  ·  view source on GitHub ↗
(directive)

Source from the content-addressed store, hash-verified

8791 }
8792
8793 function getDirectiveRequire(directive) {
8794 var require = directive.require || (directive.controller && directive.name);
8795
8796 if (!isArray(require) && isObject(require)) {
8797 forEach(require, function(value, key) {
8798 var match = value.match(REQUIRE_PREFIX_REGEXP);
8799 var name = value.substring(match[0].length);
8800 if (!name) require[key] = match[0] + key;
8801 });
8802 }
8803
8804 return require;
8805 }
8806
8807 function getDirectiveRestrict(restrict, name) {
8808 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