index.js
function isValidPackageName(name) {
  const stats = validateName(name);
  return stats.validForNewPackages === true
    && stats.validForOldPackages === true;
}
function isValidPackageName(name) {
  const stats = validateName(name);
  return stats.validForNewPackages === true
    && stats.validForOldPackages === true;
}
function isValidPackageName ( name ) { const stats = validateName ( name ) ; return stats . validForNewPackages === true && stats . validForOldPackages === true ; }
Returns true if the given name is a valid npm package name
Returns true if the given name is a valid npm package name