Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const verify = (query) => {
const result = deparse(parse(query).query);
const json1 = clean(parse(query).query);
const json2 = clean(parse(result).query);
return JSON.stringify(json1) === JSON.stringify(json2);
};
const verify = (query) => {
const result = deparse(parse(query).query);
const json1 = clean(parse(query).query);
const json2 = clean(parse(result).query);
return JSON.stringify(json1) === JSON.stringify(json2);
};
function parse(text, _parsers, _options) {
const { query, error, stderr } = parseSQL(text);
if (error) {
throw error;
}
if (stderr.length) {
throw new Error("Error occurred: " + stderr);
}
return query;
}