index.js
function _checkCircular (opts, obj) {
  var key
  if (util.isObject(obj)) {
    if (~opts._visited.indexOf(obj)) {
      return true
    }
    opts._visited.push(obj)
    for (key in obj) {
      if (obj.hasOwnProperty(key) && _checkCircular(opts, obj[key])) {
        return true
      }
    }
  }
  return false
}
function _checkCircular (opts, obj) {
  var key
  if (util.isObject(obj)) {
    if (~opts._visited.indexOf(obj)) {
      return true
    }
    opts._visited.push(obj)
    for (key in obj) {
      if (obj.hasOwnProperty(key) && _checkCircular(opts, obj[key])) {
        return true
      }
    }
  }
  return false
}
function _checkCircular ( opts , obj ) { var key if ( util . isObject ( obj ) ) { if ( ~ opts . _visited . indexOf ( obj ) ) { return true } opts . _visited . push ( obj ) for ( key in obj ) { if ( obj . hasOwnProperty ( key ) && _checkCircular ( opts , obj [ key ] ) ) { return true } } } return false }
recursive helper function
@api private
recursive helper function