mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-08-04 21:39:04 +00:00
add support for all ports
This commit is contained in:
@@ -22,3 +22,10 @@ module.exports.getUserHome = function(){
|
||||
return process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE;
|
||||
}
|
||||
|
||||
module.exports.simpleRender = function(str, object, regexp){
|
||||
return String(str).replace(regexp || (/\{\{([^{}]+)\}\}/g), function(match, name){
|
||||
if (match.charAt(0) == '\\') return match.slice(1);
|
||||
return (object[name] != null) ? object[name] : '';
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user