src/ponyfills/objects.js
/**
 * Convert a hierarchical map into a flattened map
 *
 * @param {Object} map A map with hierarchical keys
 * @returns {Object} A map with hierarchical keys flattened
 */
Convert a hierarchical map into a flattened map
@param {Object} map A map with hierarchical keys
@returns {Object} A map with hierarchical keys flattened
Convert a hierarchical map into a flattened map @param { Object } map A map with hierarchical keys @returns { Object } A map with hierarchical keys flattened
function flatten(map, filter) {
  function recurse(current, parent_key) {
    let items = {};
    Object.keys(current).filter(filter || function() { return true; }).forEach(function(k) {
      let v = current[k];
      let new_key = parent_key ? (parent_key + '.' + k) : k;
      if (isObject(v)) {
        items = assign(items, recurse(current[k], new_key));
      } else {
        items[new_key] = v;
      }
    });
    return items;
  }
  return recurse(map, '');
}
function flatten ( map , filter ) { function recurse ( current , parent_key ) { let items = { } ; Object . keys ( current ) . filter ( filter || function ( ) { return true ; } ) . forEach ( function ( k ) { let v = current [ k ] ; let new_key = parent_key ? ( parent_key + '.' + k ) : k ; if ( isObject ( v ) ) { items = assign ( items , recurse ( current [ k ] , new_key ) ) ; } else { items [ new_key ] = v ; } } ) ; return items ; } return recurse ( map , '' ) ; }
Convert a hierarchical map into a flattened map
 @param {Object} map A map with hierarchical keys
 @returns {Object} A map with hierarchical keys flattened
Convert a hierarchical map into a flattened map @param { Object } map A map with hierarchical keys @returns { Object } A map with hierarchical keys flattened