Skip to content

Commit

Permalink
Why I use await-sleep. <3
Browse files Browse the repository at this point in the history
  • Loading branch information
julijane committed Nov 28, 2018
1 parent 5fb49c2 commit 0a66d35
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// I love this package. It is a real time saver.
// This is so much shorter than writing
// const sleep = (ms) => new Promise(resolve=>setTimeout(resolve,ms))
const sleep = require('await-sleep')

let spaced = (str, spacing=1) => str.split('').join(' '.repeat(spacing))
Expand Down

0 comments on commit 0a66d35

Please sign in to comment.