Socket
Socket
Sign inDemoInstall

jstransformer-marked

Package Overview
Dependencies
1
Maintainers
7
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    jstransformer-marked

Marked support for JSTransformers.


Version published
Weekly downloads
2.9K
decreased by-13.32%
Maintainers
7
Install size
421 kB
Created
Weekly downloads
 

Changelog

Source

v1.3.0: 2023-01-27

  • Updated marked to 4.2.12
  • Updated readme
  • Adds renderAsync method & support for marked async walkTokens option

Readme

Source

jstransformer-marked

Marked support for JSTransformers.

Build Status Coverage Status NPM version

Installation

npm install jstransformer-marked

API

const marked = require('jstransformer')(require('jstransformer-marked'));

marked.render('# Hello World!').body
//=> '<h1>Hello World!</h1>'

const markedOptions = {}
marked.render('# "Hello World"', markedOptions)

// also supports async walkTokens
marked.renderAsync('# Hello World', {
  walkTokens: async (token) => {
    const uriPrefix  = await uriPrefixAsync()
    if (token.href) {
      token.href = uriPrefix + token.href
    }
  }
})

For all supported options see https://marked.js.org/using_advanced#options

License

MIT

Keywords

FAQs

Last updated on 26 Jan 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc