validate-things
v1.0.2
Published
Validate your data in server or client for security
Downloads
10
Maintainers
Readme
Validate your data in server or client for security
Supports CommonJS and ES6
Install
npm install validate-things
Functions Usage
Import Functions:
import { function } from 'validate-things'; // ES6
const { function } = require('validate-things') // CommonJS
Validate Email:
ValidateEmail({ email });
// email: string
Validate String for Vulnerabilities and length:
ValidateString({ string, minLength, maxLength, securityLevel, log });
// string: string
// minLength: number (minimum length you need)
// maxLength?: number (maximum length you need)
// securityLevel?: "high" | "normal" | "none" [default: "high"] (check for possible vulnerabilities in string)
// log?: boolean [default: false] (log checks in console)
Check for XSS (Cross-Site-Scripting) Attacks:
isXSS({ string });
// string: string
Check for SQL Injection:
isSQLInjection({ string });
// string: string
Check for XML External Entity (XXE) Injection:
isXXEInjection({ string });
// string: string
Check for LDAP Injection:
isLDAPInjection({ string });
// string: string
Check for Command Injection:
isCommandInjection({ string });
// string: string
Author
👤 Shubhankar Trivedi
Website: shubhankartrivedi.com
Github: @shubhankartrivedi
Show your support
Give a ⭐️ if this project helped you!