Download wp-calypso/client/lib/analytics/test/mocks/config/index.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 546 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/lib/analytics/test/mocks/config/index.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/lib/analytics/test/mocks/config/index.js
-
curl -L -o index.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/lib/analytics/test/mocks/config/index.js
546 Bytes
| const config = ( key ) => { | |
| if ( key === 'mc_analytics_enabled' ) { | |
| return true; | |
| } | |
| if ( key === 'google_analytics_key' ) { | |
| return 'foo'; | |
| } | |
| throw new Error( 'key ' + key + ' not expected to be needed' ); | |
| }; | |
| config.isEnabled = ( feature ) => { | |
| if ( 'google-analytics' === feature ) { | |
| return false; | |
| } | |
| if ( 'safari-idb-mitigation' === feature ) { | |
| return false; | |
| } | |
| if ( 'ad-tracking' === feature ) { | |
| return true; | |
| } | |
| throw new Error( 'config.isEnabled to ' + feature + ' not expected to be needed' ); | |
| }; | |
| export default config; | |