2.0.2 • Published 3 years ago

nanodelay v2.0.2

Weekly downloads
643
License
MIT
Repository
github
Last release
3 years ago

Nano Delay

A tiny Promise wrapper around setTimeout for JavaScript. Returns a Promise and resolve it after a specific amount of time.

  • Only 40 bytes (minified and gzipped), 10 times smaller than delay library.
  • Has good ES modules and TypeScript support.
import { delay } from 'nanodelay'

async function foo () {
  await delay(300)
  // Executed after 300 milliseconds
}

delay(300).then(() => {
  // Executed after 300 milliseconds
})

Docs

Read full docs on GitHub.

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago