Returns 'directive' for `app.directive(function(){...});`.
175522
function(node) {
    // Make sure that this is a call expression
    if (!node || node.type !== 'CallExpression' ) {
      return;
    }
    // Get the callee property
    var property;
    if (node.callee && node.callee.property) {
      property = node.callee.property;
    }
    // Return the identifier name of the callee
    if (property && property.type === 'Identifier') {
      return property.name;
    }
  }
539305
function(name, cfg){
    if(!name) return;

    var type = typeof name;
    if(type === 'object' && !cfg){
      for(var k in name){
        if(name.hasOwnProperty(k)) this.directive(k, name[k]);
      }
      return this;
    }
    var directives = this._directives, directive;
    if(cfg == null){
      if( type === 'string' ){
        if( directive = directives[name] ) return directive;
        else{
          var regexp = directives.__regexp__;
          for(var i = 0, len = regexp.length; i < len ; i++){
            directive = regexp[i];
            var test = directive.regexp.test(name);
            if(test) return directive;
          }
        }
      }
    }else{
      if( typeof cfg === 'function') cfg = { link: cfg } 
      if( type === 'string' ) directives[name] = cfg;
      else{
        cfg.regexp = name;
        directives.__regexp__.push(cfg)
      }
      if(typeof cfg.link !== 'function') cfg.link = NOOP;
      return this
    }
  }
1115474
function(directive, directiveName, currentFile, variables) {
			if (this._inConditional()) {
				if (!this._isConditional(directiveName)) {
					this.currentConditional.addDirective(directive);
					return {output: ""};
				}
			}

			var attributes = this._parseAttributes(directive);

			function interpolate() {
				for (var i = 0; i < attributes.length; i++) {
					var attribute = attributes[i];
					attribute.name = this._interpolate(attribute.name, variables, false);
					attribute.value = this._interpolate(attribute.value, variables, false);
				}
			}

			switch (directiveName) {
				case "if":
					interpolate.apply(this);
					return this._handleIf(attributes);
				case "elif":
					interpolate.apply(this);
					return this._handleElseIf(attributes);
				case "else":
					interpolate.apply(this);
					return this._handleElse();
				case "endif":
					interpolate.apply(this);
					return this._handleEndIf(currentFile, variables);
				case "set":
					interpolate.apply(this);
					return this._handleSet(attributes);
				case "echo":
					interpolate.apply(this);
					return this._handleEcho(attributes, variables);
				case "include":
					interpolate.apply(this);
					return this._handleInclude(attributes, currentFile, variables);
			}

			return {error: "Could not find parse directive #" + directiveName};
		}
606166
function (context) {
            if (context) {
                if (this.contextBuilder) {
                    context = this.contextBuilder(context);
                }
                if (!context.scopeOrder) {
                    context.scopeOrder = this._defaults.scopeOrder;
                }
                return context;
            }
            return { scopeOrder: this._defaults.scopeOrder };
        }
963158
function getGenericDirectives() {
    var directives = {};
    var genericDirectives = {
        'src':          'file',
        'title':        'i18n',
        'placeholder':  'i18n',
        'popover':      'i18n',
        'value':        'i18n',
        'alt':          'i18n',
        'text':         'i18n',
        'id':           null,
        'type':         null,
        'class':        null
    };
    var me = this;

    _.each(genericDirectives, function (type, attr) {

        // no b-class because it is just adding classes one time
        if (attr !== 'class') {
            directives['b-' + attr] = me.getGenericDirective('b', attr, null, true, false);
        }

        directives['bo-' + attr] = me.getGenericDirective('bo', attr, null, true, false);

        if (type) {
            directives['f-' + attr] = me.getGenericDirective('f', attr, type, false, true);
            directives['fo-' + attr] = me.getGenericDirective('fo', attr, type, false, true);
            directives['bf-' + attr] = me.getGenericDirective('bf', attr, type, true, true);
            directives['bfo-' + attr] = me.getGenericDirective('bfo', attr, type, true, true);
        }
    });

    return directives;
}
843066
public Optional<Directives> getFirstHeaderValueAsDirectives(String headerKey) {
        Optional<Header> header = getFirstHeader(headerKey);
        return header.map(Header::getDirectives);
    }
540847
function (genre) {
    return this.get('/getappsingenre', {
      // 'cc': this.options.country,
      // 'l': this.options.language,
     'genre': genre
   }).then(function (body) {
      console.log('getAppsInGenre - ', body)
      return Promise.resolve(body);
    });
  }
323854
def add_directive_header(self, sig):
        """"""
        domain = getattr(self, 'domain', 'py')
        directive = getattr(self, 'directivetype', "module")
        name = self.format_name()
        self.add_line(u'.. %s:%s:: %s%s' % (domain, directive, name, sig),
                      '<autodoc>')
        if self.options.noindex:
            self.add_line(u'   :noindex:', '<autodoc>')
        if self.objpath:
            # Be explicit about the module, this is necessary since .. class::
            # etc. don't support a prepended module name
            self.add_line(u'   :module: %s' % self.modname, '<autodoc>')
179396
function getComponentConstructor(name) {
    var serviceName = name + 'Directive';
    if ($injector.has(serviceName)) {
      var definitions = $injector.get(serviceName);
      if (definitions.length > 1) {
        throw new Error('too many directives named "' + name + '"');
      }
      return definitions[0].controller;
    } else {
      throw new Error('directive "' + name + '" is not registered');
    }
  }
976869
function getApplications() {
    var namespaces = Ember.A(Ember.Namespace.NAMESPACES);

    var apps = namespaces.filter(function(namespace) {
      return namespace instanceof Ember.Application;
    });

    return apps.map(function(app) {
      // Add applicationId and applicationName to the app
      var applicationId = Ember.guidFor(app);
      var applicationName = app.name || app.modulePrefix || `(unknown app - ${applicationId})`;

      Object.assign(app, {
        applicationId,
        applicationName
      });

      return app;
    });
  }
443455
def parse_directive_definition(lexer: Lexer) -> DirectiveDefinitionNode:
    """"""
    start = lexer.token
    description = parse_description(lexer)
    expect_keyword(lexer, "directive")
    expect_token(lexer, TokenKind.AT)
    name = parse_name(lexer)
    args = parse_argument_defs(lexer)
    expect_keyword(lexer, "on")
    locations = parse_directive_locations(lexer)
    return DirectiveDefinitionNode(
        description=description,
        name=name,
        arguments=args,
        locations=locations,
        loc=loc(lexer, start),
    )
445914
function(title) {
            if (this._preTitle.length > 0) title = this._preTitle + " " + title;
            if (_.size(title) == 0) return this.app.name;
            return title + " - " + this.app.name;
        }
1135901
private String getAppPrefix( AppInfo appInfo )
    {
        /// @TODO scope is ignored in key
        return String.format( "%s.%s.", appInfo.getProviderName(), appInfo.getAppName() );
    }
204285
def _get_app_module(self):
        # type: () -> Callable
        

        def configure(binder):
            # type: (Binder) -> Callable
            binder.bind(ServiceApplication, to=self, scope=singleton)
            binder.bind(Config, to=self.config, scope=singleton)

        return configure
447502
function getTag(dom) {
  return dom.tagName && __TAG_IMPL[getAttr(dom, IS_DIRECTIVE) ||
    getAttr(dom, IS_DIRECTIVE) || dom.tagName.toLowerCase()]
}
355270
function reqToAppName(req) {
  var targetName = null;
  try {
    targetName = req.url.split('/').pop();
  } catch (e) {}
  return targetName || null;
}
289800
function baQueryDirective(angularDirective, directiveName) {
    return ['$compile', 'BaseAppsApi', function ($compile, BaseAppsApi) {
      // create unique scope property for media query result, must be unique to avoid collision with other ba-query directives
      // property set upon element compilation or else all similar directives (i.e. ba-if-*/ba-show-*/ba-hide-*) will get the same value
      var queryResult;

      return {
        priority: 1000, // must compile directive before any others
        terminal: true, // don't compile any other directive after this
                        // we'll fix this with a recompile
        restrict: 'A',
        compile: compile
      };

      // From here onward, scope[queryResult] refers to the result of running the provided query
      function compile(element, attrs) {
        var previousParam;

        // set unique property
        queryResult = (directiveName + BaseAppsApi.generateUuid()).replace(/-/g,'');

        // set default configuration
        element.attr('ba-query-not', false);
        element.attr('ba-query-only', false);
        element.attr('ba-query-or-smaller', false);
        element.attr('ba-query-scope-prop', queryResult);

        // parse directive attribute for query parameters
        element.attr(directiveName).split(' ').forEach(function(param) {
          if (param) {
            // add ba-query directive and configuration attributes
            switch (param) {
              case "not":
                element.attr('ba-query-not', true);
                element.attr('ba-query-only', true);
                break;
              case "only":
                element.attr('ba-query-only', true);
                break;
              case "or":
                break;
              case "smaller":
                // allow usage of smaller keyword if preceeded by 'or' keyword
                if (previousParam === "or") {
                  element.attr('ba-query-or-smaller', true);
                }
                break;
              default:
                element.attr('ba-query', param);
                break;
            }

            previousParam = param;
          }
        });

        // add/update angular directive
        if (!element.attr(angularDirective)) {
          element.attr(angularDirective, queryResult);
        } else {
          element.attr(angularDirective, queryResult + ' && (' + element.attr(angularDirective) + ')');
        }

        // remove directive from current element to avoid infinite recompile
        element.removeAttr(directiveName);
        element.removeAttr('data-' + directiveName);

        return {
          pre: function (scope, element, attrs) {
          },
          post: function (scope, element, attrs) {
            // recompile
            $compile(element)(scope);
          }
        };
      }
    }];
  }