@skeinteam/wait-for
v0.0.22
Published
Use waitFor to delay the execution of a piece of code until a dependency is loaded.
Readme
waitFor
Use waitFor to delay the execution of a piece of code until a dependency is loaded.
Installation
npm install --save @skeinteam/wait-for
Usage
For example, if waiting for jQuery to be loaded:
waitFor('jQuery')
.then(() => {
console.log('jQuery is loaded');
})
.catch(error => console.log(error));