File size: 395 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
/**
 * 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;
}