Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
A small module that takes a DOM tree and returns all Digital Object Identifiers (DOIs) located in that tree's metadata.
Unfortunately, academic publishers use a wide variety of metadata "standards". This package normalises between Dublin Core, Highwire Press tags, etc., and the different formatting rules used for DOIs.
To use this library outside of a browser context, you can use a library like jsdom.
This project also includes TypeScript type definitions.
npm install get-dois --save
import { getDois } from 'get-dois';
const head = document.getElementsByTagName('head').item(0);
const dois = getDois(head);
//=> [ '10.31222/osf.io/796tu' ]
getDois(domTree: Document | Element): string[]
domTree
Either window.document
or an HTML element whose children might include meta tags containing a DOI.
An array of DOIs. If no DOIs are found, this will return an empty array. Duplicate DOIs will only be listed once. Note that a page might list multiple DOIs.
At the time of writing, get-dois
supports detecting DOIs embedded in a webpage as:
citation_doi
)eprints.id_number
and/or eprints.official_url
)bepress_citation_doi
)prism.doi
)dc.identifier
and/or dc.relation
)If you encounter a different format that is not yet supported, please file an issue.
MIT © Vincent Tunru
[1.1.0] - 2019-01-17
FAQs
Detect Digital Object Identifiers listed in the metadata of a DOM tree
The npm package get-dois receives a total of 3 weekly downloads. As such, get-dois popularity was classified as not popular.
We found that get-dois demonstrated a not healthy version release cadence and project activity because the last version was released 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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.