build/src/index.js
/**
     * Validate the options passed in by the user.
     * @private
     * @param options
     */
Validate the options passed in by the user.
@private
@param options
Validate the options passed in by the user . @private @param options
_validateOptions(options) {
        if (!options.name) {
            throw new Error('The `name` option is required.');
        }
        const triggerCount = [
            'triggerHTTP',
            'triggerBucket',
            'triggerTopic',
        ].filter(prop => !!options[prop]).length;
        if (triggerCount > 1) {
            throw new Error('At most 1 trigger may be defined.');
        }
    }
_validateOptions ( options ) { if ( ! options . name ) { throw new Error ( 'The `name` option is required.' ) ; } const triggerCount = [ 'triggerHTTP' , 'triggerBucket' , 'triggerTopic' , ] . filter ( prop => ! ! options [ prop ] ) . length ; if ( triggerCount > 1 ) { throw new Error ( 'At most 1 trigger may be defined.' ) ; } }
Validate the options passed in by the user.
Validate the options passed in by the user .