# marked-note-extension

> an note extension for marked.

Latest version **0.1.5** (published 2022-10-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install marked-note-extension
pnpm add marked-note-extension
yarn add marked-note-extension
bun add marked-note-extension
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.5 |
| Published | 2022-10-26 |
| First published | 2022-10-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | kart jim |
| Maintainers | kartjim |
| Keywords | marked, marked extension, markdown, markdown plugin |

## Links

- npm: https://www.npmjs.com/package/marked-note-extension
- Repository: https://github.com/can-dy-jack/marked-note-extension
- Homepage: https://github.com/can-dy-jack/marked-note-extension#readme
- Issues: https://github.com/can-dy-jack/marked-note-extension/issues
- npm.io page: https://npm.io/package/marked-note-extension

## Dependencies (1)

- [marked](https://npm.io/package/marked.md) ^4.1.1

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 0.1.5 (latest) — 2022-10-26
- 0.1.4 — 2022-10-26
- 0.1.3 — 2022-10-26
- 0.1.2 — 2022-10-26
- 0.1.1 — 2022-10-26

## README

# marked-note-extension
An note extension for marked.

## Usage

you can use `info` `danger` `warning` `success` `note`  as their theme;

```js
import { marked } from "marked";
// any name, just like `markedNote`
import markedNote from "marked-note-extension";

marked.use(markedNote);

const content = marked.parse(`!!! info Publish ESM and CJS in a single package
In the past decade, due to the lack of a standard module system of \`JavaScript\`, **CommonJS** (a.k.a the \`require('xxx')\` and \`module.exports\` syntax) has been the way how Node.js and NPM packages work. Until 2015, when ECMAScript modules finally show up as the standard solution, the community start migrating to native ESM gradually.
!!!`);

console.log(content);
```

in markdown:
```text
!!! info Publish ESM and CJS in a single package
In the past decade, due to the lack of a standard module system of \`JavaScript\`, **CommonJS** (a.k.a the \`require('xxx')\` and \`module.exports\` syntax) has been the way how Node.js and NPM packages work. Until 2015, when ECMAScript modules finally show up as the standard solution, the community start migrating to native ESM gradually.
!!!
```

Output: 
```html
<div class="note note-info">
    <p class="note-title">Publish ESM and CJS in a single package</p>
    <div class="note-body">
        <p>In the past decade, due to the lack of a standard module system of <code>JavaScript</code>, <strong>CommonJS</strong> (a.k.a the <code>require(&#39;xxx&#39;)</code> and <code>module.exports</code> syntax) has been the way how Node.js and NPM packages work. Until 2015, when ECMAScript modules finally show up as the standard solution, the community start migrating to native ESM gradually.</p>
    </div>
</div>
```

## reference resources
- [marked-admonition-extension](https://github.com/xiefucai/marked-admonition-extension) - 该库下载不了，还会破坏运行环境，我不知道为啥；于是就写了这个库，核心代码是 marked-admonition-extension 的源码

---
_Source: https://npm.io/package/marked-note-extension · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
