@blocklet/xss

中文文档
0.15.4发布于 2026/04/26MITTypeScriptESM + CJS近 30 天下载 3610

blocklet prevent xss attack

原始使用文档
文档目录7 节
  1. Development
  2. Install In Blocklet
  3. Install Dependencies
  4. Build Packages
  5. Build, Watch, and Run Development Server
  6. Example
  7. License

@blocklet/xss

@blocklet/xss is a package that integrates the xss refer to the official documentation.

Development

Install In Blocklet

# You can use npm / yarn
pnpm add @blocklet/xss

Install Dependencies

To install the required dependencies, run the following command:

pnpm i

Build Packages

To build the packages, execute the following command:

pnpm build

Build, Watch, and Run Development Server

For building, watching changes, and running the development server, use the following command:

pnpm run dev

Example

const { xss } = require('@blocklet/xss');
const express = require('express');

const app = express();
// ---- body-parser ----

app.use(xss());

License

This package is licensed under the MIT license.

版本与发布记录

@blocklet/xss 共发布 66 个版本,首次发布于 2024/08/23;过去 12 个月发布了 11 个版本。

版本发布日期距今
0.15.4latest2026/04/266 个月前
0.3.162026/01/0410 个月前
0.3.152025/12/2210 个月前
0.3.142025/12/1710 个月前
0.3.132025/12/1510 个月前
0.3.122025/12/0511 个月前

关于 @blocklet/xss 的常见问题

@blocklet/xss 是什么?

blocklet prevent xss attack

如何安装 @blocklet/xss?

在项目目录运行 npm install @blocklet/xss,或使用 pnpm add / yarn add / bun add。

@blocklet/xss 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@blocklet/xss 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@blocklet/xss 可以商用吗?

@blocklet/xss 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@blocklet/xss 的下载量有多少?

根据 npm 官方下载统计,@blocklet/xss 在 2026/10/09 – 2026/11/07 这 30 天内被下载 3,610 次,日均约 120 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@blocklet/xss 还在维护吗?

最新版本 0.15.4 发布于 2026/04/26(6 个月前);至今共发布 66 个版本,其中过去 12 个月发布了 11 个;首次发布于 2024/08/23。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。