api/RegistrationAPI.js
function validStore(store) {
    return store &&
      typeof store.getNodes === 'function' &&
      typeof store.getNode === 'function' &&
      typeof store.getDevices === 'function' &&
      typeof store.getDevice === 'function' &&
      typeof store.getSources === 'function' &&
      typeof store.getSource === 'function' &&
      typeof store.getSenders === 'function' &&
      typeof store.getSender === 'function' &&
      typeof store.getReceivers === 'function' &&
      typeof store.getReceiver === 'function' &&
      typeof store.getFlows === 'function' &&
      typeof store.getFlow === 'function';
      // TODO add more of the required methods ... or drop this check?
  }
function validStore(store) {
    return store &&
      typeof store.getNodes === 'function' &&
      typeof store.getNode === 'function' &&
      typeof store.getDevices === 'function' &&
      typeof store.getDevice === 'function' &&
      typeof store.getSources === 'function' &&
      typeof store.getSource === 'function' &&
      typeof store.getSenders === 'function' &&
      typeof store.getSender === 'function' &&
      typeof store.getReceivers === 'function' &&
      typeof store.getReceiver === 'function' &&
      typeof store.getFlows === 'function' &&
      typeof store.getFlow === 'function';
      // TODO add more of the required methods ... or drop this check?
  }
function validStore ( store ) { return store && typeof store . getNodes === 'function' && typeof store . getNode === 'function' && typeof store . getDevices === 'function' && typeof store . getDevice === 'function' && typeof store . getSources === 'function' && typeof store . getSource === 'function' && typeof store . getSenders === 'function' && typeof store . getSender === 'function' && typeof store . getReceivers === 'function' && typeof store . getReceiver === 'function' && typeof store . getFlows === 'function' && typeof store . getFlow === 'function' ; // TODO add more of the required methods ... or drop this check?
 }
Check that a store has a sufficient contract for this API
Check that a store has a sufficient contract for this API