index.js
function getDepths(depths, callback) {

    async.parallel([
        async.apply(store.getStore().getDepth.bind(store.getStore()), depths.parentUrl),
        async.apply(store.getStore().getDepth.bind(store.getStore()), depths.linkUri)
    ],
    function(error, results){
        if (error) {
          return callback(error);
        }
        depths.parentDepth = results[0];
        depths.linkDepth = results[1];
        callback(null, depths);
    });
}
function getDepths(depths, callback) {

    async.parallel([
        async.apply(store.getStore().getDepth.bind(store.getStore()), depths.parentUrl),
        async.apply(store.getStore().getDepth.bind(store.getStore()), depths.linkUri)
    ],
    function(error, results){
        if (error) {
          return callback(error);
        }
        depths.parentDepth = results[0];
        depths.linkDepth = results[1];
        callback(null, depths);
    });
}
function getDepths ( depths , callback ) { async . parallel ( [ async . apply ( store . getStore ( ) . getDepth . bind ( store . getStore ( ) ) , depths . parentUrl ) , async . apply ( store . getStore ( ) . getDepth . bind ( store . getStore ( ) ) , depths . linkUri ) ] , function ( error , results ) { if ( error ) { return callback ( error ) ; } depths . parentDepth = results [ 0 ] ; depths . linkDepth = results [ 1 ] ; callback ( null , depths ) ; } ) ; }
get the crawl depths for a parent & link uri


@param a structure containing both url
{parentUrl : parentUrl, linkUri : linkUri}
@param callback(error, depth)
get the crawl depths for a parent & link uri