index.js
function getStateName(searchKey, strict) {
    searchKey = searchKey && NODE_RATIFY.isString(searchKey) ? _toTitleCase(searchKey) : null;
    var topLevel = (US_STATE_CODE_TO_NAME[searchKey] || US_CAPITAL_TO_STATE_NAME[searchKey]);

    if(strict) {
        return topLevel;
    } else {
        return (US_INHABITED_TERRITORIES_CODE_TO_NAME[searchKey] || US_CAPITAL_TO_INHABITED_TERRITORY_NAME[searchKey] || topLevel);
    }
}
function getStateName(searchKey, strict) {
    searchKey = searchKey && NODE_RATIFY.isString(searchKey) ? _toTitleCase(searchKey) : null;
    var topLevel = (US_STATE_CODE_TO_NAME[searchKey] || US_CAPITAL_TO_STATE_NAME[searchKey]);

    if(strict) {
        return topLevel;
    } else {
        return (US_INHABITED_TERRITORIES_CODE_TO_NAME[searchKey] || US_CAPITAL_TO_INHABITED_TERRITORY_NAME[searchKey] || topLevel);
    }
}
function getStateName ( searchKey , strict ) { searchKey = searchKey && NODE_RATIFY . isString ( searchKey ) ? _toTitleCase ( searchKey ) : null ; var topLevel = ( US_STATE_CODE_TO_NAME [ searchKey ] || US_CAPITAL_TO_STATE_NAME [ searchKey ] ) ; if ( strict ) { return topLevel ; } else { return ( US_INHABITED_TERRITORIES_CODE_TO_NAME [ searchKey ] || US_CAPITAL_TO_INHABITED_TERRITORY_NAME [ searchKey ] || topLevel ) ; } }
Given a state USPS Code or state capital it finds the state name
Given a state USPS Code or state capital it finds the state name