1.0.0 • Published 7 years ago

@tiaanduplessis/nap v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

Install

$ npm install @tiaanduplessis/nap
# OR
$ yarn add @tiaanduplessis/nap

Usage

import nap from '@tiaanduplessis/nap'

nap().then(() => console.log('Took a 1 sec nap'))
nap(3000).then(() => console.log('Took a 3 sec nap'))
nap(5000).then(() => console.log('Took a 5 sec nap'))

async function doThings () {
  await nap(4000)
  console.log('Took a 4 sec nap')
}

doThings()

// Took a 1 sec nap
// Took a 3 sec nap
// Took a 4 sec nap
// Took a 5 sec nap

Contributing

Contributions are welcome!

  1. Fork it.
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Or open up a issue.

License

Licensed under the MIT License.

1.0.0

7 years ago