How to use where clause in Knex
Create refunds with Stripe
Load HTML with Cheerio
How to send POST request with Axios
Find intersection of array in Lodash
Powered by Official white Bloop logo with a period

Terms / Privacy / Search / Support

  •     var assert = require('assert-plus');
     
        function fooAccount(options, callback) {
            assert.object(options, 'options');
            assert.number(options.id, 'options.id');
            assert.bool(options.isManager, 'options.isManager');
            assert.string(options.name, 'options.name');
            assert.arrayOfString(options.email, 'options.email');
            assert.func(callback, 'callback');
     
            // Do stuff
    // Do stuff
            callback(null, {});
        }
    Docs
  • function execFilePlus(args, cb) {
        assert.object(args, 'args');
        assert.arrayOfString(args.argv, 'args.argv');
        assert.optionalNumber(args.maxBuffer, 'args.maxBuffer');
        assert.object(args.log, 'args.log');
        assert.func(cb);
        var argv = args.argv;
    
        args.log.trace({exec: true, argv: argv}, 'exec start');
        var execOpts = {};
        
        //...
    }
    
    
    
    /joyent/sdcadm MPL-2.0
  • function install(opts, cb) {
        assert.object(opts, 'opts');
        assert.optionalObject(opts.log, 'opts.log');
        assert.object(opts.enroute, 'opts.enroute');
        assert.object(opts.server, 'opts.server');
        assert.string(opts.basePath, 'opts.basePath');
        assert.optionalString(opts.excludePath, 'opts.excludePath');
        assert.optionalBool(opts.hotReload, 'opts.hotReload');
    
        var log;
    
        
    
        //...
    }
    
    
    
    /restify/enroute mit
  • function
    bit_enum_assert(be, next)
    {
    	mod_assert.object(be, 'be');
    	mod_assert.arrayOfObject(be.be_out, 'be.be_out');
    	mod_assert.object(be.be_manta, 'be.be_manta');
    	mod_assert.object(be.be_spec, 'be.be_spec');
    	mod_assert.string(be.be_name, 'be.be_name');
    	mod_assert.string(be.be_default_branch, 'be.be_default_branch');
    	mod_assert.func(next, 'next');
    }
    
    
    /joyent/sdc-headnode mpl-2.0
  • function _ensureRbacSettings(opts, cb) {
        assert.object(opts.t, 'opts.t');
        assert.object(opts.account, 'opts.account');
        assert.arrayOfObject(opts.subusers, 'opts.subusers');
        assert.arrayOfObject(opts.policies, 'opts.policies');
        assert.arrayOfObject(opts.roles, 'opts.roles');
        assert.func(cb, 'cb');
    
        var accUuid = opts.account.uuid;
        var context = {
            madeAdditions: false,
            madeRoleAdditions: false
        };
        
        //...
    }
    
    
    /joyent/manta-muskie mpl-2.0
  • Powered by Official black Bloop logo with a period
    download the IDE extension

    View other examples