Socket
Socket
Sign inDemoInstall

atom-ide-markdown-service

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

atom-ide-markdown-service

A markdown rendering service.


Version published
Maintainers
1
Created
Source

atom-ide-markdown-service package

Markdown service in atom-ide-community packages (e.g. ide-datatip).

Usage

Just install.

Developer Usage - As apm package

Put this in your package.json

"consumedServices": {
  "markdown-renderer": {
    "versions": {
      "1.0.0": "consumeMarkdownRenderer"
    }
  }
}

and use it inside your package like this:

import type {MarkdownService} from "atom-ide-base"

let render: MarkdownService["render"]

/**
 * retrieves a reference to the markdown rendering service that should be used
 * @param  {MarkdownService} markdownService the service for rendering markdown text
 */
export function consumeMarkdownRenderer(markdownService: MarkdownService) {
  render = markdownService.render
}

render is a function with this type:

let render: (markdownText: string, grammar: string) => Promise<string>

Developer Usage - as npm package - ES6 modules

npm install --save atom-ide-markdown-service

and use it inside your package like this:

import { render } from "atom-ide-markdown-service/modules/renderer"

in which renderer is a function with this type render(markdownText: string, grammar: string) => Promise<string>

Developer Usage - as npm package - commonjs

npm install --save atom-ide-markdown-service

and use it inside your package like this:

const { render } = require("atom-ide-markdown-service/dist/renderer")

in which render is a function with this type renderer(markdownText: string, grammar: string) => Promise<string>

Keywords

FAQs

Package last updated on 18 Mar 2021

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