dist/dust-intl.js
/**
     Determines the format options, possibly looking in parent contexts
     if they've been defined there.
     @protected
     @method getFormatOptions
     @param {Object} params The parameters passed to the dust helper.
     @param {Object} context The dust context stack.
     @return {Object} The format options.
     */
Determines the format options, possibly looking in parent contexts
if they've been defined there.
Determines the format options possibly looking in parent contexts if they ' ve been defined there .
function $$utils$$getFormatOptions(type, chunk, params, context) {
        var raw,
            k,
            fixed = {},
            fmt;
        if (params.formatName) {
            fmt = $$utils$$tap(params.formatName, chunk, context);
            delete params.formatName;
            raw = $$utils$$contextGet(context, ['intl', 'formats', type, fmt]);
            raw = $$utils$$extend({}, raw);  
            $$utils$$extend(raw, params);
        }
        else {
            raw = params;
        }
        for (k in raw) {
            if (raw.hasOwnProperty(k)) {
                fixed[k] = $$utils$$tap(raw[k], chunk, context);
            }
        }
        return fixed;
    }
function $$utils$$getFormatOptions ( type , chunk , params , context ) { var raw , k , fixed = { } , fmt ; if ( params . formatName ) { fmt = $$utils$$tap ( params . formatName , chunk , context ) ; delete params . formatName ; raw = $$utils$$contextGet ( context , [ 'intl' , 'formats' , type , fmt ] ) ; raw = $$utils$$extend ( { } , raw ) ; $$utils$$extend ( raw , params ) ; } else { raw = params ; } for ( k in raw ) { if ( raw . hasOwnProperty ( k ) ) { fixed [ k ] = $$utils$$tap ( raw [ k ] , chunk , context ) ; } } return fixed ; }
Determines the format options, possibly looking in parent contexts
if they've been defined there.
Determines the format options possibly looking in parent contexts if they ' ve been defined there .
// TODO:  only need to copy-and-merge if there are still parameters // shallow copy