mediawiki.util: Document isIPAddress() allowBlock as optional
authorTimo Tijhof <krinklemail@gmail.com>
Mon, 19 Mar 2018 03:32:05 +0000 (20:32 -0700)
committerTimo Tijhof <krinklemail@gmail.com>
Mon, 19 Mar 2018 03:32:05 +0000 (20:32 -0700)
This was already the case in the code, but the documentation
was not reflecting this accurately. Passing 'false' as second
parameter is not desirable in most cases.

Change-Id: Idbbd7de795b444e401a16292dfb8c9a80f4d07be

resources/src/mediawiki/mediawiki.util.js

index fb34a89..d7b3f35 100644 (file)
                 * Note: borrows from IP::isIPv4
                 *
                 * @param {string} address
-                * @param {boolean} allowBlock
+                * @param {boolean} [allowBlock=false]
                 * @return {boolean}
                 */
                isIPv4Address: function ( address, allowBlock ) {
                 * Note: borrows from IP::isIPv6
                 *
                 * @param {string} address
-                * @param {boolean} allowBlock
+                * @param {boolean} [allowBlock=false]
                 * @return {boolean}
                 */
                isIPv6Address: function ( address, allowBlock ) {
                 *
                 * @since 1.25
                 * @param {string} address String to check
-                * @param {boolean} allowBlock True if a block of IPs should be allowed
+                * @param {boolean} [allowBlock=false] If a block of IPs should be allowed
                 * @return {boolean}
                 */
                isIPAddress: function ( address, allowBlock ) {