src/components/meta/Property/Type.js
function(value, params, property) {
            value = ''+value;

            if ('pattern' in params && !params.pattern.test(value)) {
                throw new Error('Value "' + value +
                    '" of property "' + property + '" does not match pattern "' + params.pattern + '"!');
            }
            if ('variants' in params && -1 === params.variants.indexOf(value)) {
                throw new Error('Value "' + value +
                    '" of property "' + property + '" must be one of "' + params.variants.join(', ') + '"!');
            }
            return value;
        }
function(value, params, property) {
            value = ''+value;

            if ('pattern' in params && !params.pattern.test(value)) {
                throw new Error('Value "' + value +
                    '" of property "' + property + '" does not match pattern "' + params.pattern + '"!');
            }
            if ('variants' in params && -1 === params.variants.indexOf(value)) {
                throw new Error('Value "' + value +
                    '" of property "' + property + '" must be one of "' + params.variants.join(', ') + '"!');
            }
            return value;
        }
function ( value , params , property ) { value = '' + value ; if ( 'pattern' in params && ! params . pattern . test ( value ) ) { throw new Error ( 'Value "' + value + '" of property "' + property + '" does not match pattern "' + params . pattern + '"!' ) ; } if ( 'variants' in params && - 1 === params . variants . indexOf ( value ) ) { throw new Error ( 'Value "' + value + '" of property "' + property + '" must be one of "' + params . variants . join ( ', ' ) + '"!' ) ; } return value ; }
String property type
Converts value to string, applies 'pattern' and 'variants' parameters

@param {*}      value    Property value
@param {object} params   Property parameters
@param {string} property Property name

@throws {Error} if value does not match 'pattern'
@throws {Error} if value does not one of 'variants' values

@returns {string} Processed property value

@this {metaProcessor}
String property type Converts value to string applies pattern and variants parameters