Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function test (name, uri, check) {
const r2 = await r2pipe.open(uri);
const res = await check(r2);
console.error(res? '\x1b[32m[OK]\x1b[0m': '\x1b[31m[XX]\x1b[0m', name);
return r2.quit();
}