
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Are you tired to write every time the documentation of your programs??
This module can simplify this, in fact docs-draft build a structure of a documentation. You have to create only a draftFile.js and choose what you want from a simple paragraph to a table
First globally:
$ npm i -g docs-draft
Now in your project:
$ npm i docs-draft
You have to create a draftFile.js in your program folder.
example of draftFile.js:
const docsDraft = require('docs-draft');
docsDraft({ create: { projectName: 'docs-draft' } });
docsDraft({
addParagraph: {
title: '## Example',
paragraph: 'this README is created with docs-draft'
}
});
You can invoke one time the function and execute many task in one time.
There is an example here
When you finish with the draftFile you have to run this command on your cli in the folder where the draftFile is:
$ draft
Good, now you have your documentation in markdown.
projectName = string
options = object
options = {
npm: true,
dependencies: {
username: 'example',
repository: 'example'
}
...
}
Create a README.md and if it already exists, the contents of the file is replaced.
In the draftFile.js
const docsDraft = require('docs-draft');
docsDraft({
create: {
projectName: 'docs-draft',
options: {
npm: true,
dependencies: {
username: 'example',
repository: 'example'
}
}
}
});
This method create in the current directory a README.md file
title: string
paragraph: string
options = {
title: 'string',
pargraph: 'string'
}
The title is a string which have also # for sub paragraph
ex.
const docsDraft = require('docs-draft');
docsDraft({
addParagraph: {
title: '# Hello',
paragraph: 'how are you?'
}
});
docsDraft({
addParagraph: {
title: '## Hello',
paragraph: 'how are you?'
}
});
docsDraft({
addParagraph: {
title: '### Hello',
paragraph: 'how are you?'
}
});
contents: array of string
options = {
contents: [...]
}
ex.
const docsDraft = require('docs-draft');
docsDraft({
tableOfContents: {
contents: ['value1', 'value2']
}
});
columns: number, records: number
options = {
colums: 10,
records: 10
}
ATTENTION: THE FIRST RECORD IS FOR HEADERS
ex.
const docsDraft = require('docs-draft');
docsDraft({
table: {
columns: 23,
records: 12
}
})
here an example of draftFile.js
MIT
FAQs
Create a draft of a README.md
We found that docs-draft 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.