lib/find-or-add.js
function findOrAdd (state, prefix, idOrObjectOrArray, properties) {
  return Array.isArray(idOrObjectOrArray)
    ? findOrAddMany(state, idOrObjectOrArray, prefix)
    : findOrAddOne(state, idOrObjectOrArray, properties, prefix)
}
function findOrAdd (state, prefix, idOrObjectOrArray, properties) {
  return Array.isArray(idOrObjectOrArray)
    ? findOrAddMany(state, idOrObjectOrArray, prefix)
    : findOrAddOne(state, idOrObjectOrArray, properties, prefix)
}
function findOrAdd ( state , prefix , idOrObjectOrArray , properties ) { return Array . isArray ( idOrObjectOrArray ) ? findOrAddMany ( state , idOrObjectOrArray , prefix ) : findOrAddOne ( state , idOrObjectOrArray , properties , prefix ) }
tries to find object in local database, otherwise creates new one
with passed properties.

@param  {String}                 prefix       optional id prefix
@param  {String|Object|Object[]} idOrObject   id or object with `._id` property
@param  {Object}                 [properties] Optional properties if id passed
as first option
@return {Promise}
tries to find object in local database otherwise creates new one with passed properties .