function ensureArgumentsNum(args, className, expectedArguments) {
            expectedArguments = expectedArguments || [];
            var firstArg = args[0];

            if (!(firstArg instanceof Malakh) ||
                args.length < expectedArguments.length + 1) { // +1 because of the `malakh` parameter

                className = className || 'ClassName';

                var names = expectedArguments.join(', ');
                var errorString = 'Incorrect paremeters! Use:\n' +
                    '    var obj = malakh.' + className + '(' + names + ')\n';

                expectedArguments.unshift('malakh');
                var namesWithMalakh = expectedArguments.join(', ');
                errorString += 'or:\n' +
                    '    new Malakh.' + className + '(' + namesWithMalakh + ')\n';

                console.log('Received arguments:', [].slice.call(args));
                this.fail(errorString);
            }

            /**
             * Main Malakh instance.
             * @type Malakh
             */
            this.malakh = firstArg;
            return this;
        }
/**
         * Checks if the <code>args</code> arguments object contains all expected values; throws an error otherwise.
         *
         * @param {Object} args  The <code>arguments</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>}expectedArguments  An array of argument names expected in the <code>args</code> array.
         * @returns {*} this
         */
Checks if the args arguments object contains all expected values; throws an error otherwise.
@param {Object} args  The arguments object to check.
@param {string} className  The name of the class used to create the object; needed for an error message.
@param {Array.}expectedArguments  An array of argument names expected in the args array.
@returns {*} this
Checks if the args arguments object contains all expected values ; throws an error otherwise . @param { Object } args The arguments object to check . @param { string } className The name of the class used to create the object ; needed for an error message . @param { Array . } expectedArguments An array of argument names expected in the args array . @returns { * } this
function ensureArgumentsNum(args, className, expectedArguments) {
            expectedArguments = expectedArguments || [];
            var firstArg = args[0];
            if (!(firstArg instanceof Malakh) ||
                args.length < expectedArguments.length + 1) { 
                className = className || 'ClassName';
                var names = expectedArguments.join(', ');
                var errorString = 'Incorrect paremeters! Use:\n' +
                    '    var obj = malakh.' + className + '(' + names + ')\n';
                expectedArguments.unshift('malakh');
                var namesWithMalakh = expectedArguments.join(', ');
                errorString += 'or:\n' +
                    '    new Malakh.' + className + '(' + namesWithMalakh + ')\n';
                console.log('Received arguments:', [].slice.call(args));
                this.fail(errorString);
            }
            this.malakh = firstArg;
            return this;
        }
function ensureArgumentsNum ( args , className , expectedArguments ) { expectedArguments = expectedArguments || [ ] ; var firstArg = args [ 0 ] ; if ( ! ( firstArg instanceof Malakh ) || args . length < expectedArguments . length + 1 ) { className = className || 'ClassName' ; var names = expectedArguments . join ( ', ' ) ; var errorString = 'Incorrect paremeters! Use:\n' + '    var obj = malakh.' + className + '(' + names + ')\n' ; expectedArguments . unshift ( 'malakh' ) ; var namesWithMalakh = expectedArguments . join ( ', ' ) ; errorString += 'or:\n' + '    new Malakh.' + className + '(' + namesWithMalakh + ')\n' ; console . log ( 'Received arguments:' , [ ] . slice . call ( args ) ) ; this . fail ( errorString ) ; } this . malakh = firstArg ; return this ; }
Checks if the <code>args</code> arguments object contains all expected values; throws an error otherwise.
Checks if the <code > args< / code > arguments object contains all expected values ; throws an error otherwise .
// +1 because of the `malakh` parameter /**
             * Main Malakh instance.
             * @type Malakh
             */