0.2.5 • Published 9 years ago

params-integrity v0.2.5

Weekly downloads
3
License
GPL-2.0
Repository
github
Last release
9 years ago

params-integrity

npm version

Performs basic presence-checking of a list of keys from an object.

Install via npm

npm install params-integrity

Basic usage

var paramsIntegrity = require("params-integrity");

// example object to be checked
var objectToCheck = {
    parameter1: "lorem",
    parameter2: "ipsum",
    parameter3: "sit"
};

paramsIntegrity.checkRequiredParams([
        'parameter1',
        'parameter2',
        'parameter3',
    ], objectToCheck)
    .then(function(validatedParams){
        // do what you want with the validatedParams
    })
    .catch(function(error){
        // perform error handling here
    });
0.2.5

9 years ago

0.2.4

10 years ago

0.2.3

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago