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

@binlun/sensitive

v0.0.9

Published

* 包含词库管理(lexiconManagement)、命中管理(hitManagement)、词库标签(lexiconTag)、稽查管理(inspectManagement)、策略配置(configuration)五个功能模块

Readme

sensitive 敏感词业务组件

概述

  • 包含词库管理(lexiconManagement)、命中管理(hitManagement)、词库标签(lexiconTag)、稽查管理(inspectManagement)、策略配置(configuration)五个功能模块

组件安装

npm install @binlun/sensitive --save

使用示例

import { lexiconManagement, hitManagement, lexiconTag, inspectManagement, configUration } from '@binlun/sensitive'
import '@binlun/sensitive/lib/style.css'
...

// 业务组件
<lexicon-management></lexicon-management>
<hit-management :source-options="sourceOptions"></hit-management>
<lexicon-tag></lexicon-tag>
<inspect-management :source-options="sourceOptions"></inspect-management>
<config-uration :source-options="sourceOptions" :is-finished="isFinished"></config-uration>

// 通用参数传值(敏感词模块需要单独部署时引入该方法传入token及代理地址)
import { config } from '@binlun/sensitive'
config().setConfig(token, proxyUrl)

属性

命中管理\稽查管理

| 属性 | 类型 | 必填 | 默认值 | 功能/备注 | | ------------- | :------: | :------: | :----------------------: | :------------------------------------: | | sourceOptions | array | required | [{value: '', label: ''}] | 业务来源数据字段 |

策略配置

| 属性 | 类型 | 必填 | 默认值 | 功能/备注 | | ------------- | :------: | :------: | :----------------------: | :------------------------------------: | | sourceOptions | array | required | [{value: '', label: ''}] | 业务来源数据字段 | | isFinished | boolean | required | false | 是否已获取业务来源数据 |

通用参数传值

| 属性 | 类型 | 必填 | 默认值 | 功能/备注 | | -------- | :-------: | :------: | :---: | :---------------:| | token | string | option | '' | 系统登录token | | proxyUrl | string | option | '' | 敏感字系统代理地址 |

方法

事件

开发与调试

  • 运行 npm install 安装依赖
  • 运行 npm start

目录结构

.
├── index.js ----------------------  npm入口文件,新增组件时需要在这里添加
├── lib ---------------------------  打包代码
├── examples ----------------------  示例代码
    ├── assets --------------------  静态资源目录
    ├── main.ts -------------------  示例入口
    ├── App.vue -------------------  示例实现
├── public ------------------------  html上引用的公共资源
└── src ---------------------------  源码目录
    ├── components ----------------  组件目录
        |—— api -------------------  接口层
            |—— config.ts  --------  敏感词接口
            |—— request.ts --------  axios封装
        |—— components ------------  具体组件
            ├── commonTable -------  表单组件
            ├── configUration -----  策略管理
            ├── hitManagement -----  命中管理
            ├── inspectManagement -  稽查管理
            ├── lexiconManagement -  词库管理
            ├── lexiconTag --------  词库标签
        |—— enums -----------------  枚举文件夹
        |—— hooks -----------------  自定义封装hooks函数方法(分页)
        |—— index.ts --------------  组件导出
        |—— utils.ts --------------  获取token、代理的方法
├── index.hml ---------------------  页面入口

打包

  • 运行 npm run build 来打包
  • bundle的入口在vite.build.config.ts的entry字段中配置
  • 打包以后生成lib/bundle.es.js和lib/bundle.umd.js

发布