Urara-Blog/node_modules/.pnpm-store/v3/files/9d/72d2a6ad5086e37a9ad636add11dd8dc3b5ca23d8563763c673fd5efa542cfac8f87bd8e2b2935dc684abc4e0defed3f000acdeaf6a75822d6fb6ae885246d
2022-08-14 01:14:53 +08:00

122 lines
3.2 KiB
Text

# micromark-util-decode-string
[![Build][build-badge]][build]
[![Coverage][coverage-badge]][coverage]
[![Downloads][downloads-badge]][downloads]
[![Size][bundle-size-badge]][bundle-size]
[![Sponsors][sponsors-badge]][opencollective]
[![Backers][backers-badge]][opencollective]
[![Chat][chat-badge]][chat]
micromark utility to decode markdown strings.
## Contents
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`decodeString(value)`](#decodestringvalue)
* [Security](#security)
* [Contribute](#contribute)
* [License](#license)
## Install
[npm][]:
```sh
npm install micromark-util-decode-string
```
## Use
```js
import {decodeString} from 'micromark-util-decode-string'
decodeString('a ; b') // 'a ; b'
decodeString('a \\; b') // 'a ; b'
decodeString('a ; b') // 'a ; b'
```
## API
This module exports the following identifiers: `decodeString`.
There is no default export.
### `decodeString(value)`
micromark utility to decode markdown strings (which occur in places such as
fenced code info strings, destinations, labels, and titles).
The “string” content type allows character escapes and -references.
This decodes those.
###### Parameters
* `value` (`string`) — Value to decode.
###### Returns
`string` — Decoded value.
## Security
See [`security.md`][securitymd] in [`micromark/.github`][health] for how to
submit a security report.
## Contribute
See [`contributing.md`][contributing] in [`micromark/.github`][health] for ways
to get started.
See [`support.md`][support] for ways to get help.
This project has a [code of conduct][coc].
By interacting with this repository, organisation, or community you agree to
abide by its terms.
## License
[MIT][license] © [Titus Wormer][author]
<!-- Definitions -->
[build-badge]: https://github.com/micromark/micromark/workflows/main/badge.svg
[build]: https://github.com/micromark/micromark/actions
[coverage-badge]: https://img.shields.io/codecov/c/github/micromark/micromark.svg
[coverage]: https://codecov.io/github/micromark/micromark
[downloads-badge]: https://img.shields.io/npm/dm/micromark-util-normalize-identifier.svg
[downloads]: https://www.npmjs.com/package/micromark-util-normalize-identifier
[bundle-size-badge]: https://img.shields.io/bundlephobia/minzip/micromark-util-normalize-identifier.svg
[bundle-size]: https://bundlephobia.com/result?p=micromark-util-normalize-identifier
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
[backers-badge]: https://opencollective.com/unified/backers/badge.svg
[opencollective]: https://opencollective.com/unified
[npm]: https://docs.npmjs.com/cli/install
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://github.com/micromark/micromark/discussions
[license]: https://github.com/micromark/micromark/blob/main/license
[author]: https://wooorm.com
[health]: https://github.com/micromark/.github
[securitymd]: https://github.com/micromark/.github/blob/HEAD/security.md
[contributing]: https://github.com/micromark/.github/blob/HEAD/contributing.md
[support]: https://github.com/micromark/.github/blob/HEAD/support.md
[coc]: https://github.com/micromark/.github/blob/HEAD/code-of-conduct.md