From the tailwind docs, you can import your config from the tailwindcss
node module:
import resolveConfig from 'tailwindcss/resolveConfig'
import tailwindConfig from './tailwind.config.js'
const fullConfig = resolveConfig(tailwindConfig)
fullConfig.theme.width[4]
// => '1rem'
fullConfig.theme.screens.md
// => '768px'
fullConfig.theme.boxShadow['2xl']
// => '0 25px 50px -12px rgba(0, 0, 0, 0.25)'
As you can see above, you can get your breakpoints by referencing fullConfig.theme.screens.{breakpoint}
. You should be able to compare this to your current screen width using javascript.
Find the official tailwind description here.