# xss-cli

> smarty for xss check

Latest version **1.0.0** (published 2019-08-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install xss-cli
pnpm add xss-cli
yarn add xss-cli
bun add xss-cli
```

Provides the command `xss`.

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-08-08 |
| First published | 2019-08-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >= 7.6 |
| Dependencies | 6 |
| Unpacked size | 2.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | kaivean@outlook.com |
| Maintainers | kaivean |
| Keywords | smarty, xss, check |

## Links

- npm: https://www.npmjs.com/package/xss-cli
- npm.io page: https://npm.io/package/xss-cli

## Dependencies (6)

- [glob](https://npm.io/package/glob.md) ^7.1.4
- [chalk](https://npm.io/package/chalk.md) ^2.4.2
- [moment](https://npm.io/package/moment.md) ^2.24.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^8.1.0
- [commander](https://npm.io/package/commander.md) ^2.20.0
- [smarty-xss](https://npm.io/package/smarty-xss.md) 0.0.11

## Recent versions

- 1.0.0 (latest) — 2019-08-08

## README

# xss-cli


## 介绍
检测smarty文件里可能需要转义的地方


## 命令行使用

安装
```
npm install xss-cli -g
```

执行，检测目录下所有`**/*.tpl`
```
xss check ./src
```

## API

安装
```
npm install xss-cli
```

使用

```javascript
const xssCheck = require('xss-cli/dist/command/check');
const checkResults = xssCheck.checkContent(content);
if (checkResults && checkResults.length) {
    console.log(`error count: ${checkResults.length}`);

    for (const item of checkResults) {
        console.log(`   ${item}`);
    }
} else {
    console.log(`${chalk.green(file)} OK`);
}
```

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