1.0.3 • Published 3 years ago

retrying v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

retrying

NPM Version Node Version

retry a function

Installation

npm i retrying -S

Usage

import retry from 'retrying';
// for commonjs -> const retry = require('retrying').default;

function test() {
  throw new Error('12123');
  // return 1;
}

retry(test, { delay: 1000 })
  .then((ret) => {
    console.log(ret);
  })
  .catch((err) => {
    console.error(err);
  });

Examples

examples are listed at examples

Todo

  • xx

License

MIT

1.0.2

3 years ago

1.0.1

3 years ago

1.0.3

3 years ago

1.0.0

3 years ago