vstack-typescript-generator
Advanced tools
Comparing version 0.8.4 to 0.8.5
@@ -35,5 +35,5 @@ "use strict"; | ||
if (shouldToString) { | ||
mapExpression = getToStringExpression(mapVariable, toStringMethodName); | ||
mapExpression = getToStringExpression(mapVariable, toStringMethodName, shouldEncode); | ||
} | ||
if (shouldEncode) { | ||
else if (shouldEncode) { | ||
mapExpression = "encodeURIComponent(" + mapExpression + ")"; | ||
@@ -47,5 +47,5 @@ } | ||
if (shouldToString) { | ||
filterParameter = getToStringExpression(filterParameter, toStringMethodName); | ||
filterParameter = getToStringExpression(filterParameter, toStringMethodName, shouldEncode); | ||
} | ||
if (shouldEncode) { | ||
else if (shouldEncode) { | ||
filterParameter = "encodeURIComponent(" + filterParameter + ")"; | ||
@@ -65,5 +65,7 @@ } | ||
exports.generateFilter = generateFilter; | ||
function getToStringExpression(variable, toStringMethodName) { | ||
return variable + " === null ? null : " + variable + " === undefined ? undefined : " + variable + "." + toStringMethodName + "()"; | ||
function getToStringExpression(variable, toStringMethodName, shouldEncode) { | ||
var variableExpression = variable + "." + toStringMethodName + "()"; | ||
var encodedVariableExpression = shouldEncode ? "encodeURIComponent(" + variableExpression + ")" : variableExpression; | ||
return variable + " === null ? null : " + variable + " === undefined ? undefined : " + encodedVariableExpression; | ||
} | ||
//# sourceMappingURL=generate-filter.js.map |
@@ -35,5 +35,5 @@ "use strict"; | ||
if (shouldToString) { | ||
mapExpression = getToStringExpression(mapVariable, toStringMethodName); | ||
mapExpression = getToStringExpression(mapVariable, toStringMethodName, shouldEncode); | ||
} | ||
if (shouldEncode) { | ||
else if (shouldEncode) { | ||
mapExpression = "encodeURIComponent(" + mapExpression + ")"; | ||
@@ -47,5 +47,5 @@ } | ||
if (shouldToString) { | ||
filterParameter = getToStringExpression(filterParameter, toStringMethodName); | ||
filterParameter = getToStringExpression(filterParameter, toStringMethodName, shouldEncode); | ||
} | ||
if (shouldEncode) { | ||
else if (shouldEncode) { | ||
filterParameter = "encodeURIComponent(" + filterParameter + ")"; | ||
@@ -65,5 +65,7 @@ } | ||
exports.generateFilter = generateFilter; | ||
function getToStringExpression(variable, toStringMethodName) { | ||
return variable + " === null ? null : " + variable + " === undefined ? undefined : " + variable + "." + toStringMethodName + "()"; | ||
function getToStringExpression(variable, toStringMethodName, shouldEncode) { | ||
var variableExpression = variable + "." + toStringMethodName + "()"; | ||
var encodedVariableExpression = shouldEncode ? "encodeURIComponent(" + variableExpression + ")" : variableExpression; | ||
return variable + " === null ? null : " + variable + " === undefined ? undefined : " + encodedVariableExpression; | ||
} | ||
//# sourceMappingURL=generate-filter.js.map |
{ | ||
"name": "vstack-typescript-generator", | ||
"version": "0.8.4", | ||
"version": "0.8.5", | ||
"description": "Tool to generate TypeScript interfaces and TypeScript filter classes for Vstack from C# sources.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
255366
146
1635