![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
@citation-js/core
Advanced tools
Convert different bibliographic metadata sources.
npm install @citation-js/core
You can read a guide on how to get started, together with some tutorials and examples, here.
Cite
To use the Cite
constructor, require()
the module like this:
const {Cite} = require('@citation-js/core')
For example, to get the bibliographical data of the Wikidata item wd:Q21972834
, and then format it in HTML, English and APA:
let example = new Cite('Q21972834')
let output = example.format('bibliography', {
format: 'html',
template: 'apa',
lang: 'en-US'
})
console.log(output)
To test this code, go to RunKit.
Use the async API (recommended for Wikidata, URL, and DOI input) like this:
let example = await Cite.async('Q21972834')
let output = example.format('bibliography', {
format: 'html',
template: 'apa',
lang: 'en-US'
})
console.log(output)
Cite.async()
also supports options as the second argument, and a callback function as last argument.
0.6.0 (2022-05-30)
core: avoid flatMap for Node 10 support (8a65094)
plugin-bibjson: set correct generic type (ec7de7f)
plugin-bibtex: consider entries with no type (a55fe60)
plugin-bibtex: fix biblatex handling of mastersthesis (6196adf)
plugin-bibtex: fix handling of bookpagination (7f41e30)
plugin-bibtex: fix typo in crossref code (3c377e4)
plugin-bibtex: map biblatex eid to number (0eb15af), closes #140
plugin-bibtex: set default CSL type correctly (94a402e)
plugin-bibtex: set default CSL type correctly (bcd11b3)
plugin-bibtex: use CSL 1.0.2 'custom' field (986f80b)
plugin-ris: fix ISSN regex (76402c1)
plugin-ris: fix name parsing (4382f31)
plugin-wikidata: fall back to original-author (1af1249), closes #106
chore!: drop Node 10, 12 support (37ea76b)
FAQs
Convert different bibliographic metadata sources
The npm package @citation-js/core receives a total of 15,994 weekly downloads. As such, @citation-js/core popularity was classified as popular.
We found that @citation-js/core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.