lib/package.js
function guessSlug(wpPackage) {
  var directory = wpPackage.getPath();
  var slug = path.basename(directory);
  var slug2 = path.basename(path.dirname(directory));

  if ('trunk' === slug || 'src' === slug) {
    slug = slug2;
  } else if (-1 !== ['branches', 'tags'].indexOf(slug2)) {
    slug = path.basename(path.dirname(path.dirname(directory)));
  }

  return slug;
}
function guessSlug(wpPackage) {
  var directory = wpPackage.getPath();
  var slug = path.basename(directory);
  var slug2 = path.basename(path.dirname(directory));

  if ('trunk' === slug || 'src' === slug) {
    slug = slug2;
  } else if (-1 !== ['branches', 'tags'].indexOf(slug2)) {
    slug = path.basename(path.dirname(path.dirname(directory)));
  }

  return slug;
}
function guessSlug ( wpPackage ) { var directory = wpPackage . getPath ( ) ; var slug = path . basename ( directory ) ; var slug2 = path . basename ( path . dirname ( directory ) ) ; if ( 'trunk' === slug || 'src' === slug ) { slug = slug2 ; } else if ( - 1 !== [ 'branches' , 'tags' ] . indexOf ( slug2 ) ) { slug = path . basename ( path . dirname ( path . dirname ( directory ) ) ) ; } return slug ; }
Guess the wpPackage slug.

See MakePOT::guess_plugin_slug() in makepot.php

@returns {string}
Guess the wpPackage slug .