Download wp-calypso/client/server/lib/is-mobile-app/index.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 542 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/server/lib/is-mobile-app/index.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/server/lib/is-mobile-app/index.js
-
curl -L -o index.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/server/lib/is-mobile-app/index.js
542 Bytes
| /** | |
| * 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 ); | |
| } | |