delay-promise-func

0.0.6 • Public • Published

delay-promise-func

Function that returns promise that wait specified milliseconds and then call specified function.

Coverage Status Build Status

Example

const delayed = require('delay-promise-func');

const p = (url) => require('axios').get(url);

const delayed_p = delayed(p, 500);

delayed_p(url).then(res => {
    //will call axios's get() after 500ms of waiting
})

Readme

Keywords

Package Sidebar

Install

npm i delay-promise-func

Weekly Downloads

1

Version

0.0.6

License

MIT

Unpacked Size

6.79 kB

Total Files

6

Last publish

Collaborators

  • artemdudkin