@megatherium/sleep
v0.4.2
Published
Returns a Promise that resolves after a given amount of milliseconds.
Readme
sleep
Returns a Promise that resolves after a given amount of milliseconds.
See the whole documentation or the coverage report.
Getting started
Install the module:
$ npm install @megatherium/sleep
Use the module:
import sleep from '@megatherium/sleep';
(async() => {
console.log('Waiting 2 seconds...');
await sleep(2000);
console.log('Waited 2 seconds.');
})();API
Exports
sleep(timeoutInMilliseconds: int): Promise Returns a Promise that resolves after a given amount of milliseconds.
Scripts
The following scripts can be executed using npm run:
buildBuilds the module.build-docsBuilds the documentation.build-sourceBuilds the source code.build-testsBuilds test-cases from jsdoc examples.clearClears the module from a previous build.clear-coverageClears the coverage reports and caches.clear-docsClears the previous documentation build.clear-sourceClears the previous source build.clear-testsClears the generated jsdoc example test files.fixRuns all automated fixes.fix-lintAutomatically fixes linting problems.releaseRuns semantic release. Meant to be only executed by the CI, not by human users.testExecutes all tests.test-coverageGenerates coverage reports from the test results using nyc.test-depsExecutes a depcheck.test-e2eExecutes End-to-End-Tests using cucumber.test-integrationExecutes integration tests using jest.test-lintExecutes linting tests using eslint.test-unitExecutes unit tests using mocha.updateChecks for dependency updates using renovate.
Contribution
See Contribution Guidelines for more details.
