<NME> validChangeFreq.js
<BEF> ADDFILE
<MSG> Adding changeFreq, lastMod, and priorityMap options (#27)


<DFF> @@ -0,0 +1,17 @@
+module.exports = desiredChangeFreq => {
+  const acceptedChangeFreqs = [
+    'always',
+    'hourly',
+    'daily',
+    'weekly',
+    'monthly',
+    'yearly',
+    'never',
+  ];
+  if (acceptedChangeFreqs.indexOf(desiredChangeFreq) === -1) {
+    // eslint-disable-next-line
+    console.warn('Desired change frequency is not a valid type. Ignoring.');
+    return '';
+  }
+  return desiredChangeFreq;
+};

{'addition_count': 17, 'commit_subject': 'Adding changeFreq, lastMod, and priorityMap options (#27)', 'deletion_count': 0, 'file_extension': '.js', 'lang': 'js', 'license': 'mit', 'repo_name': 'lgraubner/sitemap-generator'}