fiduswriter / biblatex-csl-converter

A set of JavaScript converters: bib(la)tex => json, json => csl, and json => biblatex
GNU Lesser General Public License v3.0
34 stars 10 forks source link

BibLatexExporter does not get bibtexStr #108

Closed zwz closed 4 years ago

zwz commented 4 years ago

This is what I did

var convert = require('biblatex-csl-converter')
var x = convert.parse(`
@patent{sorace,
  author       = {Reinhardt, Victor S. and Vaughn, Steven
                  A.},
  title        = {High-Speed Digital-to-{RF} Converter},
  number       = 5668842,
  date         = {1997-09-16},
  holder       = {{Hughes Aircraft Company}},
  type         = {patentus},
}`)
var y = new convert.BibLatexExporter(x)
console.log(y.bibtexStr)                                            // empty string

BTW, I cannot find the manual to learn how to use this package.

johanneswilm commented 4 years ago

Take a look at the tests. And even the README.md. Given that you use require instead of import though, it may simply be that your setup is too old. Please try updating.

retorquere commented 4 years ago

It'll work, node documentation still shows require in a lot of places. Try

var y = new convert.BibLatexExporter(x).parse()