lib/collection/property.js
function (str, variables) {
        // if there is nothing to replace, we move on
        if (!(str && _.isString(str))) { return str; }

        // if variables object is not an instance of substitutor then ensure that it is an array so that it becomes
        // compatible with the constructor arguments for a substitutor
        !Substitutor.isInstance(variables) && !_.isArray(variables) && (variables = _.tail(arguments));
        return Substitutor.box(variables, Substitutor.DEFAULT_VARS).parse(str).toString();
    }
function (str, variables) {
        // if there is nothing to replace, we move on
        if (!(str && _.isString(str))) { return str; }

        // if variables object is not an instance of substitutor then ensure that it is an array so that it becomes
        // compatible with the constructor arguments for a substitutor
        !Substitutor.isInstance(variables) && !_.isArray(variables) && (variables = _.tail(arguments));
        return Substitutor.box(variables, Substitutor.DEFAULT_VARS).parse(str).toString();
    }
function ( str , variables ) { // if there is nothing to replace, we move on if ( ! ( str && _ . isString ( str ) ) ) { return str ; } // if variables object is not an instance of substitutor then ensure that it is an array so that it becomes // compatible with the constructor arguments for a substitutor ! Substitutor . isInstance ( variables ) && ! _ . isArray ( variables ) && ( variables = _ . tail ( arguments ) ) ; return Substitutor . box ( variables , Substitutor . DEFAULT_VARS ) . parse ( str ) . toString ( ) ; }
This function accepts a string followed by a number of variable sources as arguments. One or more variable
sources can be provided and it will use the one that has the value in left-to-right order.

@param {String} str
@param {VariableList|Object|Array.<VariableList|Object>} variables
@returns {String}
 @todo: improve algorithm via variable replacement caching
This function accepts a string followed by a number of variable sources as arguments . One or more variable sources can be provided and it will use the one that has the value in left - to - right order .