From 6ae5f9e2da46e96949d74b537e34ab29f1130d42 Mon Sep 17 00:00:00 2001 From: Bil Herron Date: Wed, 1 Apr 2015 17:36:24 -0400 Subject: [PATCH] Allow date objects to be cast to string --- lib/nice-json2csv.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nice-json2csv.js b/lib/nice-json2csv.js index e4c1871..c41cd5d 100644 --- a/lib/nice-json2csv.js +++ b/lib/nice-json2csv.js @@ -61,7 +61,7 @@ var converter = { if(_.isUndefined(item) || _.isNull(item)) return ''; - if(_.isObject(item)) + if(_.isObject(item) && !(_.isDate(item))) return '[Object]'; return item.toString();