Comparing version 1.5.4 to 1.5.5
@@ -391,3 +391,3 @@ // Generated by CoffeeScript 1.7.1 | ||
if (!this.config.options.port && !this.config.options.instanceName) { | ||
return this.config.options.port = DEFAULT_PORT; | ||
this.config.options.port = DEFAULT_PORT; | ||
} else if (this.config.options.port && this.config.options.instanceName) { | ||
@@ -400,2 +400,5 @@ throw new Error("Port and instanceName are mutually exclusive, but " + this.config.options.port + " and " + this.config.options.instanceName + " provided"); | ||
} | ||
if (this.config.options.columnNameReplacer && typeof this.config.options.columnNameReplacer !== 'function') { | ||
throw new TypeError('options.columnNameReplacer must be a function or null.'); | ||
} | ||
}; | ||
@@ -402,0 +405,0 @@ |
@@ -10,3 +10,3 @@ // Generated by CoffeeScript 1.7.1 | ||
columns = []; | ||
for (c = _i = 1; 1 <= columnCount ? _i <= columnCount : _i >= columnCount; c = 1 <= columnCount ? ++_i : --_i) { | ||
for (c = _i = 0; 0 <= columnCount ? _i < columnCount : _i > columnCount; c = 0 <= columnCount ? ++_i : --_i) { | ||
metadata = metadataParse(buffer, options); | ||
@@ -31,3 +31,5 @@ if (metadata.type.hasTableName) { | ||
colName = buffer.readBVarchar(); | ||
if (options.camelCaseColumns) { | ||
if (options.columnNameReplacer) { | ||
colName = options.columnNameReplacer(colName, c, metadata); | ||
} else if (options.camelCaseColumns) { | ||
colName = colName.replace(/^[A-Z]/, function(s) { | ||
@@ -34,0 +36,0 @@ return s.toLowerCase(); |
@@ -33,3 +33,3 @@ { | ||
], | ||
"version": "1.5.4", | ||
"version": "1.5.5", | ||
"main": "./lib/tedious.js", | ||
@@ -36,0 +36,0 @@ "repository": { |
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
191010
5551