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

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

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