How to use nanodelay - 5 common examples

To help you get started, we’ve selected a few nanodelay examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TheURBN / hype-game / src / components / Score.vue View on Github external
captureFlag() {
      this.showCapture = true;
      delay(3000).then(() => { this.showCapture = false })
    },
  },
github TheURBN / hype-game / src / connect.js View on Github external
loadVoxels(data.data).then(() => {
      if (store.firstLoad) return delay(2000).then(() => store.hideMainLoader());
    });
  },
github TheURBN / hype-game / src / connect.js View on Github external
    .then(() => delay(5000))
    .then(() => {
github TheURBN / hype-game / src / dashboard / index.js View on Github external
  socket.addEventListener('close', () => delay(config.timeout)
    .then(() => store.user.firebaseUser.getIdToken().then(token => connectDashboard(token))));
github TheURBN / hype-game / src / connect.js View on Github external
  socket.addEventListener('close', () => delay(config.timeout)
    .then(() => store.user.firebaseUser.getIdToken().then(token => connectGame(token))));

nanodelay

A tiny (25 bytes) Promise wrapper around setTimeout

MIT
Latest version published 3 years ago

Package Health Score

50 / 100
Full package analysis

Popular nanodelay functions