This is the solution that I ultimately went with:
const OTCookieName = 'OptanonConsent';
const OTCookieMatch = document.cookie.match(new RegExp('(^| )' + OTCookieName + '=([^;]+)'));
if (OTCookieMatch) {
const OTCookieValue = OTCookieMatch[2];
// replaxe C0003 with whatever OT value we need to check for
if (OTCookieValue && OTCookieValue.includes('C0003')) {
// user has opted-in
}
}