# extract-code-md

> Extract code from markdown block code

Latest version **0.0.5** (published 2019-09-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install extract-code-md
pnpm add extract-code-md
yarn add extract-code-md
bun add extract-code-md
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2019-09-02 |
| First published | 2019-08-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | imcuttle |
| Maintainers | moyuyc |

## Links

- npm: https://www.npmjs.com/package/extract-code-md
- Repository: https://github.com/imcuttle/intuitional-test
- Homepage: https://github.com/imcuttle/intuitional-test#readme
- Issues: https://github.com/imcuttle/intuitional-test/issues
- npm.io page: https://npm.io/package/extract-code-md

## Dependencies (5)

- [unified](https://npm.io/package/unified.md) ^8.3.2
- [loader-utils](https://npm.io/package/loader-utils.md) ^1.2.3
- [remark-parse](https://npm.io/package/remark-parse.md) ^7.0.0
- [create-extractor](https://npm.io/package/create-extractor.md) ^0.0.5
- [@moyuyc/visit-tree](https://npm.io/package/@moyuyc/visit-tree.md) ^2.0.1

## Recent versions

- 0.0.5 (latest) — 2019-09-02
- 0.0.4 — 2019-08-27
- 0.0.3 — 2019-08-01
- 0.0.2 — 2019-08-01

## README

# `extract-code-md`

> Extract code from markdown block code.

## Usage

```javascript
const extract = require('extract-code-md')

const list = extract(
  `
# head1

Works
~~~javascript
1 + 2 // => 3
~~~

DO NOT works
~~~typescript
1 + 2 // => 3
~~~
`,
  {
    languages: ['js', 'javascript']
  }
)

list.length // => 1
```

## Options

### `languages`

the allowed languages for extracting.

- Type: `string[]`
- Default: `['js', 'javascript']`

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