npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cmarked

v1.0.13

Published

更符合汉语的markdown编译器

Readme

cmarked

更符合中文的markdown编译器

安装

npm install cmarked

使用方法

最小的使用

	var cmarked = require('cmarked')
	console.log(cmarked('**我正在使用markdown语法书写文章**'))
	//输出 <p><strong>我正在使用markdown语法书写文章</strong></p>

设置选项的例子,用默认值来示例:

	var cmarked = require('cmarked')
	cmarked.setOptions({
		gap: '-',
		smartOrderList: false
	})

Options

gap

Type:String

h1-h6标题的id中的空格的填充符

例子

	var cmarked = require('cmarked')
	console.log(cmarked('# cmarked爱你'))
	//输出 <h1 id='cmarked爱你'>cmarked爱你</h1>
	console.log(cmarked('## cmarked 还 是 爱 你'))
	//输出 <h2 id='cmarked-还-是-爱-你'>cmarked 还 是 爱 你</h2>

自定义填充符

	var cmarked = require('cmarked')
	cmarked.setOptions({
		gap: '~'
	})
	console.log(cmarked('### cmarked 依  旧  爱 你'))
	//输出 <h3 id='cmarked~依~旧~爱~你'>cmarked 依  旧  爱 你</h3>
	// 连续的空格只会生成一个填充符

smarkOrderList

type: Boolean default: false

是否使用智能的的有序列表,如果你的有序列表想要从不是1开头的,需要开启此选项。注意,原生的markdown并不支持此语法。

例子 - 不开启智能有序列表

	var cmarked = require('cmarked')
	console.log(cmarked('3. cmarked\n4. cmarked'))
	//输出效果
	//1. cmarked
	//2. cmarked

例子 - 开启智能有序列表

	var cmarked = require('cmarked')
	console.log(cmarked('3. cmarked\n4. cmarked'))
	//输出效果
	//3. cmarked
	//4. cmarked

目前该JavaScript包处于开发阶段,只在我的博客网站上面进行试用http://www.jiangxuan.org

如果你是开发者,请阅读dev.md