File size: 219 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
export const extractPatternIdFromHash = () => {
	const pattern = /^#pattern-(\d+)$/;
	const match = window.location.hash.match( pattern );

	if ( match ) {
		return parseInt( match[ 1 ], 10 );
	}

	return undefined;
};