src/components/meta/Properties.js
function(property, options, throwError) {
            throwError = !_.isUndefined(throwError) ? throwError : true;

            var that = this;

            try {
                if (!this.__hasProperty(property)) {
                    throw 'Property "' + property + '" does not exists!';
                }

                if ('readable' in options || 'writable' in options) {

                    var params = this.__getPropertyParam(property);
                    var rights = ['readable', 'writable'];

                    for (var i = 0, ii = rights.length; i < ii; ++i) {
                        if (!checkRight(rights[i], options, params)) {
                            throw '"' + rights[i] + '" check was failed for property "' + property + '"!';
                        }
                    }
                }
            }
            catch (error) {
                if (!_.isString(error)) {
                    throw error;
                }
                if (throwError) {
                    throw new Error(error);
                }
                return false;
            }
            return true;


            function checkRight(right, options, params) {
                if (!(right in options)) {
                    return true;
                }

                var value = right in params
                    ? (_.isFunction(params[right]) ? params[right].call(that, options.method, options.params) : params[right])
                    : true;

                return options[right] == !!value;
            }
        }
function(property, options, throwError) {
            throwError = !_.isUndefined(throwError) ? throwError : true;

            var that = this;

            try {
                if (!this.__hasProperty(property)) {
                    throw 'Property "' + property + '" does not exists!';
                }

                if ('readable' in options || 'writable' in options) {

                    var params = this.__getPropertyParam(property);
                    var rights = ['readable', 'writable'];

                    for (var i = 0, ii = rights.length; i < ii; ++i) {
                        if (!checkRight(rights[i], options, params)) {
                            throw '"' + rights[i] + '" check was failed for property "' + property + '"!';
                        }
                    }
                }
            }
            catch (error) {
                if (!_.isString(error)) {
                    throw error;
                }
                if (throwError) {
                    throw new Error(error);
                }
                return false;
            }
            return true;


            function checkRight(right, options, params) {
                if (!(right in options)) {
                    return true;
                }

                var value = right in params
                    ? (_.isFunction(params[right]) ? params[right].call(that, options.method, options.params) : params[right])
                    : true;

                return options[right] == !!value;
            }
        }
function ( property , options , throwError ) { throwError = ! _ . isUndefined ( throwError ) ? throwError : true ; var that = this ; try { if ( ! this . __hasProperty ( property ) ) { throw 'Property "' + property + '" does not exists!' ; } if ( 'readable' in options || 'writable' in options ) { var params = this . __getPropertyParam ( property ) ; var rights = [ 'readable' , 'writable' ] ; for ( var i = 0 , ii = rights . length ; i < ii ; ++ i ) { if ( ! checkRight ( rights [ i ] , options , params ) ) { throw '"' + rights [ i ] + '" check was failed for property "' + property + '"!' ; } } } } catch ( error ) { if ( ! _ . isString ( error ) ) { throw error ; } if ( throwError ) { throw new Error ( error ) ; } return false ; } return true ; function checkRight ( right , options , params ) { if ( ! ( right in options ) ) { return true ; } var value = right in params ? ( _ . isFunction ( params [ right ] ) ? params [ right ] . call ( that , options . method , options . params ) : params [ right ] ) : true ; return options [ right ] == ! ! value ; } }
Checks property on existence and several options

@param {string}  property   Property name
@param {object}  options    Checking options (writable, readable, method, params)
@param {boolean} throwError if true throws errors, if false return result of check
@returns {boolean} Check result

@this {clazz|object}
Checks property on existence and several options