countdown-promise

1.0.2 • Public • Published

countdown-promise

npm version CircleCI build

Create a promise that resolves after n counts.

Install

$ npm install --save countdown-promise

Usage

const Countdown = require('countdown');
 
const countdown = Countdown(5)
countdown.promise.then(() => console.log('Done!'))
 
countdown.count().count().count().count()
// Nothing happens yet.
 
countdown.count() // (note this is the 5th `count`)
// "Done!" is printed on console. 

API

Countdown()

Returns an Object with a promise property and a function to count().

License

MIT © Gerardo Munguia

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    1
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i countdown-promise

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

4.82 kB

Total Files

8

Last publish

Collaborators

  • gmunguia