New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

checkup

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

checkup

check arguments and if they wrong throw exeption

latest
Source
npmnpm
Version
1.3.0
Version published
Maintainers
1
Created
Source

Checkup

Check arguments and if they wrong throw exeption.

Install

npm i chukup --save

How to use?

var check   = require('checkup');

function someFn(arg1, arg2, arg3) {
    check({
        arg1: arg1,
        arg2, arg2
        arg3: arg3
    });
}

function showName(name, callback) {
    check(arguments, ['name'])
    .check(arguments, ['callback'])
    .type('name', name, 'string')
    .type('callback', callback, 'function');

    console.log('every thing is ok:', name);
}

function callCallback(callback) {
    check([callback], ['callback'])
    .type('callback', callback, 'function');
    
    callback();
}

License

MIT

FAQs

Package last updated on 09 Jun 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts