New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

markdown-code-block-meta

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdown-code-block-meta

A library to parse/stringify metadata of markdown code block

latest
Source
npmnpm
Version
0.1.1
Version published
Weekly downloads
531
-6.18%
Maintainers
1
Weekly downloads
 
Created
Source

markdown-code-block-meta

A library to parse/stringify metadata of markdown code block.

npm github node

Installation

npm install markdown-code-block-meta --save

Usage

Parsing markdown with remark.

```js title="Here is an example"

```

A Code block will turn into:

{
  "lang": "js",
  "meta": "title=\"Here is an example\""
}

Parsing metadata like this:

import { getValue, parse, stringify } from 'markdown-code-block-meta';

const input =
  '-8=。是 ==0 ===f=5 =9 dd k=dsds op="s 7" d-p="" sss=`7 u-` rj= lp=\' ds ds\' t="`"';

const result = parse(input);
/* result = Map {
  '-8' => '。是',
  '==0' => undefined,
  '===f=5' => undefined,
  '=9' => undefined,
  'dd' => undefined,
  'k' => 'dsds',
  'op' => '"s 7"',
  'd-p' => '""',
  'sss' => '`7 u-`',
  'rj=' => undefined,
  'lp' => '\' ds ds\'',
  't' => '"`"'
} */

stringify(result); // same as input

getValue('"abc"'); // abc
getValue('`abc`'); // abc
getValue("'abc'"); // abc

Keywords

code-block

FAQs

Package last updated on 13 Jan 2026

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