1.0.8 • Published 7 years ago

mysql-apostrophe v1.0.8

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

mysql-apostrophe

Whenever we want to save any field with apostophe in mysql, and we use syntex like var query = INSERT INTO table_name (column1) VALUES ('${var}'); ;

It will throw mysql error if your var is equals to alex's. This NPM is use to avoid this kind of errors. It is not working if you are sending data as JSON stringify.

Example

var mysqlApostrophe = require("mysql-apostrophe");

var express = require('express');
var app = express();
var bodyParser = require('body-parser')

app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended:true}));

app.use(mysqlApostrophe); //must be after bodyparser

Install

npm i mysql-apostrophe

License

MIT

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago