Skip to content

Useful utility function for ensuring assets are loaded before trying to use them.

License

Notifications You must be signed in to change notification settings

mightyspring/waitanddo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

waitanddo

Useful utility function for ensuring assets are loaded before trying to use them.

To use, imagine that you're loading a file and you want to make sure it exists before trying to use it:

load('/mycoolthing.js');

waitAndDo({
    test: function() { return !!MyCoolThing; }
    , do: MyCoolThing.init
});

About

Useful utility function for ensuring assets are loaded before trying to use them.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published