source: trip-planner-front/node_modules/piscina/test/fixtures/eval-async.js@ bdd6491

Last change on this file since bdd6491 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 267 bytes
Line 
1'use strict';
2
3const { promisify } = require('util');
4const sleep = promisify(setTimeout);
5
6// eslint-disable-next-line no-eval
7function handler (code) { return eval(code); }
8
9async function load () {
10 await sleep(100);
11 return handler;
12}
13
14module.exports = load();
Note: See TracBrowser for help on using the repository browser.