初始化

This commit is contained in:
zhu
2026-03-27 13:29:41 +08:00
commit ee03132cee
112 changed files with 6417 additions and 0 deletions

19
towxml/index.js Normal file
View File

@@ -0,0 +1,19 @@
const md = require('./parse/markdown/index'),
parse = require('./parse/index')
module.exports = (str,type,option)=>{
option = option || {};
let result;
switch (type) {
case 'markdown':
result = parse(md(str),option);
break;
case 'html':
result = parse(str,option);
break;
default:
throw new Error('Invalid type, only markdown and html are supported');
break;
};
return result;
};