Skip to content

artemdudkin/delay-promise-func

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
})

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published