Skip to content

Commit 17158ba

Browse files
committed
Run make cleanup. Fixes locutusjs#1
1 parent d4f2f79 commit 17158ba

13 files changed

+24
-19
lines changed

functions/array/array_multisort.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ function array_multisort(arr) {
3838

3939
var sortFunctions = [
4040
[
41+
4142
function(a, b) {
4243
lastSort.push(a > b ? 1 : (a < b ? -1 : 0));
4344
return a > b ? 1 : (a < b ? -1 : 0);
@@ -48,6 +49,7 @@ function array_multisort(arr) {
4849
}
4950
],
5051
[
52+
5153
function(a, b) {
5254
lastSort.push(a - b);
5355
return a - b;
@@ -58,6 +60,7 @@ function array_multisort(arr) {
5860
}
5961
],
6062
[
63+
6164
function(a, b) {
6265
lastSort.push((a + '') > (b + '') ? 1 : ((a + '') < (b + '') ? -1 : 0));
6366
return (a + '') > (b + '') ? 1 : ((a + '') < (b + '') ? -1 : 0);

functions/array/in_array.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function in_array(needle, haystack, argStrict) {
1818

1919
var key = '',
2020
strict = !! argStrict;
21-
21+
2222
//we prevent the double check (strict && arr[key] === ndl) || (!strict && arr[key] == ndl)
2323
//in just one for, in order to improve the performance
2424
//deciding wich type of comparation will do before walk array
@@ -37,4 +37,4 @@ function in_array(needle, haystack, argStrict) {
3737
}
3838

3939
return false;
40-
}
40+
}

functions/array/rsort.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,4 @@ function rsort(inputArr, sort_flags) {
104104
populateArr[i] = valArr[i];
105105
}
106106
return strictForIn || populateArr;
107-
}
107+
}

functions/datetime/date.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,8 @@ function date(format, timestamp) {
273273
that = this;
274274
jsdate = (timestamp === undefined ? new Date() : // Not provided
275275
(timestamp instanceof Date) ? new Date(timestamp) : // JS Date()
276-
new Date(timestamp * 1000) // UNIX timestamp (auto-convert to int)
277-
);
276+
new Date(timestamp * 1000) // UNIX timestamp (auto-convert to int)
277+
);
278278
return format.replace(formatChr, formatChrCb);
279279
};
280280
return this.date(format, timestamp);

functions/datetime/strptime.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,4 +362,4 @@ Oy
362362
// POST-PROCESSING
363363
retObj.unparsed = dateStr.slice(j); // Will also get extra whitespace; empty string if none
364364
return retObj;
365-
}
365+
}

functions/strings/metaphone.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,14 @@ function metaphone(word, max_phonemes) {
4242
leadingNonAlpha = new RegExp('^[^' + alpha + ']+');
4343

4444
word = typeof word === 'string' ? word : '';
45-
word = word.toUpperCase().replace(leadingNonAlpha, '');
45+
word = word.toUpperCase()
46+
.replace(leadingNonAlpha, '');
4647

4748
if (!word) {
4849
return '';
4950
}
5051

51-
var is = function (p, c) {
52+
var is = function(p, c) {
5253
return c !== '' && p.indexOf(c) !== -1;
5354
};
5455

@@ -218,7 +219,7 @@ function metaphone(word, max_phonemes) {
218219
}
219220

220221
return meta;
221-
222+
222223
/*
223224
" abc", "ABK", // skip leading whitespace
224225
"1234.678!@abc", "ABK", // skip leading non-alpha chars
@@ -337,4 +338,4 @@ function metaphone(word, max_phonemes) {
337338
"zigzag", "SKSK",
338339
"abc abc", "ABKBK" // eventhough there are two words, second 'a' is ignored
339340
*/
340-
}
341+
}

functions/strings/number_format.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ function number_format(number, decimals, dec_point, thousands_sep) {
5858
s = '',
5959
toFixedFix = function(n, prec) {
6060
var k = Math.pow(10, prec);
61-
return '' + (Math.round(n * k) / k).toFixed(prec);
61+
return '' + (Math.round(n * k) / k)
62+
.toFixed(prec);
6263
};
6364
// Fix for IE parseFloat(0.55).toFixed(0) = 0;
6465
s = (prec ? toFixedFix(n, prec) : '' + Math.round(n))
@@ -73,4 +74,4 @@ function number_format(number, decimals, dec_point, thousands_sep) {
7374
.join('0');
7475
}
7576
return s.join(dec);
76-
}
77+
}

functions/strings/setlocale.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,4 +347,4 @@ function setlocale(category, locale) {
347347
this.php_js.localeCategories[category] = locale;
348348
}
349349
return locale;
350-
}
350+
}

functions/strings/sprintf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,4 +185,4 @@ function sprintf() {
185185
};
186186

187187
return format.replace(regex, doFormat);
188-
}
188+
}

functions/strings/str_getcsv.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ function str_getcsv(input, delimiter, enclosure, escape) {
66
// example 2: str_getcsv('"row2""cell1","row2cell2","row2cell3"', null, null, '"');
77
// returns 2: ['row2"cell1', 'row2cell2', 'row2cell3']
88

9-
// These test cases allowing for missing delimiters are not currently supported
10-
/*
9+
// These test cases allowing for missing delimiters are not currently supported
10+
/*
1111
str_getcsv('"row2""cell1",row2cell2,row2cell3', null, null, '"');
1212
['row2"cell1', 'row2cell2', 'row2cell3']
1313

functions/strings/str_word_count.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,4 @@ function str_word_count(str, format, charlist) {
104104
}
105105

106106
throw 'You have supplied an incorrect format';
107-
}
107+
}

functions/var/var_dump.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,4 +167,4 @@ function var_dump() {
167167
this.echo(output); // Outputting as plain text may work in some plain XML
168168
}
169169
}
170-
}
170+
}

functions/xml/utf8_encode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ function utf8_encode(argString) {
6565
}
6666

6767
return utftext;
68-
}
68+
}

0 commit comments

Comments
 (0)