cmbf-hapi-restmodel
Advanced tools
Comparing version 0.6.16 to 0.6.17
@@ -140,3 +140,11 @@ var Joi = require('joi'), | ||
if(!(data instanceof this)) { | ||
return new this(data); | ||
if(_.isArray(data)) { | ||
var _this = this; | ||
return _.map(data, function(d){ return new _this(d)}); | ||
} | ||
else { | ||
return new this(data); | ||
} | ||
} | ||
@@ -143,0 +151,0 @@ else |
{ | ||
"name": "cmbf-hapi-restmodel", | ||
"version": "0.6.16", | ||
"version": "0.6.17", | ||
"author": "Joel Grenon <joelgrenon@covistra.com>", | ||
@@ -5,0 +5,0 @@ "description": "Hapi plugin building a REST Api from Joi schema, backed by covistra-mongo plugin", |
42517
691