source:
trip-planner-front/node_modules/piscina/test/fixtures/esm-async.mjs@
84d0fbb
Last change on this file since 84d0fbb was 6a3a178, checked in by , 3 years ago | |
---|---|
|
|
File size: 241 bytes |
Rev | Line | |
---|---|---|
[6a3a178] | 1 | import util from 'util'; |
2 | const sleep = util.promisify(setTimeout); | |
3 | ||
4 | // eslint-disable-next-line no-eval | |
5 | function handler (code) { return eval(code); } | |
6 | ||
7 | async function load () { | |
8 | await sleep(100); | |
9 | return handler; | |
10 | } | |
11 | ||
12 | export default load(); |
Note:
See TracBrowser
for help on using the repository browser.