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

md-parser

v1.0.0

Published

Markdown parser

Downloads

4

Readme

Markdown JavaScript Parser

This module is under construction (Parsing URLs only)

[I'm an inline-style link](https://www.google.com)

[I'm an inline-style link with title](https://www.google.com "Google's Homepage")

[I'm a reference-style link][Arbitrary case-insensitive reference text]

[I'm a relative reference to a repository file](../blob/master/LICENSE)

[You can use numbers for reference-style link definitions][1]

[another num ref][1]

Or leave it empty and use the [link text itself].

URLs and URLs in angle brackets will automatically get turned into links. 
http://www.example.com or <http://www.example.com> and sometimes 
example.com (but not on Github, for example).

Some text to show that the reference links can follow later [cool].

[arbitrary case-insensitive reference text]: https://www.mozilla.org
[1]: http://slashdot.org "title"
[link text itself]: http://www.reddit.com

(Most of the markdown is taken from here)

var mdParser = require('./index.js');
var markdown = "[I'm an inline-style link](https://www.google.com/aa/a)\n\n[I'm an inline-style link with title](https://www.google.com \"Google's Homepage\")\n\n[I'm a reference-style link][Arbitrary case-insensitive reference text]\n\n[I'm a relative reference to a repository file](../blob/master/LICENSE)\n\n[You can use numbers for reference-style link definitions][1]\n\n[another num ref][1]\n\nOr leave it empty and use the [link text itself].\n\nURLs and URLs in angle brackets will automatically get turned into links. \nhttp:\/\/www.example.com or <http:\/\/www.example.com> and sometimes \nexample.com (but not on Github, for example).\n\nSome text to show that the reference links can follow later [cool].\n\n[arbitrary case-insensitive reference text]: https:\/\/www.mozilla.org \n[1]: http:\/\/slashdot.org \"title\"\n[link text itself]: http:\/\/www.reddit.com\n";

console.log(mdParser.parse(markdown));

###Output:

<a href="https://www.google.com/aa/a" target="_blank" title="">I'm an inline-style link</a>
<a href="https://www.google.com" target="_blank" title="Google's Homepage">I'm an inline-style link with title</a>
<a href="https://www.mozilla.org" target="_blank" title="">I'm a reference-style link</a>
<a href="../blob/master/LICENSE" target="_blank" title="">I'm a relative reference to a repository file</a>
<a href="http://slashdot.org" target="_blank" title="title">You can use numbers for reference-style link definitions</a>
<a href="http://slashdot.org" target="_blank" title="title">another num ref</a>
Or leave it empty and use the <a href="http://www.reddit.com" target="_blank" title="">link text itself</a>.
URLs and URLs in angle brackets will automatically get turned into links. <a href="www.example.com" target="_blank" title="">www.example.com</a>or <a href="www.example.com" target="_blank" title="">www.example.com</a> and sometimes 
example.com (but not on Github, for example).
Some text to show that the reference links can follow later [cool].