src/store/modules/schemas.js
/**
   * Fetch the latest versions of all subjects.
   * If the given subject has no version set is the latest version set to null.
   * @return {Object}  Latest versions of subjects
   */
Fetch the latest versions of all subjects.
If the given subject has no version set is the latest version set to null.
@return {Object}  Latest versions of subjects
Fetch the latest versions of all subjects . If the given subject has no version set is the latest version set to null . @return { Object } Latest versions of subjects
latest (state) {
    let subjects = {}
    for (let subject in state.subjects) {
      const versions = Object.keys(state.subjects[subject])
      const latest = versions.length > 0 ? Math.max(...versions) : null
      subjects[subject] = {
        schema: state.subjects[subject][latest],
        version: latest
      }
    }
    return subjects
  }
latest ( state ) { let subjects = { } for ( let subject in state . subjects ) { const versions = Object . keys ( state . subjects [ subject ] ) const latest = versions . length > 0 ? Math . max ( ... versions ) : null subjects [ subject ] = { schema : state . subjects [ subject ] [ latest ] , version : latest } } return subjects }
Fetch the latest versions of all subjects.
Fetch the latest versions of all subjects .