Revert "Changements dans les modules (nouvelle version Express, mysql, ..)"

This reverts commit bdab795506.
This commit is contained in:
2023-11-23 16:13:50 +01:00
parent 756f928ced
commit 5b0d68d66f
818 changed files with 35968 additions and 82263 deletions

View File

@@ -40,7 +40,7 @@ SqlString.escape = function escape(val, stringifyObjects, timeZone) {
case 'boolean': return (val) ? 'true' : 'false';
case 'number': return val + '';
case 'object':
if (Object.prototype.toString.call(val) === '[object Date]') {
if (val instanceof Date) {
return SqlString.dateToString(val, timeZone || 'local');
} else if (Array.isArray(val)) {
return SqlString.arrayToList(val, timeZone);
@@ -78,7 +78,7 @@ SqlString.format = function format(sql, values, stringifyObjects, timeZone) {
return sql;
}
if (!Array.isArray(values)) {
if (!(values instanceof Array || Array.isArray(values))) {
values = [values];
}