function ensureOptions(options, className, expectedOptionsArray) {
            var missingOption = !options;
            utils.forEach(expectedOptionsArray, function (expectedOption) {
                if (!(options.hasOwnProperty(expectedOption))) {
                    missingOption = true;
                }
            });
            if (missingOption) {
                console.log('Received options:', options);
                this.fail('Malakh.' + className + ' needs a JSON parameter with at least the ' +
                    'following fields: ' + expectedOptionsArray.join(', ') + '.');
            }
            return this;
        }
/**
         * Checks if the <code>options</code> object contains all expected keys; throws an error otherwise.
         *
         * @param {Object} options  The <code>options</code> object to check.
         * @param {string} className  The name of the class used to create the object; needed for an error message.
         * @param {Array.<string>} expectedOptionsArray  An array of key names expected in the <code>options</code>
         *                                               object.
         */
Checks if the options object contains all expected keys; throws an error otherwise.
@param {Object} options  The options object to check.
@param {string} className  The name of the class used to create the object; needed for an error message.
@param {Array.} expectedOptionsArray  An array of key names expected in the options
object.
Checks if the options object contains all expected keys ; throws an error otherwise . @param { Object } options The options object to check . @param { string } className The name of the class used to create the object ; needed for an error message . @param { Array . } expectedOptionsArray An array of key names expected in the options object .
function ensureOptions(options, className, expectedOptionsArray) {
            var missingOption = !options;
            utils.forEach(expectedOptionsArray, function (expectedOption) {
                if (!(options.hasOwnProperty(expectedOption))) {
                    missingOption = true;
                }
            });
            if (missingOption) {
                console.log('Received options:', options);
                this.fail('Malakh.' + className + ' needs a JSON parameter with at least the ' +
                    'following fields: ' + expectedOptionsArray.join(', ') + '.');
            }
            return this;
        }
function ensureOptions ( options , className , expectedOptionsArray ) { var missingOption = ! options ; utils . forEach ( expectedOptionsArray , function ( expectedOption ) { if ( ! ( options . hasOwnProperty ( expectedOption ) ) ) { missingOption = true ; } } ) ; if ( missingOption ) { console . log ( 'Received options:' , options ) ; this . fail ( 'Malakh.' + className + ' needs a JSON parameter with at least the ' + 'following fields: ' + expectedOptionsArray . join ( ', ' ) + '.' ) ; } return this ; }
Checks if the <code>options</code> object contains all expected keys; throws an error otherwise.
Checks if the <code > options< / code > object contains all expected keys ; throws an error otherwise .