在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):30-seconds/markdown-builder开源软件地址(OpenSource Url):https://github.com/30-seconds/markdown-builder开源编程语言(OpenSource Language):JavaScript 100.0%开源软件介绍(OpenSource Introduction):Markdown builder for Node
Usagenpm install --save markdown-builder Using const markdown = require('markdown-builder');
const { headers } = markdown;
headers.hX(3, '3rd Header') // ### 3rd Header ExampleCheck out 30-seconds-of-code's READMEs, they are automatically generated using APIHeadersUse the const markdown = require('markdown-builder')
const { headers } = markdown
headers.h1('1st Header') // # 1st Header
headers.h2('2nd Header') // ## 2nd Header
headers.h3('3rd Header') // ### 3rd Header
headers.hX(5, '5th Header using hX') // ##### 5th Header using hX Emphasisconst markdown = require('markdown-builder')
const { emphasis } = markdown
emphasis.b('bold text')
emphasis.i('italic text')
emphasis.s('strikethrough text') Listsconst markdown = require('markdown-builder')
const { lists } = markdown
let a = ['Item 1', 'Item 2']
// ordered list
lists.ol(a)
// 1. Item 1
// 2. Item 2
lists.ol(a, (item) => item.toUpperCase()) // use callbacks to alter each item
// 1. ITEM 1
// 2. ITEM 2
// unordered List
lists.ul(a)
lists.ul(a, (item) => item.toUpperCase()) Miscellaneousconst markdown = require('markdown-builder')
const { misc } = markdown
// Images
let alt = 'image of lights', url = 'https://www.w3schools.com/w3css/img_lights.jpg', title = 'lights'
misc.image(alt, url)
misc.image(alt, url, title)
// Collapsible summary/details block
misc.collapsible('Summary', 'content');
// Github Anchor
misc.anchor('A header with /*() special-characters!'); // #a-header-with--special-characters
// Link
misc.link('Github', 'https://github.com/flxwu')
// horizontal rule
misc.hr() Collapsible: SummaryContentA header with /*() special-characters! |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论