index.js
function mergeReferences (oldRefs, newRefs) {
    const _newRefs = _(newRefs);

    return _(oldRefs)
        .reject(function (oldRef) {
            return _newRefs.any(function (newRef) {
                return matches(oldRef, newRef);
            });
        })
        .concat(newRefs)
        .uniq()
        .sort()
        .value();
}
function mergeReferences (oldRefs, newRefs) {
    const _newRefs = _(newRefs);

    return _(oldRefs)
        .reject(function (oldRef) {
            return _newRefs.any(function (newRef) {
                return matches(oldRef, newRef);
            });
        })
        .concat(newRefs)
        .uniq()
        .sort()
        .value();
}
function mergeReferences ( oldRefs , newRefs ) { const _newRefs = _ ( newRefs ) ; return _ ( oldRefs ) . reject ( function ( oldRef ) { return _newRefs . any ( function ( newRef ) { return matches ( oldRef , newRef ) ; } ) ; } ) . concat ( newRefs ) . uniq ( ) . sort ( ) . value ( ) ; }
Merge new references with old references; ignore old references from the same file.
Merge new references with old references ; ignore old references from the same file .