INNER CODE UNIT · JavaScript

username

serverless/plugins · generate-docs.js:43

function username(repo) {
  if (!repo) {
    return null;
  }

  var o = url.parse(repo);
  var path = o.path;

  if (path.length && path.charAt(0) === '/') {
    path = path.slice(1);
  }

  path = path.split('/')[0];
  return path;
}

function formatPluginName (string) {
  return toTitleCase(string.toLowerCase().replace(commonPartRe, '').replace(/-/g, ' '))

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…