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 🙏

© 2024 – Pkg Stats / Ryan Hefner

reformat-markdown-table-cn

v1.2.0

Published

Reformat and align markdown tables with Chinese

Downloads

4

Readme

reformat-markdown-table

Version Build Status Coverage Status Dependency Status devDependency Status

特别声明:

因为,原仓库作者已经不维护了,所以在 npmjs.com 网站上重新发布项目,项目的名称为:reformat-markdown-table-cn。感谢原作者的贡献,本仓库保留原作者的所有提交。源仓库地址:https://github.com/dbrockman/reformat-markdown-table

本仓库对原仓库做了以下两方面改进:

  1. 原仓库代码不支持中文,也就是说在 MarkDown 表格中包含中文时,不能很好的对齐;
  2. 原仓库代码不支持表格每行前后有空白的单元格;

功能

用来对 GFM MarkDown 表格源代码进行对齐美化。

例如,GFM MarkDown 表格代码如下:

| 姓名 | 电话 | 邮箱 |
| --- | :---: | ---: |
| 王顶 | 13582027613 | [email protected] |
| 郭玉朝 | 13812347652 | [email protected] |
|  | abc | def'

通过 reformat-markdown-table-cn 工具的处理之后:

| 姓名   |     电话    |             邮箱 |
|--------|:-----------:|-----------------:|
| 王顶   | 13582027613 | [email protected] |
| 郭玉朝 | 15703277652 |    [email protected] |
|        |     abc     |              def |

注意,这个示例包括对原仓库的两点改进:

  1. 表格的前四行,表格文字包括中文,中文是两个半角字符宽度,可以很好对齐;
  2. 表格的最后一行,包括一个空白单元格,也可以很好的对齐。原仓库是直接删除空白单元格的。

安装

运行下面的命令完成安装。

sudo npm install -g reformat-markdown-table-cn

使用

编辑一个 MarkDown 文件,该 Markdown 文件中只包含 GFM MarkDown 表格内容,假设文件名为:table.md,运行下面的命令:

cat table.md | reformat-markdown-table-cn

# or

cat table.md | reformat-markdown-table-cn > table2.md