INNER CODE UNIT · JavaScript
sync
m4heshd/better-sqlite3-multiple-ciphers · benchmark/benchmark.js:5
const sync = (fn) => {
display(benchmark(fn));
};
const async = (fn) => {
const wrapped = cb => fn().then(() => cb(), cb);
benchmark(wrapped).then(display);
};
const display = (result) => {
process.stdout.write(String(result).replace(/ \(.*/, ''));
process.exit();
};
(async () => {
process.on('unhandledRejection', (err) => { throw err; });
const ctx = JSON.parse(process.argv[2]);
const type = require(`./types/${ctx.type}`);