function validatePackageManifestName(manifest, manifestDirPath) {
    if (!hasValidNameField(manifest)) {
        throw new Error(`Manifest in "${manifestDirPath}" does not have a valid "${ManifestFieldNames.Name}" field.`);
    }
    return manifest;
}
/**
 * Validates the "name" field of a package manifest object, i.e. a parsed
 * "package.json" file.
 *
 * @param manifest - The manifest to validate.
 * @param manifestDirPath - The path to the directory containing the
 * manifest file relative to the root directory.
 * @returns The unmodified manifest, with the "name" field typed correctly.
 */
Validates the "name" field of a package manifest object, i.e.

@param manifest - The manifest to validate.
@param manifestDirPath - The path to the directory containing the
manifest file relative to the root directory.
@returns The unmodified manifest, with the "name" field typed correctly.
Validates the " name " field of a package manifest object i . e . @param manifest - The manifest to validate . @param manifestDirPath - The path to the directory containing the manifest file relative to the root directory . @returns The unmodified manifest with the " name " field typed correctly .
function validatePackageManifestName(manifest, manifestDirPath) {
    if (!hasValidNameField(manifest)) {
        throw new Error(`Manifest in "${manifestDirPath}" does not have a valid "${ManifestFieldNames.Name}" field.`);
    }
    return manifest;
}
function validatePackageManifestName ( manifest , manifestDirPath ) { if ( ! hasValidNameField ( manifest ) ) { throw new Error ( ` ${ manifestDirPath } ${ ManifestFieldNames . Name } ` ) ; } return manifest ; }
Validates the "name" field of a package manifest object, i.e.
Validates the " name " field of a package manifest object i . e .