Skip to content

Commit

Permalink
Small whitespace cleanup for _.times and an anonymous function defini…
Browse files Browse the repository at this point in the history
…tion.
  • Loading branch information
gsamokovarov committed May 1, 2012
1 parent e813db6 commit 43f03d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions underscore.js
Expand Up @@ -381,7 +381,7 @@
var results = [];
// The `isSorted` flag is irrelevant if the array only contains two elements.
if (array.length < 3) isSorted = true;
_.reduce(initial, function (memo, value, index) {
_.reduce(initial, function(memo, value, index) {
if (isSorted ? _.last(memo) !== value || !memo.length : !_.include(memo, value)) {
memo.push(value);
results.push(array[index]);
Expand Down Expand Up @@ -888,7 +888,7 @@
};

// Run a function **n** times.
_.times = function (n, iterator, context) {
_.times = function(n, iterator, context) {
for (var i = 0; i < n; i++) iterator.call(context, i);
};

Expand Down

0 comments on commit 43f03d1

Please sign in to comment.