3.75 GB
76,734 files
Updated about 2 months ago
Ctrl+K
| Name | Size | Uploaded | Xet hash |
|---|---|---|---|
| lib | 5 items | ||
| lib-mjs | 5 items | ||
| LICENSE.md | 1.09 kB xet | e4fc8516 | |
| README.md | 1.85 kB xet | 8651ef8c | |
| package.json | 1.06 kB xet | 7f77847b |
@citation-js/plugin-doi
Plugin for DOI input for Citation.js.
Install
npm install @citation-js/plugin-doi
Usage
Register by importing the package:
require('@citation-js/plugin-doi')
'Polite' API access
The plugin fetches data from DOIs using DOI Content Negotiation, which means the Crossref, DataCite, and mEDRA APIs are indirectly used.
Crossref strongly encourages
adding a mailto: link to the User-Agent header or URL parameters
to get higher rate limits. Because the Crossref API is only used indirectly,
the URL parameter method cannot be used consistently. Additionally, the User-Agent
header cannot be set in the browser. For non-browser usage however,
the user agent can be set like this:
const { util, version } = require('@citation-js/core')
util.setUserAgent(`Example Foo (mailto:foo@example.org) Citation.js/${version} Node.js/${process.versions.node}`)
Formats
Formats and other features added by this plugin.
Input
Supports DOIs inputted in the following ways:
@doi/api: adoi.orgURL@doi/id: a single DOI@doi/list+text: whitespace-separated list of DOIs@doi/list+object: array of DOIs
Additionally, the following internal type is exposed:
@doi/type: fix thetypevalue in certain API responses
- Total size
- 3.75 GB
- Files
- 76,734
- Last updated
- Sep 11
- Pre-warmed CDN
- US EU US EU