Merge "Clean up ar_usertext_timestamp index mess"
[lhc/web/wiklou.git] / resources / src / mediawiki.String.js
index 5d9bef0..5960f93 100644 (file)
         * function, if none, pass empty string.
         * @param {string} newVal New value that may have to be trimmed down.
         * @param {number} byteLimit Number of bytes the value may be in size.
-        * @param {Function} [filterFn] Function to call on the string before assessing the length.
+        * @param {Function} [filterFunction] Function to call on the string before assessing the length.
         * @return {Object}
         * @return {string} return.newVal
         * @return {boolean} return.trimmed
         */
-       function trimByteLength( safeVal, newVal, byteLimit, filterFn ) {
+       function trimByteLength( safeVal, newVal, byteLimit, filterFunction ) {
                var lengthFn;
-               if ( filterFn ) {
+               if ( filterFunction ) {
                        lengthFn = function ( val ) {
-                               return byteLength( filterFn( val ) );
+                               return byteLength( filterFunction( val ) );
                        };
                } else {
                        lengthFn = byteLength;
         * function, if none, pass empty string.
         * @param {string} newVal New value that may have to be trimmed down.
         * @param {number} codePointLimit Number of characters the value may be in size.
-        * @param {Function} [filterFn] Function to call on the string before assessing the length.
+        * @param {Function} [filterFunction] Function to call on the string before assessing the length.
         * @return {Object}
         * @return {string} return.newVal
         * @return {boolean} return.trimmed
         */
-       function trimCodePointLength( safeVal, newVal, codePointLimit, filterFn ) {
+       function trimCodePointLength( safeVal, newVal, codePointLimit, filterFunction ) {
                var lengthFn;
-               if ( filterFn ) {
+               if ( filterFunction ) {
                        lengthFn = function ( val ) {
-                               return codePointLength( filterFn( val ) );
+                               return codePointLength( filterFunction( val ) );
                        };
                } else {
                        lengthFn = codePointLength;