feat: Add JavaScript action template
https://github.com/actions/javascript-action
This commit is contained in:
parent
2905a7fc5b
commit
8ffc478ba7
9 changed files with 5537 additions and 5 deletions
11
wait.js
Normal file
11
wait.js
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
let wait = function(milliseconds) {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (typeof(milliseconds) !== 'number') {
|
||||
throw new Error('milleseconds not a number');
|
||||
}
|
||||
|
||||
setTimeout(() => resolve("done!"), milliseconds)
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = wait;
|
||||
Loading…
Add table
Add a link
Reference in a new issue