lib/modules/apostrophe-utils/lib/helpers.js
function(array, without, property) {
      return _.filter(Array.isArray(array) ? array : [], function(item) {
        return !_.find(without || [], function(other) {
          if (property) {
            return _.isEqual(item[property], other);
          } else {
            return _.isEqual(item, other);
          }
        });
      });
    }
function(array, without, property) {
      return _.filter(Array.isArray(array) ? array : [], function(item) {
        return !_.find(without || [], function(other) {
          if (property) {
            return _.isEqual(item[property], other);
          } else {
            return _.isEqual(item, other);
          }
        });
      });
    }
function ( array , without , property ) { return _ . filter ( Array . isArray ( array ) ? array : [ ] , function ( item ) { return ! _ . find ( without || [ ] , function ( other ) { if ( property ) { return _ . isEqual ( item [ property ] , other ) ; } else { return _ . isEqual ( item , other ) ; } } ) ; } ) ; }
Given the arrays `array` and `without`, return only the elements of `array` that do not occur in `without`. If `without` is not an array it is treated as an empty array.  If `property` is present, then that property of each element of array is compared to elements of `without`. This is useful when `array` contains full-blown choices with a `value` property, while `without `just contains actual values.  A deep comparison is performed with `_.isEqual`.
Given the arrays array and without return only the elements of array that do not occur in without . If without is not an array it is treated as an empty array . If property is present then that property of each element of array is compared to elements of without . This is useful when array contains full - blown choices with a value property while without just contains actual values . A deep comparison is performed with _ . isEqual .