0.4.2 • Published 5 years ago

@megatherium/sleep v0.4.2

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
gitlab
Last release
5 years ago

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:

  • build Builds the module.
  • build-docs Builds the documentation.
  • build-source Builds the source code.
  • build-tests Builds test-cases from jsdoc examples.
  • clear Clears the module from a previous build.
  • clear-coverage Clears the coverage reports and caches.
  • clear-docs Clears the previous documentation build.
  • clear-source Clears the previous source build.
  • clear-tests Clears the generated jsdoc example test files.
  • fix Runs all automated fixes.
  • fix-lint Automatically fixes linting problems.
  • release Runs semantic release. Meant to be only executed by the CI, not by human users.
  • test Executes all tests.
  • test-coverage Generates coverage reports from the test results using nyc.
  • test-deps Executes a depcheck.
  • test-e2e Executes End-to-End-Tests using cucumber.
  • test-integration Executes integration tests using jest.
  • test-lint Executes linting tests using eslint.
  • test-unit Executes unit tests using mocha.
  • update Checks for dependency updates using renovate.

Contribution

See Contribution Guidelines for more details.

0.4.2

5 years ago

0.4.1

5 years ago

0.2.3

5 years ago