Skip to content

Interencheres/cpm-validator

Repository files navigation

cpm-validator Build Status Coverage Status bitHound Overall Score bitHound Dependencies

Simple compilation of function for validate type, JSON, ...

Pré-requis

  • NodeJS 4.2.x

Installation

npm install

Usage

To initialize an object, you have to pass an instance of cpm-logger :

const Validator = require("cpm-validator");
const logger = require("cpm-logger")(myconfig);
const validator = new Validator(logger);

Tests

npm run tests -s

To get coverage with istanbul, you have to run :

npm run tests:coverage -s