common/corpus-common-addon/addon/utils/utils.js
changeset 502 74fba571487e
parent 490 76da86cf9696
child 519 ef3e4841d506
--- a/common/corpus-common-addon/addon/utils/utils.js	Mon Feb 06 16:05:02 2017 +0100
+++ b/common/corpus-common-addon/addon/utils/utils.js	Wed Feb 08 15:25:24 2017 +0100
@@ -94,6 +94,7 @@
   _.forEach(constants.OLAC_BASE_URL, function (olacDef, urlPrefix) {
     if (_.startsWith(datatype, urlPrefix)) {
       olacRes = olacDef;
+
       return false; // we found it, we exit early
     }
 
@@ -108,3 +109,7 @@
 
   return Boolean(olacDef);
 }
+
+export function isDCMILink(s) {
+  return s && typeof s === 'string' && s.startsWith(constants.DCMI_BASE_URL);
+}