Created
September 29, 2016 21:14
-
-
Save jensblond/6acd6dc2f66ae6236784cd3a3e1f16cb to your computer and use it in GitHub Desktop.
parsing.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function() { | |
var inputVariable = {{Page URL}}, | |
defaultVal = [], | |
categories = {{OMF Mapping}}; | |
for (var i = 0, len = categories.length; i < len; i++) { | |
var regex = new RegExp(categories[i].path); | |
if (regex.test(inputVariable)) { | |
return categories[i]; | |
} | |
} | |
return defaultVal; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment