README
ValidatorREST
A library of rest api string validators and sanitizers.
Strings only
This library validates and sanitizes strings only.
If you're not sure if your input is a string, coerce it using input + ''
.
Passing anything other than a string is an error.
Installation and Usage
Server-side usage
Install the library with npm install validatorrest
No ES6
var rvalidator = require('validatorrest');
validator.use(express); //=> true
Contributing
In general, we follow the "fork-and-pull" Git workflow.
- Fork the repo on GitHub
- Clone the project to your own machine
- Work on your fork
- Make your changes and additions
- Change or add tests if needed
- Run tests and make sure they pass
- Add changes to README.md if needed
- Commit changes to your own branch
- Make sure you merge the latest from "upstream" and resolve conflicts if there is any
- Repeat step 3(3) above
- Push your work back up to your fork
- Submit a Pull request so that we can review your changes
Tests
[] TODO add tests
License (MIT)
Copyright (c) 2018 MIT
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.