lib/mongoose-slug-hero.js
function hasChanged(newData, oldData) {
    var changed = false
    for (var i = 0; i < scope.length; i++) {
      var k = scope[i],
        newVal = _.get(newData, k),
        oldVal = _.get(oldData, k)
      if (!_.isEqual(newVal, oldVal)) {
        changed = true
        break
      }
    }

    return changed
  }
function hasChanged(newData, oldData) {
    var changed = false
    for (var i = 0; i < scope.length; i++) {
      var k = scope[i],
        newVal = _.get(newData, k),
        oldVal = _.get(oldData, k)
      if (!_.isEqual(newVal, oldVal)) {
        changed = true
        break
      }
    }

    return changed
  }
function hasChanged ( newData , oldData ) { var changed = false for ( var i = 0 ; i < scope . length ; i ++ ) { var k = scope [ i ] , newVal = _ . get ( newData , k ) , oldVal = _ . get ( oldData , k ) if ( ! _ . isEqual ( newVal , oldVal ) ) { changed = true break } } return changed }
Determine is the slug field value changed
Determine is the slug field value changed