JavaScript class library based on requirejs