
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
#Introduction
md2json可以提取带有meta的Markdown内容,并返回一个JSON格式的数据。一个很常见的应用,是提取博客文章中的meta。md2json支持自定义meta中的key,并且可以设置数据格式
#Usage
##scan(dir, filter, maps, callback);
@summary 扫描所有的markdown
@param {String} dir - 要扫描的文件夹
@param {Array | RegExp} filter - 过滤条件,Array: 根据扩展名过滤;RegExp:根据正则过滤
@param {Array | null} maps - 影射规则
@param {Function} callback - 回调函数,callback(json);
##convert(text, maps);
@summary 转换markdown格式的文本为article
@param {String} text - markdown格式的文本
@returns {Object} 返回转换后的JSON数据
##参数变量 ###maps
maps提取meta的映射列表,如果此项为false,则提取所有的meta。一个合法的map应该包含:
array或datetype为array,则此项可以设置数组的分隔符,默认为,type为date,则此项可设置为日期的格式化表达式,详细请参考moment.js#Test
mocha
#Author
Conis
Blog: http://iove.net
E-mail: conis.yi@gmail.com
FAQs
将markdown转换为json,适用于带meta的文章类markdown
The npm package md2json receives a total of 5 weekly downloads. As such, md2json popularity was classified as not popular.
We found that md2json demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.

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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.