searchIndexIsCurrent function
Whether output already holds exactly build's JSON.
Meant for a --check flag: run this in CI instead of writing, so a
content change that forgot to regenerate the index fails the build rather
than silently going stale.
Implementation
bool searchIndexIsCurrent(SearchIndexBuild build, File output) =>
output.existsSync() && output.readAsStringSync() == build.json;