
Product
Introducing Scala and Kotlin Support in Socket
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
doctrine-file
Advanced tools
You can install Doctrine-File using npm:
$ npm install doctrine-file --save-dev
Import doctrine-File inside of your JavaScript:
import { parseFile, parseFileContent } from 'doctrine-file';
file
String PathName to a textfileoptions
Object
callback
FunctionThe callback is passed two arguments (err, comments)
, where comments
is an array of doctrine results.
If no JSDocs can be extracted from the file, the array will be empty.
When the file cannot be read err
will contain the Error
.
Here's a simple example:
parseFile('somefile.js', (err, comments) => {
if (err) throw err;
comments.forEach(console.log);
});
content
String | Buffer Content of a complete file to be parsedoptions
Object
Here's a simple example:
const content = fs.readFileSync('somefile.js', 'utf-8');
const comments = parseFileContent(content);
comments.forEach(console.log);
doctrine-file is licensed under the MIT license.
FAQs
File-Reader for the Doctrine JSDoc Parser
The npm package doctrine-file receives a total of 4,379 weekly downloads. As such, doctrine-file popularity was classified as popular.
We found that doctrine-file demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers 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.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
Application Security
/Security News
Socket CEO Feross Aboukhadijeh and a16z partner Joel de la Garza discuss vibe coding, AI-driven software development, and how the rise of LLMs, despite their risks, still points toward a more secure and innovative future.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.