Socket
Socket
Sign inDemoInstall

downa

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

downa

A teeny tiny Markdown to HTML renderer which works in Node and the browser.


Version published
Weekly downloads
14
increased by27.27%
Maintainers
1
Weekly downloads
 
Created
Source

downa

A teeny tiny (2KB) Markdown to HTML renderer which works in Node and the browser.

Installation:

downa works in the browser and Node.js.

npm i downa --save

Browser:

<script src='./node_modules/downa/dist/downa.min.js'></script>

or CDN

<script src='https://unpkg.com/downa@1.0.1/dist/downa.min.js'></script>

Note: no other dependencies are required. See: test.html for example

Usage:

Node:

const downa = require('downa');

const md = `
# Title

And *now* [a link](http://www.google.com) to **follow** and [another](http://yahoo.com/).

* One
* Two
* Three

## Subhead`;

const html = downa.render(md);
console.log('HTML', html);

Browser:

<script src='https://unpkg.com/downa@1.0.1/dist/downa.min.js'></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
    var markdown = `
        # Title

        And *now* [a link](http://www.google.com) to **follow** and [another](http://yahoo.com/).

        * One
        * Two
        * Three

        ## Subhead`;
    var html = downa.render(markdown);
    console.log('HTML', html);
});
</script>

Example:

See fiddle

Keywords

FAQs

Package last updated on 05 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc