
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.

Caffeinated markdown ☕️
Interpret mmd fenced code blocks in a markdown file and generate a cooler version of it.
mmd fenced code blockconst name = 'Jessie'
const hello = '#### Hello '
return hello + name
yarn add mmarkdown --dev
{
"mmarkdown": {
"src": "./Readme/Readme.md",
"out": "./Readme.md",
"scripts": "./Readme/Readme.js",
"backup": "true",
"backupPath": "./Readme/backup/"
}
}
{
"scripts":{
"make-readme": "markdown"
}
}
| argument | description | default |
|---|---|---|
| src | Source md file | ./ReadmeSrc/Readme.md |
| out | Output md file | ./Readme.md |
| scripts | Helper JS file | ./ReadmeSrc/Readme.js |
| backup | Do a backup of the output file | false |
| backupPath | backup path | ./ReadmeSrc/backup/ |
| help | Show help | |
| version | Show version number |
{
"scripts":{
"make-readme": "markdown --backup --backupPath ./backupReadme/"
}
}
Mmarkdown takes a plain markdown file and generates a copy of it.
It starts to be less boring when you add fenced code blocks with the language identifier set to mmd.
Everything that is returned (as a string) from the code in the block will be interpreted and replaced to the block in the output file.
It's full async, which is cool, lots of awaits are waiting for you there but soon enough you will face a problem: too much code to write in a markdown file! Terrible experience!
The solution in mmarkdown is in the scripts option. The module that the scripts file returns will be passed to the context of the fenced block, see example 3.
The backup option, false by default, will make a copy of the current output file, postfix it with a timestamp and move it into backupPath.
mmd fenced code block:const hello = message => {
return message
}
return hello('### hippieeeeee hippie yeeeee!!!!!!!!')
mmd fenced code block:const array = [1, 3, 5]
return array.map(item => '## ' + item).join('\n\n')
this file is passed to mmarkdown with the scripts option.
//scripts is passed
const array = [1, 3, 5]
const something = await scripts.processMyArray(array)
const myFinalString = something.map(item => '## ' + item.name)
.join('\n\n')
return myFinalString
The file you are reading right now is generated starting this other file.
For a kind of boilerplate repo instead, have a look at this repo.
PRs accepted.
MIT © 2018 Albino Tonnina
FAQs
Caffeinated markdown
The npm package mmarkdown receives a total of 4 weekly downloads. As such, mmarkdown popularity was classified as not popular.
We found that mmarkdown 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.