You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are there any JS client libraries or helper functions available for generation of the json objects that are needed to be created to inject into the array supplied to the json2md function?
I'm looking to create some helper functions like
getHeader(level, text)
getParagraph(text)
getCodeBlock(code, language, content)
I'd imagine some of these types of functions were already implemented elsewhere by the projects that consume this library.
Are there patterns for these helper type functions being established somewhere or tracked alongside this repo?
The text was updated successfully, but these errors were encountered:
consth1=h1=>({ h1 })constcode=(language,content)=>({code: { language, content }})console.log(json2md([h1("JSON To Markdown"),code("js",`function sum (a, b) { return a + b; }`)]))
Going further, I have various parts of my code that generate document sections.
So the functions you're defining like h1 and code would actually be used to generate that doc section and I'd append to the json2md array as needed.
I just wanted to mention that in case it was thought that I'd be calling these helper functions instead of passing the required objects into the array.
Are there any JS client libraries or helper functions available for generation of the json objects that are needed to be created to inject into the array supplied to the
json2md
function?I'm looking to create some helper functions like
getHeader(level, text)
getParagraph(text)
getCodeBlock(code, language, content)
I'd imagine some of these types of functions were already implemented elsewhere by the projects that consume this library.
Are there patterns for these helper type functions being established somewhere or tracked alongside this repo?
The text was updated successfully, but these errors were encountered: