module.exports = function(str, obj) {
    return str.replace(/\$\{[^}]+\}/g, function(match){
        var keyArray = match.replace(/[\{\}\$]/g, "").split(".");
        var currentVal = obj;
        for(var i = 0; i < keyArray.length; i++) {
            currentVal = currentVal[keyArray[i]];
        }
        return currentVal;
    });
}

@@ -27,24 +27,45 @@
 str, obj) %7B%0A
+    str = str %7C%7C %22%22;%0A
     return s

fix error when empty or falsey string object passed