Created
July 20, 2016 09:45
-
-
Save abhijitkane/2ce1937bb33ec7f78a88d642740e78c9 to your computer and use it in GitHub Desktop.
Resolving values in scripts
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
var url = request.url; | |
_.forIn(environment, function(index, key) { | |
url = url.replace(new RegExp("{{"+key+"}}", 'g'), environment[key]); | |
}); | |
console.log(url); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment