GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - tiaanduplessis/nap: Unfancy promise based sleep function

BranchesTags
Open more actions menu

Latest commit

 

History

16 Commits
16 Commits

Folders and files

NameName
Last commit message
Last commit date
dist
dist
 
 
src
src
 
 
test
test
 
 
.editorconfig
.editorconfig
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
package.json
package.json
 
 
yarn.lock
yarn.lock
 
 

Repository files navigation

nap

Unfancy promise based sleep function

npm package version Codecov npm downloads standard JS linter prettier code formatting travis ci build status project license make a pull request

Table of Contents

Table of Contents
  • Install
  • Usage
  • Contribute
  • License
  • Install

    Greenkeeper badge

    $ 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

    MIT

    About

    Unfancy promise based sleep function

    Topics

    nappromisesleep

    Resources

    Readme
    MIT license
    Activity

    Stars

    1 star

    Watchers

    0 watching

    Forks

    0 forks
    Report repository

    Releases

    Packages

    Used by

    Contributors

    Languages

    You are visitor 01402792 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.