src/js/base/core/func.js
function (obj) {
      var inverted = {};
      for (var key in obj) {
        if (obj.hasOwnProperty(key)) {
          inverted[obj[key]] = key;
        }
      }
      return inverted;
    }
function (obj) {
      var inverted = {};
      for (var key in obj) {
        if (obj.hasOwnProperty(key)) {
          inverted[obj[key]] = key;
        }
      }
      return inverted;
    }
function ( obj ) { var inverted = { } ; for ( var key in obj ) { if ( obj . hasOwnProperty ( key ) ) { inverted [ obj [ key ] ] = key ; } } return inverted ; }
returns a copy of the object where the keys have become the values and the values the keys.
@param {Object} obj
@return {Object}
returns a copy of the object where the keys have become the values and the values the keys .