0.2.5 • Published 8 years ago

params-integrity v0.2.5

Weekly downloads
3
License
GPL-2.0
Repository
github
Last release
8 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

8 years ago

0.2.4

8 years ago

0.2.3

8 years ago

0.2.2

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago