Format package name to CamelCase
432635
public function inflectPackageVars($vars)
    {
        $vars['name'] = strtolower(str_replace(array('-', '_'), ' ', $vars['name']));
        $vars['name'] = str_replace(' ', '', ucwords($vars['name']));

        return $vars;
    }
74469
function camelCase(str, next) {
    let output = '';
    for (const c of str) {
        if (c === '_') {
            next = true;
            continue;
        }
        output += next ? c.toUpperCase() : c;
        next = false;
    }
    return output;
}
747890
function camelCase(input) {
  let str = input.toLowerCase().replace(/-(.)/g, function (match, group1) {
    return group1.toUpperCase();
  });

  str = str.replace(/_(.)/g, function (match, group1) {
    return group1.toUpperCase();
  });
  return str
}
213404
def get_package_format_names(predicate=None):
    """"""
    return [
        k
        for k, v in six.iteritems(get_package_formats())
        if not predicate or predicate(k, v)
    ]
748892
public static String toNamespace(String packageName) {

        if (packageName == null || packageName.length() == 0) {
            return null;
        }
        List < String > tokens = reverse(tokenize(packageName, "."));
        
        StringBuilder buf = new StringBuilder("http://");
        for (int i = 1; i < tokens.size(); i++) {
            buf.append(tokens.get(i));
            buf.append(".");
        }
        if (buf.charAt(buf.length() - 1) == '.') {
            buf.deleteCharAt(buf.length() - 1);
            buf.append("/");
        }
        buf.append(tokens.get(0));
        return buf.toString();
       
    }
175287
def resolve_name(name, package):
    """"""
    if not name.startswith('.'):
        return name
    elif not package:
        raise ValueError('{!r} is not a relative name '
                         '(no leading dot)'.format(name))
    level = 0
    for character in name:
        if character != '.':
            break
        level += 1
    return _resolve_name(name[level:], package, level)
1113533
def lower_camel_case_from_underscores(string):
    """"""
    components = string.split('_')
    string = components[0]
    for component in components[1:]:
        string += component[0].upper() + component[1:]
    return string
1352042
function camelize(string) {
  return string.replace(/-+(.)?/g, function(match, character) {
    return character ? character.toUpperCase() : '';
  });
}
344667
def proper_case(package_name):
    """"""
    # Hit the simple API.
    r = _get_requests_session().get(
        "https://pypi.org/pypi/{0}/json".format(package_name), timeout=0.3, stream=True
    )
    if not r.ok:
        raise IOError(
            "Unable to find package {0} in PyPI repository.".format(package_name)
        )

    r = parse.parse("https://pypi.org/pypi/{name}/json", r.url)
    good_name = r["name"]
    return good_name
761558
def format_path(p, quote_spaces=False):
    """"""
    if b'\n' in p:
        p = re.sub(b'\n', b'\\n', p)
        quote = True
    else:
        quote = p[0] == b'"' or (quote_spaces and b' ' in p)
    if quote:
        extra = GIT_FAST_IMPORT_NEEDS_EXTRA_SPACE_AFTER_QUOTE and b' ' or b''
        p = b'"' + p + b'"' + extra
    return p
1169183
def camelcase(string):
    '''
    '''
    out = slug(string).replace('-', ' ').title().replace(' ', '')
    return out[0].lower() + out[1:]
669949
def convert_package_names(package_names):
    

    results = []
    errors = []

    for name in (
            package_names.split()
            if hasattr(package_names, 'split') else package_names):
        try:
            Requirement.parse(name)
        except ValueError:
            errors.append(name)
        else:
            results.append(name)

    return results, errors
779609
function camelcase(str) {
  if (!/[\s\W]/.test(str)) return str;
  if (str.length === 1) {
    return str.toLowerCase();
  }
  str = str.replace(/^[\W_]+|[\W_]+$/g, '').toLowerCase();
  return str.replace(/[\W_]+(\w|$)/g, function(_, ch) {
    return ch.toUpperCase();
  });
}
876373
def _resolve_name(name, package, level):
    """"""
    bits = package.rsplit('.', level - 1)
    if len(bits) < level:
        raise ValueError('attempted relative import beyond top-level package')
    base = bits[0]
    return '{}.{}'.format(base, name) if name else base
1116419
function formatAsElegantPath(path, sep) {
    const packages = path.split(sep);

    // prettier-ignore
    const result = packages.map(item => item.trim()).join(' -> ');
    return result;
}
1031561
def _CamelCaseToSnakeCase(path_name):
  """"""
  result = []
  for c in path_name:
    if c == '_':
      raise ParseError('Fail to parse FieldMask: Path name '
                       '{0} must not contain "_"s.'.format(path_name))
    if c.isupper():
      result += '_'
      result += c.lower()
    else:
      result += c
  return ''.join(result)
92388
def generate_tab_names(name):
    

    package_name, module_name = name.rsplit('.', 1)

    version = ply_dist.version.replace(
        '.', '_') if ply_dist is not None else 'unknown'
    data = (package_name, module_name, py_major, version)
    lextab = '%s.lextab_%s_py%d_ply%s' % data
    yacctab = '%s.yacctab_%s_py%d_ply%s' % data
    return lextab, yacctab