flipr-validation

2.1.0 • Public • Published

node-flipr-validation

NPM

Build Status

This project is part of the flipr family.

node-flipr-validation provides validation for flipr config data and rules. You should use it to catch bad config changes before they are deployed. Bad config deployments make flipr very unhappy.

node-flipr-validation

Usage

const fliprValidation = require('flipr-validation');
const errors = fliprValidation({
  config: myConfigObject,
  rules: myRulesArray
});

The errors array returned by fliprValidation will be empty if there are no validation errors. If there are validation errors, the errors array will contain one or more Error objects.

Flipr Validation Options

  • config - required - object: This is the config object you want to validate.
  • rules - optional - array: The array of rules you will use against this config. If you have rules but don't provide them, some of the validation will be skipped. It's a good idea to pass the rules if you have them.

Would you like to know more?

/flipr-validation/

    Package Sidebar

    Install

    npm i flipr-validation

    Weekly Downloads

    2

    Version

    2.1.0

    License

    MIT

    Unpacked Size

    147 kB

    Total Files

    32

    Last publish

    Collaborators

    • gshively