How to use the json2md.async function in json2md

To help you get started, we’ve selected a few json2md examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github adoyle-h / Today-I-Learned / build.js View on Github external
];

    toc.push({name: '分类', level: 2});

    debug('categories=%O', categories);
    handleCategories(rootCategories, 3, structure);

    toc.push({name: '反馈问题或建议', level: 2});
    toc.push({name: '版权声明', level: 2});

    structure.push(
        {md: absPath('_docs/issue.md')},
        {md: absPath('_docs/license.md')}
    );

    const content = await json2md.async(structure);

    const file = absPath('README.md');
    await writeFile(file, content);
    console.log('writeFile: %s', file);
}

json2md

A JSON to Markdown converter.

MIT
Latest version published 12 months ago

Package Health Score

66 / 100
Full package analysis

Popular json2md functions