isBlobUri.js 475 B

12345678910111213141516171819202122
  1. import Check from "./Check.js";
  2. const blobUriRegex = /^blob:/i;
  3. /**
  4. * Determines if the specified uri is a blob uri.
  5. *
  6. * @function isBlobUri
  7. *
  8. * @param {string} uri The uri to test.
  9. * @returns {boolean} true when the uri is a blob uri; otherwise, false.
  10. *
  11. * @private
  12. */
  13. function isBlobUri(uri) {
  14. //>>includeStart('debug', pragmas.debug);
  15. Check.typeOf.string("uri", uri);
  16. //>>includeEnd('debug');
  17. return blobUriRegex.test(uri);
  18. }
  19. export default isBlobUri;