0.0.4 • Published 5 years ago

str-contain-sql v0.0.4

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

💨StrContainSQL

string utility to ckeck if the input contain sql syntax
npm.io badgen badgen

$ npm i str-contain-sql --save

Usage

import strContainSQL from 'str-contain-sql'
// or
var strContainSQL = require('str-contain-sql')

Or include it via jsDelivr CDN:

<script src="https://cdn.jsdelivr.net/npm/str-contain-sql@0.0.4/index.min.js"></script>
strContainSQL("username; 1 = 1") // true

Methods & Examples

  • strContainSQL(String) : Boolean
strContainSQL("username; 1 = 1") // true
strContainSQL("hello world drop table") // true
strContainSQL("username and password = '123") // true
strContainSQL("username") // false

Test

$ npm run test

Notes

  • Works both in Node.js and in the browser.
  • Supported in all old and modern browsers.
  • All pull requests are welcome, feel free.

Related

  • Type check : object, array, Promise, Set, Map, WeakSet, WeakMap, function, etc..
  • Buk : Encode, decode, filter, skip, quotes, wrap, HTML special chars string
  • MinValid : string validation

License

MIT

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago