Turn a dependency list into lowercase, and make sure all entries
        that are just a string become a tuple of strings
778825
def fix_deplist(deps):
    
    deps = [
        ((dep.lower(),)
         if not isinstance(dep, (list, tuple))
         else tuple([dep_entry.lower()
                     for dep_entry in dep
                    ]))
        for dep in deps
    ]
    return deps
264017
function dashProperCase(str) {
        if ( !str.length ) {
            return str;
        }
        return str.split('-').map(function (piece) {
            if ( piece.length ) {
                return piece.substring(0, 1).toUpperCase() + piece.substring(1);
            }
            return piece;
        }).join('-');
    }
1102433
def dependency_list(self, tkn: str) -> List[str]:
        
        if tkn not in self.dependency_map:
            self.dependency_map[tkn] = [tkn]        # Force a circular reference
            self.dependency_map[tkn] = self.reference(tkn).dependency_list()
        return self.dependency_map[tkn]
662658
def lowercase(self):
        
        if len(self.children) > 0:
            for child in self.children:
                child.lowercase()
        else:
            self.text = self.text.lower()
940644
def resolve
      list = dependency_list.sort { |a, b| a.last.size <=> b.last.size }
      resolve_list(list)
    end
1146511
def bracketedList(l, r, sep, expr, allow_missing_close=False):
  
  # We may need to backtrack for lists, because of list comprehension, but not for
  # any of the other lists
  strict = l != '['
  closer = sym(r) if not allow_missing_close else p.Optional(sym(r))
  if strict:
    return sym(l) - listMembers(sep, expr) - closer
  else:
    return sym(l) + listMembers(sep, expr) + closer
3465
def case_insensitive(self):
        
        if "--case-ins" in self.flag:
            data = []
            data = Utils().package_name(self.PACKAGES_TXT)
            data_dict = Utils().case_sensitive(data)
            for pkg in self.packages:
                index = self.packages.index(pkg)
                for key, value in data_dict.iteritems():
                    if key == pkg.lower():
                        self.packages[index] = value
372613
def str_deps(self):
        """"""
        lines = []
        app = lines.append

        app("Dependencies of node %s:" % str(self))
        for i, dep in enumerate(self.deps):
            app("%d) %s, status=%s" % (i, dep.info, str(dep.status)))

        return "\n".join(lines)
1134809
def dotperu_exclude_case_insensitive_git_globs():
    """"""
    globs = []
    for capitalization in DOTPERU_CAPITALIZATIONS:
        globs.append(capitalization + '/**')
        globs.append('**/' + capitalization + '/**')
    return globs
427465
def camelCaseToDashName(camelCase):
        '''
            
        '''

        camelCaseList = list(camelCase)

        ret = []

        for ch in camelCaseList:
            if ch.isupper():
                ret.append('-')
                ret.append(ch.lower())
            else:
                ret.append(ch)

        return ''.join(ret)
1121415
def _parse_dependencies(string):
    
    contents = _get_contents_between(string, '(', ')')
    unsorted_dependencies = contents.split(',')
    _check_parameters(unsorted_dependencies, ('?',))

    buildable_dependencies = []
    given_dependencies = []
    for dependency in unsorted_dependencies:
        if dependency[0] == '?':
            given_dependencies.append(dependency[1:])
        else:
            buildable_dependencies.append(dependency)

    string = string[string.index(')') + 1:]
    return buildable_dependencies, given_dependencies, string
950352
def _string_from_cmd_list(cmd_list):
    """"""
    cl = []
    for arg in map(str, cmd_list):
        if ' ' in arg or '\t' in arg:
            arg = '"' + arg + '"'
        cl.append(arg)
    return ' '.join(cl)
307457
def _list_dict(l: Iterator[str], case_insensitive: bool = False):
    
    if case_insensitive:
        raise NotImplementedError()
        d = tldap.dict.CaseInsensitiveDict()
    else:
        d = {}
    for i in l:
        d[i] = None
    return d
998113
function combineDepends( depends ) {
   var deps, items;

    deps = [];

    _.each(depends, function(ex) {
        items = [];
        switch (ex.type) {
            case 'Literal':
                items = _.map(ex.value.split(','), function(v) {
                    return v.trim();
                });
                break;
            case 'ArrayExpression':
                items = _.map(ex.elements, function(v) {
                    return v.value.trim();
                });
                break;
        }

        deps = _.union(deps, items)
    });

    return deps;
}
1233664
def _clean_listofcomponents(listofcomponents):
    """"""
    def totuple(item):
        """return a tuple"""
        if isinstance(item, (tuple, list)):
            return item
        else:
            return (item, None)
    return [totuple(item) for item in listofcomponents]
826144
def _ToCamelCase(name):
  """"""
  capitalize_next = False
  result = []

  for c in name:
    if c == '_':
      if result:
        capitalize_next = True
    elif capitalize_next:
      result.append(c.upper())
      capitalize_next = False
    else:
      result += c

  # Lower-case the first letter.
  if result and result[0].isupper():
    result[0] = result[0].lower()
  return ''.join(result)
649047
def _str_to_list(value, separator):
    """"""
    value_list = [item.strip() for item in value.split(separator)]
    value_list_sanitized = builtins.list(filter(None, value_list))
    if len(value_list_sanitized) > 0:
        return value_list_sanitized
    else:
        raise ValueError('Invalid list variable.')