api_loader.js 440 B

12345678910111213141516171819
  1. function apiLoader(svc, version) {
  2. if (!apiLoader.services.hasOwnProperty(svc)) {
  3. throw new Error('InvalidService: Failed to load api for ' + svc);
  4. }
  5. return apiLoader.services[svc][version];
  6. }
  7. /**
  8. * @api private
  9. *
  10. * This member of AWS.apiLoader is private, but changing it will necessitate a
  11. * change to ../scripts/services-table-generator.ts
  12. */
  13. apiLoader.services = {};
  14. /**
  15. * @api private
  16. */
  17. module.exports = apiLoader;