Comparing version 0.1.2 to 0.1.3
@@ -55,3 +55,3 @@ /** | ||
function decodeVersion(file) { | ||
return file.version.match(/(\d+)\.(\d+)\.(\d+)/).slice(1, 4); | ||
return file.version.split('.'); | ||
} | ||
@@ -66,4 +66,13 @@ | ||
var v1 = decodeVersion(file1), v2 = decodeVersion(file2); | ||
return cmp(v1[0], v2[0]) || cmp(v1[1], v2[1]) || cmp(v1[2], v2[2]); | ||
var v1 = decodeVersion(file1), v2 = decodeVersion(file2), | ||
nibbles = Math.min(v1.length, v2.length), | ||
partialResult; | ||
for (var i = 0; i < nibbles; i++) { | ||
partialResult = cmp(v1[i], v2[i]); | ||
if (partialResult) return partialResult; | ||
} | ||
return v1.length > nibbles ? -1 : 1; | ||
} | ||
@@ -120,3 +129,3 @@ | ||
stream.on('error', onError); | ||
stream.on('end', function() { | ||
writer.on('close', function() { | ||
ftpClient.end(); | ||
@@ -123,0 +132,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "Node bindings for the libxl library for reading and writing excel (XLS and XLSX) spreadsheets.", | ||
@@ -8,0 +8,0 @@ "keywords": [ |
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
912163
1415