How to use the @citation-js/core/lib/plugin-common/input.parsers function in @citation-js/core

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

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github larsgw / citation.js / index.js View on Github external
prop: bibtex.parsers.prop.parse,
    text: bibtex.parsers.text.parse,
    type: bibtex.parsers.type.parse
  bibtxt: ((bibtxt) => ({
    text: bibtxt.parse,
    textEntry: bibtxt.textEntry
  doi: ((doi) => ({
    api: doi.parsers.api.parse,
    async: {
      api: doi.parsers.api.parseAsync
  json: require('@citation-js/core/lib/plugin-common/input').parsers.json.parse,
  wikidata: ((wikidata) => ({
    json: wikidata.parsers.entity.parse,
    prop: wikidata.parsers.prop.parse,
    type: wikidata.parsers.prop.parseType,
    async: {
      json: wikidata.parsers.entity.parseAsync,
      prop (...args) {
        return Promise.resolve(wikidata.parsers.prop.parse.apply(this, args))
}, Cite.plugins.input)

Cite.get = Object.assign({
  dict: Cite.plugins.dict,