* Provides info about the current app. * @param {!Window} win * @return {!ModeDef}
(win)
| 43 | * @return {!ModeDef} |
| 44 | */ |
| 45 | function getMode_(win) { |
| 46 | const hashParams = getHashParams(win); |
| 47 | |
| 48 | // The `minified`, `test` and `localDev` properties are replaced |
| 49 | // as boolean literals when we run `amp dist` without the `--fortesting` |
| 50 | // flags. This improved DCE on the production file we deploy as the code |
| 51 | // paths for localhost/testing/development are eliminated. |
| 52 | return { |
| 53 | localDev: coreMode.isLocalDev(win), |
| 54 | development: isModeDevelopment(win, hashParams), |
| 55 | esm: coreMode.isEsm(), |
| 56 | test: coreMode.isTest(win), |
| 57 | rtvVersion: getRtvVersion(win), |
| 58 | ssrReady: coreMode.isSsrCss(), |
| 59 | }; |
| 60 | } |
| 61 | |
| 62 | /** |
| 63 | * Retrieve the `rtvVersion` which will have a numeric prefix |
no test coverage detected