0.1.0 • Published 2 months ago
@stephen-collins-tech/ts-validator v0.1.0
ts-validator
Rust-powered static analysis for TypeScript APIs.
Find unvalidated req.body
, req.query
, and req.params
— before they cause runtime errors or security vulnerabilities.
🚀 Quickstart
No install needed. Just run:
npx @stephen-collins-tech/ts-validator path/to/entry-file.ts
Options:
npx @stephen-collins-tech/ts-validator --help
✨ What It Does
- Recursively parses
.ts
and.tsx
files - Detects raw access to external inputs like
req.body
- Flags usage that may lack proper runtime validation
- Supports basic flags:
--json
,--fail-on-warning
,--help
,--version
🛡️ Why ts-validator?
TypeScript protects you at compile time.
ts-validator protects you at runtime — when external data actually hits your app.
Don't trust unvalidated input. Catch it automatically.
📦 Installation
Global Installation
npm install -g @stephen-collins-tech/ts-validator
ts-validator --version
Project Installation
npm install --save-dev @stephen-collins-tech/ts-validator
Then in your package.json:
"scripts": {
"validate": "ts-validator src/index.ts"
}
License
MIT License.