dist/dust-intl.js
/**
     Returns value from the data using ordered list of keys
     @protected
     @method getResult
     @param {Object} data   The dust context stack's head.
     @param {Array} keys    An ordered list of keys to drill down into the data structure.
     @return {mixed}        Value found for the key path, or undefined if not found.
     */
Returns value from the data using ordered list of keys
Returns value from the data using ordered list of keys
function $$utils$$getResult(data, keys) {
        var k,
            last = keys.length - 1,
            key;
        for (k = 0; k < last; k += 1) {
            key = keys[k];
            if (! data) {
                break;
            }
            if (! data.hasOwnProperty(key)) {
                break;
            }
            data = data[key];
        }
        if (k === last && data && data.hasOwnProperty(keys[last])) {
            return data[keys[last]];
        }
        return undefined;
    }
function $$utils$$getResult ( data , keys ) { var k , last = keys . length - 1 , key ; for ( k = 0 ; k < last ; k += 1 ) { key = keys [ k ] ; if ( ! data ) { break ; } if ( ! data . hasOwnProperty ( key ) ) { break ; } data = data [ key ] ; } if ( k === last && data && data . hasOwnProperty ( keys [ last ] ) ) { return data [ keys [ last ] ] ; } return undefined ; }
Returns value from the data using ordered list of keys
Returns value from the data using ordered list of keys
// iterate the ordered keys (e.g. // keys = [ 'intl', 'locales' ] // it expects to get intl.locales in the current data stack