Download wp-calypso/client/lib/analytics/utils/may-we-session-track.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 298 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/lib/analytics/utils/may-we-session-track.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/lib/analytics/utils/may-we-session-track.ts
-
curl -L -o may-we-session-track.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/lib/analytics/utils/may-we-session-track.ts
298 Bytes
| import { isRegionInStsZone } from '@automattic/calypso-analytics'; | |
| import cookie from 'cookie'; | |
| const mayWeSessionTrack = (): boolean => { | |
| const cookies = cookie.parse( document.cookie ); | |
| return ! isRegionInStsZone( cookies.country_code, cookies.region ); | |
| }; | |
| export default mayWeSessionTrack; | |