larsgw / 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.
https://citation.js.org/
MIT License
226 stars 30 forks source link

`Cite.parse.input` and possibly also `Cite.parse` should shortcut to `Cite.parse.input.chain` #60

Closed larsgw closed 7 years ago

larsgw commented 7 years ago

On second thoughts, this isn't a great idea:

  1. Exporting a function from src/parse/input/index makes it an export default, which isn't really how it's supposed to be, and potentially breaking code
  2. How would I decide between parse and parseAsync?
larsgw commented 7 years ago

Apparently you can do both, will test that soon: http://2ality.com/2014/09/es6-modules-final.html#having-both-named-exports-and-a-default-export-in-a-module

larsgw commented 7 years ago

What a roller-coaster this is: I can't make (consistent) shortcuts named Cite.parse, but I can make one named Cite.normalise and a respective async version.