Comparing version 2.2.22 to 2.2.23
@@ -52,7 +52,18 @@ 'use strict'; | ||
var escapeComparison = function escapeComparison(value) { | ||
if (!think.isArray(value)) return value; | ||
if (!think.isString(value[0])) return value[0]; | ||
if (_comparison2.default.COMPARISON_LIST.indexOf(value[0].toUpperCase()) > -1) { | ||
value[0] += ' '; | ||
if (think.isArray(value) && typeof value[0] === 'string') { | ||
if (_comparison2.default.COMPARISON_LIST.indexOf(value[0].toUpperCase()) > -1) { | ||
value[0] += ' '; | ||
} | ||
} | ||
if (think.isObject(value)) { | ||
var result = {}; | ||
for (var key in value) { | ||
if (_comparison2.default.COMPARISON_LIST.indexOf(key.toUpperCase()) > -1) { | ||
result[key + ' '] = value[key]; | ||
} else { | ||
result[key] = value[key]; | ||
} | ||
} | ||
return result; | ||
} | ||
return value; | ||
@@ -59,0 +70,0 @@ }; |
{ | ||
"name": "thinkjs", | ||
"description": "ThinkJS - Use full ES6/7 features to develop web applications, Support TypeScript", | ||
"version": "2.2.22", | ||
"version": "2.2.23", | ||
"author": { | ||
@@ -21,4 +21,4 @@ "name": "welefen", | ||
}, | ||
"publishConfig": { | ||
"tag": "v2" | ||
"publishConfig": { | ||
"tag": "v2" | ||
}, | ||
@@ -25,0 +25,0 @@ "contributors": [ |
@@ -10,7 +10,18 @@ 'use strict'; | ||
const escapeComparison = value => { | ||
if(!think.isArray(value)) return value; | ||
if(!think.isString(value[0])) return value[0]; | ||
if(comparison.COMPARISON_LIST.indexOf(value[0].toUpperCase()) > -1) { | ||
value[0] += ' '; | ||
if(think.isArray(value) && typeof value[0] === 'string') { | ||
if(comparison.COMPARISON_LIST.indexOf(value[0].toUpperCase()) > -1) { | ||
value[0] += ' '; | ||
} | ||
} | ||
if(think.isObject(value)) { | ||
var result = {}; | ||
for(var key in value) { | ||
if(comparison.COMPARISON_LIST.indexOf(key.toUpperCase()) > -1) { | ||
result[key + ' '] = value[key]; | ||
}else{ | ||
result[key] = value[key]; | ||
} | ||
} | ||
return result; | ||
} | ||
return value; | ||
@@ -17,0 +28,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1284652
335
36856