🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@citation-js/plugin-hayagriva

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@citation-js/plugin-hayagriva

Citation.js plugin for the Hayagriva YAML format used in Typst.

latest
Source
npmnpm
Version
0.1.2
Version published
Maintainers
0
Created
Source

Citation.js plugin for the Hayagriva YAML format (v0.1.1) used in Typst.

NPM version Codecov NPM total downloads License

Install

npm install @citation-js/plugin-hayagriva

Use

Install the plugin by require-ing it:

require('@citation-js/plugin-hayagriva')

Formats

Formats and other features added by this plugin.

Input

Because Hayagriva has no distinguishing characteristics (compared to other bibliographical formats) that can be expected to occur in (nearly) all records, types have to be indicates manually:

const input = `citation-js:
    type: article
    title: "Citation.js: a format-independent, modular bibliography tool for the browser and command line"
    author: Willighagen, Lars G.
    date: 2019-08-12
    doi: 10.7717/peerj-cs.214
    serial-number: e214
    parent:
        type: periodical
        title:
            value: PeerJ Computer Science
            verbatim: true
        volume: 5
        issn: 2376-5992`

Cite(input, { forceType: '@hayagriva/file' })

{
  title: 'Citation.js: a format-independent, modular bibliography tool for the browser and command line',
  author: [{ family: 'Willighagen', given: 'Lars G.' }],
  issued: [{ 'date-parts': [[2019, 8, 12]] }],
  volume: 5,
  DOI: '10.7717/peerj-cs.214',
  number: 'e214',
  ISSN: '2376-5992',
  type: 'article-journal',
  'container-title': '<span class="nocase">PeerJ Computer Science</span>',
  'citation-key': 'citation-js'
}

Output

Cite(...).format('hayagriva', { asObject: false /* or true */ })

License

The code and most other contents in this repository is licensed MIT. test/input.yml contains examples from the Hayagriva repository, dual-licensed under MIT.

Keywords

Citation.js

FAQs

Package last updated on 27 Dec 2024

Did you know?

Socket

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.

Install

Related posts