repo.or.cz
/
mediawiki.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge "jquery.tablesorter: Silence an expected "sort-rowspan-error" warning"
[mediawiki.git]
/
resources
/
src
/
mediawiki.special.apisandbox
/
UtilMixin.js
blob
be9451bd4e2b00093e8b2601edf150d4f3aaf7f0
1
/**
2
* Simple mixin to allow all widgets to use `apiBool`
3
*
4
* @class
5
* @private
6
* @constructor
7
*/
8
function
UtilMixin
() {
9
// Nothing
10
}
11
12
/**
13
* Test an API boolean
14
*
15
* @param {any} value
16
* @return {boolean}
17
*/
18
UtilMixin
.
prototype
.
apiBool
=
function
(
value
) {
19
return
value
!==
undefined
&&
value
!==
false
;
20
};
21
22
module
.
exports
=
UtilMixin
;