Comparing version 0.0.6 to 0.0.7
@@ -5,3 +5,3 @@ 'use strict'; | ||
async = require('async'), | ||
_ = require('underscore'); | ||
_ = require('lodash'); | ||
@@ -15,8 +15,13 @@ function underscore(obj, cb) { | ||
async.forEach(obj[field], function(object, arrNext) { | ||
underscore(object, function(err, underscored) { | ||
if (err) return arrNext(err); | ||
if (!_.isObject(object)) { | ||
results.push(object); | ||
return arrNext(); | ||
} else { | ||
underscore(object, function(err, underscored) { | ||
if (err) return arrNext(err); | ||
results.push(underscored); | ||
return arrNext(); | ||
}); | ||
results.push(underscored); | ||
return arrNext(); | ||
}); | ||
} | ||
}, function() { | ||
@@ -23,0 +28,0 @@ serialized[S(field).underscore().s] = results; |
@@ -1,2 +0,2 @@ | ||
var _ = require('underscore') | ||
var _ = require('lodash') | ||
, async = require('async'); | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
var _ = require('underscore') | ||
var _ = require('lodash') | ||
, async = require('async') | ||
@@ -3,0 +3,0 @@ , J = require('./index'); |
@@ -5,3 +5,3 @@ { | ||
"description": "jiggler provides a simple and flexible interface for defining representations for your JavaScript objects.", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"repository": { | ||
@@ -19,5 +19,5 @@ "type": "git", | ||
"dependencies": { | ||
"underscore": "1.3.x", | ||
"async": "0.1.x", | ||
"string": "~1.7.0" | ||
"string": "~1.7.0", | ||
"lodash": "~2.4.1" | ||
}, | ||
@@ -24,0 +24,0 @@ "devDependencies": { |
27794
636
+ Addedlodash@~2.4.1
+ Addedlodash@2.4.2(transitive)
- Removedunderscore@1.3.x
- Removedunderscore@1.3.3(transitive)