apparel-sorter
Advanced tools
Comparing version
@@ -126,2 +126,5 @@ /* | ||
exports.sortSizes = function(sizes) { | ||
if (!sizes) { | ||
return []; | ||
} | ||
return sizes | ||
@@ -128,0 +131,0 @@ .map(matchSizesWithRegexes) |
{ | ||
"name": "apparel-sorter", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "ApparelSorter.js is a set of functions written in JavaScript that provide sorting for apparel sizes such as XS, S, M, L. It can also sort numeric sizes such as 12, 14, 16W, 18W, etc.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -6,2 +6,6 @@ var apparelSorter = require('../lib/ApparelSorter.js'); | ||
it("should return empty array if not passed any sizes", function() { | ||
assert.deepEqual([], apparelSorter.sort()); | ||
}); | ||
it("should sort standard abbreviated sizes", function() { | ||
@@ -8,0 +12,0 @@ var sizes = ["XL", "L", "S", "M", "XS","3XL","1XL","2XL"]; |
10206
1.84%184
3.37%