map-factory
Advanced tools
Comparing version 2.4.0 to 2.4.1
@@ -0,1 +1,5 @@ | ||
### 2.4.1 | ||
Fixed bug where ```each()``` returned a null when supplied with an empty array instead of returing an empty array. | ||
### 2.4.0 | ||
@@ -2,0 +6,0 @@ |
@@ -78,10 +78,5 @@ "use strict"; | ||
// iterate over an array of values and map each one | ||
if (sourceArray.length > 0) { | ||
return sourceArray.map(function (item) { | ||
return _this.execute(item, null); | ||
}); | ||
} | ||
// TODO: This should probably return undefined | ||
return null; | ||
return sourceArray.map(function (item) { | ||
return _this.execute(item, null); | ||
}); | ||
} | ||
@@ -88,0 +83,0 @@ }, { |
@@ -474,3 +474,3 @@ "use strict"; | ||
var expected = null; | ||
var expected = []; | ||
@@ -477,0 +477,0 @@ var map = createSut(); |
{ | ||
"name": "map-factory", | ||
"version": "2.4.0", | ||
"version": "2.4.1", | ||
"description": "A simple object mapping utility that makes it easy to map data from one object to another. Create object mappers using fluent interface that supports deep references (dot notation), custom transformations, and object merging.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/lib/index.js", |
189911
4737