welshguard
TypeScript icon, indicating that this package has built-in type declarations

0.7.5 • Public • Published

welshguard.js

Welshguard is a validation library for fontend and backend (Express.js).

Installing

$ npm i --save welshguard

Backend (Express.js)

const app = express();
createServer(app).listen(3000);

const middleware = new Welshguard().getBodyGuard({
    name: {required: true, notEmpty: true, type: RuleTypes.String},
});

app.post('/', middleware, (req, res) => {
    res.send('hello ' + req.body.name);
});

Package Sidebar

Install

npm i welshguard

Weekly Downloads

14

Version

0.7.5

License

MIT

Unpacked Size

21.1 kB

Total Files

17

Last publish

Collaborators

  • tontransport.com