sources/i-return.js
function dispatchResult (error, data) {
    if (_cb.beforeAll) { _cb.beforeAll() }

    if (_cb.returnForAll) {
      _cb.returnForAll(error, data)
    } else if (!_isNullOrEmptyArray(error)) {
      var _error = _normalizeError(error)
      if (!_isNullOrEmptyArray(data)) {
        processErrorAndData(_error, data)
      } else {
        processError(_error)
      }
    } else {
      if (!_isNullOrEmptyArray(data)) {
        processData(data)
      } else {
        processNotFound()
      }
    }

    if (_cb.afterAll) { _cb.afterAll() }
  }
function dispatchResult (error, data) {
    if (_cb.beforeAll) { _cb.beforeAll() }

    if (_cb.returnForAll) {
      _cb.returnForAll(error, data)
    } else if (!_isNullOrEmptyArray(error)) {
      var _error = _normalizeError(error)
      if (!_isNullOrEmptyArray(data)) {
        processErrorAndData(_error, data)
      } else {
        processError(_error)
      }
    } else {
      if (!_isNullOrEmptyArray(data)) {
        processData(data)
      } else {
        processNotFound()
      }
    }

    if (_cb.afterAll) { _cb.afterAll() }
  }
function dispatchResult ( error , data ) { if ( _cb . beforeAll ) { _cb . beforeAll ( ) } if ( _cb . returnForAll ) { _cb . returnForAll ( error , data ) } else if ( ! _isNullOrEmptyArray ( error ) ) { var _error = _normalizeError ( error ) if ( ! _isNullOrEmptyArray ( data ) ) { processErrorAndData ( _error , data ) } else { processError ( _error ) } } else { if ( ! _isNullOrEmptyArray ( data ) ) { processData ( data ) } else { processNotFound ( ) } } if ( _cb . afterAll ) { _cb . afterAll ( ) } }
The callback that will be used for parse database response
The callback that will be used for parse database response