Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
mds-to-json
Advanced tools
parse md files to json.
npm install
npm run test
example:
var mdToJson = require('../src/index.js'),
path = require('path');
let {
parsedFiles
} = mdToJson({});
var res = parsedFiles(path.join(__dirname, './_posts'));
console.log(res.total);
console.log(res.data[0].meta);
console.log(res.data[0].summary);
console.log(res.data[0].content);
type: Object
var res = {
total: 10,
data: [
{
meta:{ title: '简单的dom库和轻量级mvvm框架的尝试',
date: 2016-02-21T19:07:19.000Z,
tags: [ 'js' ],
id: '0',
createTime: '2016-02-22',
url: '2016-02-22-简单的dom库和轻量级mvvm框架的尝试',
strTag: 'js' }
}
]
}
parseFiles | Function
return parsed data by json. 按 json 格式返回处理后的数据.
use add a plugin
parse
Object
marked optionsparse file use plugin
plugins
examples:
var mdToJson = require('mds-to-json')();
mdToJson.use((res, next)=>{
console.log(res.total);
next(res);
})
mdToJson.use('printTotal', (res, next)=>{
console.log(res.total);
next(res);
})
mdToJson.parse((res)=>{
console.log(res);
})
ssr-web(A fast, simple & powerful blog framework, powered by Node.js and Vue.)
FAQs
parse md file to json.
We found that mds-to-json 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
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.