Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (isNdjson) {
outputFormat = 'ndjson'
inputFormat = 'ndjson'
}
check({ query, inputFormat, outputFormat })
// Parse query
const tree = parse(query)
// Read input
const inputter = INPUTTERS[inputFormat]
const options = await inputter()
// Execute query
const result = await evaluate(tree, options)
// Stream output
const streamer = OUTPUTTERS[outputFormat]
yield* await streamer(result)
}