Big news!Introducing Socket AI - ChatGPT-Powered Threat Analysis. Learn more
Socket
Log inDemoInstall

jstransformer-marked

Package Overview
Dependencies
1
Maintainers
7
Versions
10
Issues
File Explorer

Advanced tools

jstransformer-marked

Marked support for JSTransformers.

    1.3.0latest
    GitHub

Version published
Maintainers
7
Weekly downloads
647
decreased by-23.07%

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 installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket
support@socket.devSocket SOC 2 Logo

Product

  • Package Issues
  • 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