Skip to content

Instantly share code, notes, and snippets.

@MarkTiedemann
Created December 13, 2019 23:38
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save MarkTiedemann/a3735e1d36087c299cce8319c413fed7 to your computer and use it in GitHub Desktop.
the-lost-art-of-the-makefile/01-your-tests-dont-need-to-be-phony/02
// Usage: node ndjson_validator.js < file
require("readline")
.createInterface(process.stdin)
.on("line", line => {
try { JSON.parse(line) }
catch { process.exit(1) }
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment