How to use the citation-js.parse function in citation-js

To help you get started, we’ve selected a few citation-js examples, based on popular ways it is used in public projects.

github larsgw / citation.js / dev / bibtex.html View on Github external
<script>$(function load(){
var str = $('#ins').text(), $out = $('#out')

var Cite = require('citation-js')
console.profile('Citation.js')
a=Cite.parse.bibtex.text(str)
console.profileEnd()

console.profile('ORCID bibtex-parser-js')
b=bibtexParse.toJSON(str)
console.profileEnd()

// var parse = module.exports
// console.profile('bibtex-parser')
// c=parse(str)
// console.profileEnd()

$out.text([a,b/*,c*/].map(c=>JSON.stringify(c,null,2)).join('\n\n'))
})</script>
github seulibrary / Sorin / apps / frontend / assets / js / components / Citation / index.js View on Github external
if (cData.itemtype != null) {
            let itemtype = cData.itemtype

            if (cData.itemtype == "article") {
                itemtype = "article-journal"
            }

            json.type = itemtype
        }

        if (cData.volume != null) {
            json.volume = cData.volume
        }

        return Cite.parse.csl([json])
    }
github larsgw / citation.js / docs / demo / demo.html View on Github external
default:return;break;
	  }
	});
      }
    </script>
    <script class="code" type="text/javascript">

citation-js

Citation.js converts formats like BibTeX, Wikidata JSON and ContentMine JSON to CSL-JSON to convert to other formats like APA, Vancouver and back to BibTeX.

MIT
Latest version published 2 months ago

Package Health Score

68 / 100
Full package analysis

Similar packages