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

markdown-to-htm

v1.0.11

Published

The Markdown to HTML Converter is a lightweight, easy-to-use NPM package that allows you to convert Markdown files or strings into HTML. It is perfect for developers looking to integrate Markdown parsing into their web applications, static site generators

Downloads

161

Readme

Markdown to HTML Converter

The Markdown to HTML Converter is a lightweight, easy-to-use NPM package that allows you to convert Markdown files or strings into HTML. It is perfect for developers looking to integrate Markdown parsing into their web applications, static site generators, or any other project that requires converting Markdown content to HTML.

import plaintohtml from "markdown-to-htm"

let plain = "# hello ho are you"
const htmlis = plaintohtml(plain)

console.log(htmlis);

output: <h1 class='h1'>hello ho are you</h1>

add this .css file

you can also update styles for your choice and also add media query for different screen sizes

index.css
* {
    appearance: none;
}

.h1 {
    font-size: 35px;
    font-weight: 600;
    letter-spacing: 2px;
}

.h2 {
    font-size: 30px;
    font-weight: 600;
}

.h3 {
    font-size: 20px;
    font-weight: 600;
}

.a {
    color: rgb(204, 255, 238);
    text-wrap:wrap;
}

ul li {
    list-style-type: square;
    margin-left: 2rem;
    line-height: 2rem;
}

ol li {
    margin-left: 2rem;
    list-style-type: decimal;
}

hr {
    margin: 1rem 0;
    border-top-width: 1px;
    border-top-color: rgb(230, 254, 255);
}

.blok {
    padding-left: 1rem;
    margin-left: 1rem;
    border-left: 4px solid white;
    height: fit-content;
}

.pre {
    margin: 0.5rem auto;
    width: 95%;
    color: white;
    padding: 0.5rem;
    background-color: rgba(41, 41, 41, 0.477);
    font-size: 0.8rem;
    border-radius: 0.5rem;
    display: block;
    
}
.inline {
    width: 95%;
    color: white;
    padding: 0.3rem 0.5rem ;
    background-color: rgba(41, 41, 41, 0.477);
    font-size: 0.8rem;
    border-radius: 0.3rem;
    display:inline;
}
.img{
    width: 50%;
    heigth: auto;
    object-fit: cover;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 16px;
    text-align: left;
    line-height: 1.4;
    color: #e0e0e0; /* Light text color for dark backgrounds */
    background-color: #1e1e1e; /* Dark background color for the table */
}

.table th, .table td {
    padding: 12px 15px;
    border: 1px solid #333; /* Darker border color */
}

.table th {
    background-color: #2d2d2d; /* Slightly lighter background for headers */
    font-weight: 600;
}

.table tr:nth-child(even) {
    background-color: #2d2d2d; /* Alternate row color for readability */
}

.table tr:hover {
    background-color: #333; /* Highlight row on hover */
}

.table thead th {
    background-color: #2a2a2a; /* Slightly darker background for the header */
    border-bottom: 2px solid #444; /* Darker bottom border */
}

Using Markdown syntex:

H1 heading = # text
H2 heading = ## text
H3 heading = ### text
Bulleted list = * text
Numbered list = ^ text
Bold = **text**
Code block = ``` code ```
inline Code block = ` code `
Blockquote = > text
insert link = [URL](NAME)
Text divider or horizontal line = ---
image = ![alt](href)
image = ![alt](href)
Markdown tables are created using pipes (|) to separate columns and hyphens (-) to define the header row. Here's a basic example:
| Header 1   | Header 2   | Header 3   |
|------------|------------|------------|
| Row 1 Col 1| Row 1 Col 2| Row 1 Col 3|
| Row 2 Col 1| Row 2 Col 2| Row 2 Col 3|