alphanum-sort
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -0,0 +0,0 @@ var zero = '0'.charCodeAt(0); |
@@ -8,4 +8,4 @@ var compare = require('./compare'); | ||
module.exports = function (array, opts) { | ||
if (!Array.isArray(array)) { | ||
array = []; | ||
if (!Array.isArray(array) || array.length < 2) { | ||
return array; | ||
} | ||
@@ -17,3 +17,3 @@ if (typeof opts !== 'object') { | ||
var insensitive = !!opts.insensitive; | ||
var result = []; | ||
var result = Array(array.length); | ||
var i, max, value; | ||
@@ -23,6 +23,6 @@ | ||
value = String(array[i]); | ||
result.push({ | ||
result[i] = { | ||
value: array[i], | ||
converted: insensitive ? value.toLowerCase() : value | ||
}); | ||
}; | ||
} | ||
@@ -29,0 +29,0 @@ |
{ | ||
"name": "alphanum-sort", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Alphanumeric sorting algorithm", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
6400