npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

hight-light

v1.0.2

Published

highlight specific content

Readme

Hight Light Brush

高亮展示内容

安装

npm i hight-light

例子


//在main.js中
import highlight from 'hight-light'
Vue.use(highlight)


// 在vue中
<template>
  <highlight
    text="从这个角度来看,
    了解清楚随机一段废话到底是一种怎么样的存在,
    是解决一切问题的关键.在这种困难的抉择下,
    本人思来想去, 寝食难安.达尔文说过一句著名的话,
    敢于浪费哪怕一个钟头时间的人,说明他还不懂得珍惜生命的全部价值。
    这句话看似简单,但其中的阴郁不禁让人深思. 一般来说, 这是不可避免的.
    随机一段废话似乎是一种巧合,但如果我们从一个更大的角度看待问题,
    这似乎是一种不可避免的事实. 那么"
    :keywords="['这个', '随机一段', '关键', '不禁让人深思']"
  >

  </highlight>
  <highlight
    text="Lorem ipsum dolor sit,
    amet consectetur adipisicing elit. Nam,
    rem quis laudantium assumenda laborum,
    ipsum totam, ab aut impedit quisquam ullam
    dicta facilis. Impedit dolore dicta labore
    rem. Eaque, dignissimos."
    :keywords="['impedit', 'elit', 'consectetur', 'labore']"
    light="#e74c2c"
    color="#fff"
  ></highlight>
</template>

<script>

export default {
  name: 'App',
};
</script>

Imgur


备用图片地址

Props

| 参数 | 说明 | 类型 | 默认值 | 是否必填 | | :---------- | :--------------------------------- | :----- | :-------- | :------- | | text | 指定需要进行关键字高亮的文本内容。 | String | 无 | 是 | | keywords | 指定用于匹配的关键字数组。 | Array | [] | 是 | | light | 指定高亮颜色的 CSS 颜色值。 | String | "#fbda32" | 否 | | color | 指定文本颜色的 CSS 颜色值. | String | "" | 否 | | customStyle | 自定义样式 | Object | "" | 否 | | highlightFirstOnly | 是否只高亮第一个关键字 | Boolean | false | 否 |