X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki.String.js;h=5960f93fbdd97879785243d690ffcd4745a59f2a;hb=5ca68877a9a2dc89f9525a6528bf3a40a4920469;hp=5d9bef06327f7d82d822ebd2038b154bccedd27d;hpb=4077b57759756ecd0d25427ec9598feb28a28ac1;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/mediawiki.String.js b/resources/src/mediawiki.String.js index 5d9bef0632..5960f93fbd 100644 --- a/resources/src/mediawiki.String.js +++ b/resources/src/mediawiki.String.js @@ -148,16 +148,16 @@ * 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; @@ -177,16 +177,16 @@ * 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;