index.js
function _reverseAndPrecompute () {
    STATE_NAME_STRICT = Object.keys(US_STATE_NAME_TO_CODE);

    var territoryKeys = Object.keys(US_INHABITED_TERRITORIES_NAME_TO_CODE);

    (STATE_NAME_STRICT || []).forEach(function(stateName) {
        US_STATE_CODE_TO_NAME[US_STATE_NAME_TO_CODE[stateName]] = stateName;
        US_CAPITAL_TO_STATE_NAME[US_STATE_NAME_TO_CAPITAL[stateName]] = stateName;
    });

    (territoryKeys || []).forEach(function(territoryName) {
        US_INHABITED_TERRITORIES_CODE_TO_NAME[US_INHABITED_TERRITORIES_NAME_TO_CODE[territoryName]] = territoryName;
        US_CAPITAL_TO_INHABITED_TERRITORY_NAME[US_INHABITED_TERRITORIES_NAME_TO_CAPITAL[territoryName]] = territoryName;
    });

    // Let us precompute now
    STATE_CODE_STRICT   = Object.keys(US_STATE_CODE_TO_NAME);
    STATE_NAME_ALL      = (STATE_NAME_STRICT || []).concat(territoryKeys);
    STATE_CODE_ALL      = (STATE_CODE_STRICT || []).concat(Object.keys(US_INHABITED_TERRITORIES_CODE_TO_NAME));
}
function _reverseAndPrecompute () {
    STATE_NAME_STRICT = Object.keys(US_STATE_NAME_TO_CODE);

    var territoryKeys = Object.keys(US_INHABITED_TERRITORIES_NAME_TO_CODE);

    (STATE_NAME_STRICT || []).forEach(function(stateName) {
        US_STATE_CODE_TO_NAME[US_STATE_NAME_TO_CODE[stateName]] = stateName;
        US_CAPITAL_TO_STATE_NAME[US_STATE_NAME_TO_CAPITAL[stateName]] = stateName;
    });

    (territoryKeys || []).forEach(function(territoryName) {
        US_INHABITED_TERRITORIES_CODE_TO_NAME[US_INHABITED_TERRITORIES_NAME_TO_CODE[territoryName]] = territoryName;
        US_CAPITAL_TO_INHABITED_TERRITORY_NAME[US_INHABITED_TERRITORIES_NAME_TO_CAPITAL[territoryName]] = territoryName;
    });

    // Let us precompute now
    STATE_CODE_STRICT   = Object.keys(US_STATE_CODE_TO_NAME);
    STATE_NAME_ALL      = (STATE_NAME_STRICT || []).concat(territoryKeys);
    STATE_CODE_ALL      = (STATE_CODE_STRICT || []).concat(Object.keys(US_INHABITED_TERRITORIES_CODE_TO_NAME));
}
function _reverseAndPrecompute ( ) { STATE_NAME_STRICT = Object . keys ( US_STATE_NAME_TO_CODE ) ; var territoryKeys = Object . keys ( US_INHABITED_TERRITORIES_NAME_TO_CODE ) ; ( STATE_NAME_STRICT || [ ] ) . forEach ( function ( stateName ) { US_STATE_CODE_TO_NAME [ US_STATE_NAME_TO_CODE [ stateName ] ] = stateName ; US_CAPITAL_TO_STATE_NAME [ US_STATE_NAME_TO_CAPITAL [ stateName ] ] = stateName ; } ) ; ( territoryKeys || [ ] ) . forEach ( function ( territoryName ) { US_INHABITED_TERRITORIES_CODE_TO_NAME [ US_INHABITED_TERRITORIES_NAME_TO_CODE [ territoryName ] ] = territoryName ; US_CAPITAL_TO_INHABITED_TERRITORY_NAME [ US_INHABITED_TERRITORIES_NAME_TO_CAPITAL [ territoryName ] ] = territoryName ; } ) ; // Let us precompute now STATE_CODE_STRICT = Object . keys ( US_STATE_CODE_TO_NAME ) ; STATE_NAME_ALL = ( STATE_NAME_STRICT || [ ] ) . concat ( territoryKeys ) ; STATE_CODE_ALL = ( STATE_CODE_STRICT || [ ] ) . concat ( Object . keys ( US_INHABITED_TERRITORIES_CODE_TO_NAME ) ) ; }
Create reverse mapping
Create reverse mapping