var _ = require('lodash');
var moment = require('moment');

exports.isIndividuValid = isIndividuValid;
exports.getEnfants = getEnfants;

function isIndividuValid(individu, situation) {
    var age = moment(situation.dateDeValeur).diff(moment(individu.dateDeNaissance), 'years');
    var handicap = _.find(individu.situationsPro, { situation: 'handicap' });
    return individu.role != 'enfant' || age <= 25 || handicap;
};

function getEnfants(situation) {
    var enfants = _.filter(situation.individus, function(individu) {
        return isIndividuValid(individu, situation) && individu.role == 'enfant';
    });
    return _.pluck(enfants, '_id');
};

@@ -414,17 +414,16 @@
 dicap;%0A%7D
-;
 %0A%0Afuncti
@@ -645,10 +645,9 @@
 _id');%0A%7D
-;
 %0A

Remove unnecessary comments