Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Javascript module that exports a function to load external JS on the fly. A script is not included more than once so multiple places on the page can attempt to load the same script.

Basic usage:

import scriptLoader from 'ohjs-script-loader';

await scriptLoader(
    'https://maps.googleapis.com/maps/api/js',
    () => {
        return window.hasOwnProperty('google')
            && window.google.hasOwnProperty('maps');
    }
);

console.log('Google Maps API is ready!');

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages