Skip to contents

The "did anything change?" predicate for a compare_sitemap_audits() result: TRUE when the two audits are identical (an empty diff), FALSE otherwise.

Usage

audit_unchanged(x)

Arguments

x

A sitemap_audit_diff, as returned by compare_sitemap_audits().

Value

A length-one logical: TRUE if no rows were added, removed, or changed in any component, else FALSE.

Examples

xml <- paste0(
  '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">',
  "<url><loc>https://example.com/</loc></url></urlset>"
)
path <- tempfile(fileext = ".xml")
writeLines(xml, path)
audit <- sitemap_audit(urls = read_sitemap(path))

audit_unchanged(compare_sitemap_audits(audit, audit))
#> [1] TRUE