Fixing template settings

This commit is contained in:
Jeremy Ashkenas
2010-10-07 10:44:49 -04:00
parent 0fb9a95182
commit 5b4b308c91
5 changed files with 18 additions and 18 deletions

View File

@@ -103,8 +103,8 @@
return memo;
};
// The right-associative version of reduce, also known as `foldr`. Uses
// Delegates to **ECMAScript 5**'s native reduceRight if available.
// The right-associative version of reduce, also known as `foldr`.
// Delegates to **ECMAScript 5**'s native `reduceRight` if available.
_.reduceRight = _.foldr = function(obj, iterator, memo, context) {
if (nativeReduceRight && obj.reduceRight === nativeReduceRight) {
if (context) iterator = _.bind(iterator, context);
@@ -114,8 +114,8 @@
return _.reduce(reversed, iterator, memo, context);
};
// Return the first value which passes a truth test.
_.detect = function(obj, iterator, context) {
// Return the first value which passes a truth test. Aliased as `detect`.
_.find = _.detect = function(obj, iterator, context) {
var result;
each(obj, function(value, index, list) {
if (iterator.call(context, value, index, list)) {
@@ -128,7 +128,7 @@
// Return all the elements that pass a truth test.
// Delegates to **ECMAScript 5**'s native `filter` if available.
// Aliased as `select`
// Aliased as `select`.
_.filter = _.select = function(obj, iterator, context) {
if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context);
var results = [];
@@ -330,7 +330,7 @@
return results;
};
// If the browser doesn't supply us with indexOf (I'm looking at you, MSIE),
// If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**),
// we need this function. Return the position of the first occurence of an
// item in an array, or -1 if the item is not included in the array.
// Delegates to **ECMAScript 5**'s native `indexOf` if available.