browser-side JS loader which follows the syntax in Node