Skip to content

vinodnextcoder/param-validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b1f5dbd · Jul 15, 2022

History

11 Commits
Jul 14, 2022
Jul 14, 2022
Jul 14, 2022
Jul 14, 2022
Jul 14, 2022
Jul 14, 2022
Jul 14, 2022
Jul 15, 2022
Jul 14, 2022
Jul 14, 2022
Jul 14, 2022
Jul 14, 2022
Jul 14, 2022

Repository files navigation

param-validator-node

A small parameter validation library

The purpose of this library is to easily check that the Missing parameter in node.js.

Basic examples

const { checkRequiredMissingParam } = require ('param-validator-node');
const requestPayload = { email: 'test@gmail.com' };
const checkRequiredParamm = ['name'];
const Validator = checkRequiredMissingParam(requestPayload, checkRequiredParamm);
//throws error Missing param [name]

Installation

npm i param-validator-node

Also make sure that you have Node.js 8 or newer in order to use it.

License

MIT License