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