##### Migration guide
(NOTE) Support for `mw.config.exists([multiple keys])` and `mw.user.tokens.exists([multiple keys])` is being removed. If your script makes use of this, call `exists()` or `get()` instead with a JavaScript "and"-statement.
```lang=diff,name=Example (1)
if (
- mw.config.exists( [
- 'wgTitle'
- 'wgPageName'
- ] )
+ mw.config.exists( 'wgTitle' ) &&
+ mw.config.exists( 'wgPageName' )
) {
console.log( 'Condition reached.' );
}
```
```lang=diff,name=Example (2)
- if ( mw.config.exists( [ 'wgTitle' 'wgPageName' ] ) ) {
+ if ( mw.config.get( 'wgTitle' ) && mw.config.get( 'wgPageName' ) )
console.log( 'Condition reached.' );
}
```
##### Known usage
None. There seem to be zero search results from all user scripts, gadgets and site scripts on public WMF wikis. And also no search results from any Gerrit repos (except for its definition and test).
* [[ https://codesearch.wmflabs.org/search/?q=exists%5Cs*%5C(%5Cs*%5C%5B&i=nope&files=js%24&repos= | Codesearch - git ]]
* [Global Search - wiki](https://tools.wmflabs.org/global-search/?q=exists%5Cs*%5C%28%5Cs*%5C%5B®ex=1&namespaces=2%2C4%2C8)