# vue-bold-text

> vue component to match bold strings in certain text

Latest version **1.0.1** (published 2019-05-14) · ISC license · 0 weekly downloads

## Install

```sh
npm install vue-bold-text
pnpm add vue-bold-text
yarn add vue-bold-text
bun add vue-bold-text
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-05-14 |
| First published | 2019-05-13 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | candy8ullet |

## Links

- npm: https://www.npmjs.com/package/vue-bold-text
- Repository: https://github.com/sishenhei7/vue-bold-text
- Homepage: https://github.com/sishenhei7/vue-bold-text#readme
- Issues: https://github.com/sishenhei7/vue-bold-text/issues
- npm.io page: https://npm.io/package/vue-bold-text

## Recent versions

- 1.0.1 (latest) — 2019-05-14
- 1.0.0 — 2019-05-13

## README

# vue-bold-text

[![NPM version](https://img.shields.io/npm/v/vue-bold-text.svg?style=flat)](https://npmjs.com/package/vue-no-ssr) [![NPM downloads](https://img.shields.io/npm/dm/vue-bold-text.svg?style=flat)](https://npmjs.com/package/vue-no-ssr)

> 在项目中，我们会遇到要将后端返回的字符串里面的部分文字加粗的情形，这个时候，用v-html会有xxs的风险，所以我开发了这个插件，利用vue的函数式组件解决了这个问题。

## Install

```bash
npm i vue-bold-text
```

## Usage

```vue
<template>
  <div id="app">
    <h1>My Website</h1>
    <bold-text
      :keyword="keyword"
      :content="content"
      :tag="tag"
    />
  </div>
</template>

<script>
  import BoldText from 'vue-bold-text';

  export default {
    components: {
      'bold-text': BoldText
    },
    data: {
      return {
        keyword: 'test',
        content: 'This is a test!',
        tag: 'p'
      };
    }
  }
</script>
```

And you get:

```html
<div id="app">
  <h1>My Website</h1>
  <p>
    This is a <b>test</b>!
  </p>
</div>
```

## ToDo

- [ ] global replace
- [ ] give running example

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