Skip to content
Snippets Groups Projects
Select Git revision
  • 84e1a6230f8f1ad16a689dba53b80b902332d5e7
  • main default protected
  • dev protected
  • tclabby-main-patch-92350
  • tclabby-main-patch-26246
  • operon-struct-type
  • operon-struct-type-article
  • remove-duplicate-structure-Lamassu-Fam_PDDEXK
  • operon-struct-type-article-update
  • system-distribution-plot
  • update-article-auto-sections
  • genome-context-system
  • select-columns
  • mao
  • ftesson_abip2
  • ftesson_abia
  • ftesson_abij
  • ftesson_abiz
  • ftesson_abie
  • ftesson_abir
  • ftesson_abii
21 results

articles.ts

Blame
  • articles.ts 745 B
    import { defineStore } from 'pinia'
    import { ref } from 'vue'
    
    
    export interface CslJson {
        id: string
        type: string
        title: string
        "container-title": string
        page: string,
        volume: string,
        abstract: string
        URL: string
        DOI: string
        journalAbbreviation: string
        language: string
        author: Array<{ family: string, given: string }>
        issued: {
            "date-parts": Array<string>
        },
    }
    
    export const useArticlesStore = defineStore('articles', () => {
        const articles = ref(new Map<string, CslJson>())
        function add(article: CslJson) {
            const doi = article.DOI
            if (articles.value.has(doi)) return
            articles.value.set(article.DOI, article)
        }
    
        return { articles, add }
    })