Download wp-calypso/client/landing/stepper/utils/use-session-id.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 395 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/landing/stepper/utils/use-session-id.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/landing/stepper/utils/use-session-id.ts
-
curl -L -o use-session-id.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/landing/stepper/utils/use-session-id.ts
395 Bytes
| /** | |
| * Retrieves the sessionID from the provided search string. | |
| * @param search - The search string to extract the sessionID from, defaults to window.location.search. | |
| * @returns sessionId or null. | |
| */ | |
| export function getSessionId( search = window.location.search ) { | |
| const searchParams = new URLSearchParams( search ); | |
| const sessionId = searchParams.get( 'sessionId' ); | |
| return sessionId; | |
| } | |