index.js
function invert(obj) {
    let result = {};
    let keys = Object.keys(obj);
    for (let i = 0, length = keys.length; i < length; i++) {
      result[obj[keys[i]]] = keys[i];
    }
    return result;
  }
function invert(obj) {
    let result = {};
    let keys = Object.keys(obj);
    for (let i = 0, length = keys.length; i < length; i++) {
      result[obj[keys[i]]] = keys[i];
    }
    return result;
  }
function invert ( obj ) { let result = { } ; let keys = Object . keys ( obj ) ; for ( let i = 0 , length = keys . length ; i < length ; i ++ ) { result [ obj [ keys [ i ] ] ] = keys [ i ] ; } return result ; }
Invert the keys and values of an object. The values must be serializable.
Invert the keys and values of an object . The values must be serializable .