File size: 542 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/**
 * Returns whether source matches a WordPress mobile app.
 * @param source string
 * @returns {boolean} Whether source matches the ones used on the WordPress mobile apps.
 */
export function isWpMobileApp( source ) {
	return /wp-(android|iphone)/.test( source );
}

/**
 * Returns whether user is using a WooCommerce mobile app.
 * @param source string
 * @returns {boolean} Whether source matches the ones used on the WooCommerce mobile apps.
 */
export function isWcMobileApp( source ) {
	return /wc-(android|iphone)/.test( source );
}