src/mongoose/merge.js
Function mergePlugin
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = exports = function mergePlugin(schema) {
schema.methods.merge = function merge(other, callback) {
var self = this;
var conflicts = [];
var pathsToMerge = Object.keys(other.toObject());
Function merge
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
schema.methods.merge = function merge(other, callback) {
var self = this;
var conflicts = [];
var pathsToMerge = Object.keys(other.toObject());
_.each(pathsToMerge, function(path) {
Avoid too many return
statements within this function. Open
Open
return;
Avoid too many return
statements within this function. Open
Open
return;
Avoid too many return
statements within this function. Open
Open
return;