Permalink
Browse files

Build docs & dist including whitespace adjustments.

  • Loading branch information...
1 parent 83d9cf4 commit a696640f95c0d7115886a82c9a945c982356371e @jdalton jdalton committed Feb 26, 2014
Showing with 187 additions and 179 deletions.
  1. +17 −14 dist/lodash.compat.js
  2. +5 −5 dist/lodash.compat.min.js
  3. +23 −19 dist/lodash.js
  4. +5 −5 dist/lodash.min.js
  5. +6 −5 dist/lodash.underscore.js
  6. +131 −131 doc/README.md
View
@@ -1020,6 +1020,7 @@
// ensure `new bound` is an instance of `func`
var thisBinding = baseCreate(func.prototype),
result = func.apply(thisBinding, args || arguments);
+
return isObject(result) ? result : thisBinding;
}
return func.apply(thisArg, args || arguments);
@@ -2350,11 +2351,11 @@
* // => ['barney', 'fred']
*/
function first(array, callback, thisArg) {
- var n = 0,
- length = array ? array.length : 0;
-
if (typeof callback != 'number' && callback != null) {
- var index = -1;
+ var index = -1,
+ length = array ? array.length : 0,
+ n = 0;
+
callback = lodash.createCallback(callback, thisArg, 3);
while (++index < length && callback(array[index], index, array)) {
n++;
@@ -2523,17 +2524,18 @@
* // => ['barney', 'fred']
*/
function initial(array, callback, thisArg) {
- var n = 0,
- length = array ? array.length : 0;
+ var length = array ? array.length : 0;
if (typeof callback != 'number' && callback != null) {
- var index = length;
+ var index = length,
+ n = 0;
+
callback = lodash.createCallback(callback, thisArg, 3);
while (index-- && callback(array[index], index, array)) {
n++;
}
} else {
- n = (callback == null || thisArg) ? 1 : callback || n;
+ n = (callback == null || thisArg) ? 1 : callback;
}
n = length - n;
return slice(array, 0, n > 0 ? n : 0);
@@ -2648,11 +2650,12 @@
* // => [{ 'name': 'pebbles', 'employer': 'na', 'blocked': true }]
*/
function last(array, callback, thisArg) {
- var n = 0,
- length = array ? array.length : 0;
+ var length = array ? array.length : 0;
if (typeof callback != 'number' && callback != null) {
- var index = length;
+ var index = length,
+ n = 0;
+
callback = lodash.createCallback(callback, thisArg, 3);
while (index-- && callback(array[index], index, array)) {
n++;
@@ -2902,9 +2905,9 @@
*/
function rest(array, callback, thisArg) {
if (typeof callback != 'number' && callback != null) {
- var n = 0,
- index = -1,
- length = array ? array.length : 0;
+ var index = -1,
+ length = array ? array.length : 0,
+ n = 0;
callback = lodash.createCallback(callback, thisArg, 3);
while (++index < length && callback(array[index], index, array)) {
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit a696640

Please sign in to comment.