diff --git a/.eslintrc b/.eslintrc index 6aa275a7d..16c8fedc8 100644 --- a/.eslintrc +++ b/.eslintrc @@ -3,5 +3,8 @@ "browser": true, "node": true, "amd": true + }, + "parserOptions": { + "ecmaVersion": 3 } } diff --git a/.gitignore b/.gitignore index ab5b5c583..250659f2f 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ node_modules *.swp nyc_output coverage +test-treeshake/*-umd.js +docs/underscore.js diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 95cbd71b8..b8fb76fd7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,6 +8,6 @@ * Before sending a pull request for a feature, be sure to have [tests](https://underscorejs.org/test/). -* Use the same coding style as the rest of the [codebase](https://github.com/jashkenas/underscore/blob/master/underscore.js). +* Use the same coding style as the rest of the [codebase](https://github.com/jashkenas/underscore/blob/master/modules/index.js). * In your pull request, do not add documentation or re-build the minified `underscore-min.js` file. We'll do those things before cutting a new release. diff --git a/LICENSE b/LICENSE index dd25d8041..8c2236251 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009-2018 Jeremy Ashkenas, DocumentCloud and Investigative +Copyright (c) 2009-2020 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors Permission is hereby granted, free of charge, to any person diff --git a/docs/.eslintrc b/docs/.eslintrc index aac42a91c..0c3c9c9e2 100644 --- a/docs/.eslintrc +++ b/docs/.eslintrc @@ -1,5 +1,7 @@ { "globals": { - "_": true + "_": true, + "parserOptions": {}, + "rules": [], } } diff --git a/docs/rollup.config.js b/docs/rollup.config.js new file mode 100644 index 000000000..06ae2639c --- /dev/null +++ b/docs/rollup.config.js @@ -0,0 +1,13 @@ +module.exports = { + input: '../modules/index-all.js', + treeshake: false, + output: { + file: 'underscore.js', + exports: 'named', + format: 'esm', + legacy: true, + strict: false, + externalLiveBindings: false, + freeze: false, + }, +}; diff --git a/docs/underscore.html b/docs/underscore.html index 275f7d53d..7ac32b186 100644 --- a/docs/underscore.html +++ b/docs/underscore.html @@ -27,16 +27,13 @@

underscore.js

-
Underscore.js 1.9.2
+              
Underscore.js 1.10.0
 https://underscorejs.org
-(c) 2009-2018 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+(c) 2009-2020 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 Underscore may be freely distributed under the MIT license.
 
-
-(function() {
- @@ -77,10 +74,10 @@

Baseline setup

-
  var root = typeof self == 'object' && self.self === self && self ||
-            typeof global == 'object' && global.global === global && global ||
-            this ||
-            {};
+
var root = typeof self == 'object' && self.self === self && self ||
+          typeof global == 'object' && global.global === global && global ||
+          Function('return this')() ||
+          {};
@@ -91,11 +88,12 @@

Baseline setup

-

Save the previous value of the _ variable.

+

Save bytes in the minified (but not gzipped) version:

-
  var previousUnderscore = root._;
+
var ArrayProto = Array.prototype, ObjProto = Object.prototype;
+var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;
@@ -106,12 +104,14 @@

Baseline setup

-

Save bytes in the minified (but not gzipped) version:

+

Create quick reference variables for speed access to core prototypes.

-
  var ArrayProto = Array.prototype, ObjProto = Object.prototype;
-  var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;
+
var push = ArrayProto.push,
+    slice = ArrayProto.slice,
+    toString = ObjProto.toString,
+    hasOwnProperty = ObjProto.hasOwnProperty;
@@ -122,14 +122,14 @@

Baseline setup

-

Create quick reference variables for speed access to core prototypes.

+

All ECMAScript 5 native function implementations that we hope to use +are declared here.

-
  var push = ArrayProto.push,
-      slice = ArrayProto.slice,
-      toString = ObjProto.toString,
-      hasOwnProperty = ObjProto.hasOwnProperty;
+
var nativeIsArray = Array.isArray,
+    nativeKeys = Object.keys,
+    nativeCreate = Object.create;
@@ -140,14 +140,12 @@

Baseline setup

-

All ECMAScript 5 native function implementations that we hope to use -are declared here.

+

Create references to these builtin functions because we override them.

-
  var nativeIsArray = Array.isArray,
-      nativeKeys = Object.keys,
-      nativeCreate = Object.create;
+
var _isNaN = root.isNaN,
+    _isFinite = root.isFinite;
@@ -162,7 +160,7 @@

Baseline setup

-
  var Ctor = function(){};
+
var Ctor = function(){};
@@ -173,15 +171,16 @@

Baseline setup

-

Create a safe reference to the Underscore object for use below.

+

The Underscore object. All exported functions below are added to it in the +modules/index-all.js using the mixin function.

-
  var _ = function(obj) {
-    if (obj instanceof _) return obj;
-    if (!(this instanceof _)) return new _(obj);
-    this._wrapped = obj;
-  };
+
function _(obj) {
+  if (obj instanceof _) return obj;
+  if (!(this instanceof _)) return new _(obj);
+  this._wrapped = obj;
+}
@@ -192,22 +191,11 @@

Baseline setup

-

Export the Underscore object for Node.js, with -backwards-compatibility for their old module API. If we’re in -the browser, add _ as a global object. -(nodeType is checked to ensure that module -and exports are not HTML elements.)

+

Current version.

-
  if (typeof exports != 'undefined' && !exports.nodeType) {
-    if (typeof module != 'undefined' && !module.nodeType && module.exports) {
-      exports = module.exports = _;
-    }
-    exports._ = _;
-  } else {
-    root._ = _;
-  }
+
var VERSION = _.VERSION = '1.10.0';
@@ -218,11 +206,18 @@

Baseline setup

-

Current version.

+

Internal function that returns an efficient (for current engines) version +of the passed-in callback, to be repeatedly applied in other Underscore +functions.

-
  _.VERSION = '1.9.2';
+
function optimizeCb(func, context, argCount) {
+  if (context === void 0) return func;
+  switch (argCount == null ? 3 : argCount) {
+    case 1: return function(value) {
+      return func.call(context, value);
+    };
@@ -233,18 +228,21 @@

Baseline setup

-

Internal function that returns an efficient (for current engines) version -of the passed-in callback, to be repeatedly applied in other Underscore -functions.

+

The 2-argument case is omitted because we’re not using it.

-
  var optimizeCb = function(func, context, argCount) {
-    if (context === void 0) return func;
-    switch (argCount == null ? 3 : argCount) {
-      case 1: return function(value) {
-        return func.call(context, value);
-      };
+
    case 3: return function(value, index, collection) {
+      return func.call(context, value, index, collection);
+    };
+    case 4: return function(accumulator, value, index, collection) {
+      return func.call(context, accumulator, value, index, collection);
+    };
+  }
+  return function() {
+    return func.apply(context, arguments);
+  };
+}
@@ -255,23 +253,18 @@

Baseline setup

-

The 2-argument case is omitted because we’re not using it.

+

An internal function to generate callbacks that can be applied to each +element in a collection, returning the desired result — either identity, +an arbitrary callback, a property matcher, or a property accessor.

-
      case 3: return function(value, index, collection) {
-        return func.call(context, value, index, collection);
-      };
-      case 4: return function(accumulator, value, index, collection) {
-        return func.call(context, accumulator, value, index, collection);
-      };
-    }
-    return function() {
-      return func.apply(context, arguments);
-    };
-  };
-
-  var builtinIteratee;
+
function baseIteratee(value, context, argCount) {
+  if (value == null) return identity;
+  if (isFunction(value)) return optimizeCb(value, context, argCount);
+  if (isObject(value) && !isArray(value)) return matcher(value);
+  return property(value);
+}
@@ -282,19 +275,16 @@

Baseline setup

-

An internal function to generate callbacks that can be applied to each -element in a collection, returning the desired result — either identity, -an arbitrary callback, a property matcher, or a property accessor.

+

External wrapper for our callback generator. Users may customize +_.iteratee if they want additional predicate/iteratee shorthand styles. +This abstraction hides the internal-only argCount argument.

-
  var cb = function(value, context, argCount) {
-    if (_.iteratee !== builtinIteratee) return _.iteratee(value, context);
-    if (value == null) return _.identity;
-    if (_.isFunction(value)) return optimizeCb(value, context, argCount);
-    if (_.isObject(value) && !_.isArray(value)) return _.matcher(value);
-    return _.property(value);
-  };
+
_.iteratee = iteratee;
+function iteratee(value, context) {
+  return baseIteratee(value, context, Infinity);
+}
@@ -305,15 +295,15 @@

Baseline setup

-

External wrapper for our callback generator. Users may customize -_.iteratee if they want additional predicate/iteratee shorthand styles. -This abstraction hides the internal-only argCount argument.

+

The function we actually call internally. It invokes _.iteratee if +overridden, otherwise baseIteratee.

-
  _.iteratee = builtinIteratee = function(value, context) {
-    return cb(value, context, Infinity);
-  };
+
function cb(value, context, argCount) {
+  if (_.iteratee !== iteratee) return _.iteratee(value, context);
+  return baseIteratee(value, context, argCount);
+}
@@ -332,28 +322,28 @@

Baseline setup

-
  var restArguments = function(func, startIndex) {
-    startIndex = startIndex == null ? func.length - 1 : +startIndex;
-    return function() {
-      var length = Math.max(arguments.length - startIndex, 0),
-          rest = Array(length),
-          index = 0;
-      for (; index < length; index++) {
-        rest[index] = arguments[index + startIndex];
-      }
-      switch (startIndex) {
-        case 0: return func.call(this, rest);
-        case 1: return func.call(this, arguments[0], rest);
-        case 2: return func.call(this, arguments[0], arguments[1], rest);
-      }
-      var args = Array(startIndex + 1);
-      for (index = 0; index < startIndex; index++) {
-        args[index] = arguments[index];
-      }
-      args[startIndex] = rest;
-      return func.apply(this, args);
-    };
-  };
+
function restArguments(func, startIndex) {
+  startIndex = startIndex == null ? func.length - 1 : +startIndex;
+  return function() {
+    var length = Math.max(arguments.length - startIndex, 0),
+        rest = Array(length),
+        index = 0;
+    for (; index < length; index++) {
+      rest[index] = arguments[index + startIndex];
+    }
+    switch (startIndex) {
+      case 0: return func.call(this, rest);
+      case 1: return func.call(this, arguments[0], rest);
+      case 2: return func.call(this, arguments[0], arguments[1], rest);
+    }
+    var args = Array(startIndex + 1);
+    for (index = 0; index < startIndex; index++) {
+      args[index] = arguments[index];
+    }
+    args[startIndex] = rest;
+    return func.apply(this, args);
+  };
+}
@@ -368,33 +358,33 @@

Baseline setup

-
  var baseCreate = function(prototype) {
-    if (!_.isObject(prototype)) return {};
-    if (nativeCreate) return nativeCreate(prototype);
-    Ctor.prototype = prototype;
-    var result = new Ctor;
-    Ctor.prototype = null;
-    return result;
-  };
+            
function baseCreate(prototype) {
+  if (!isObject(prototype)) return {};
+  if (nativeCreate) return nativeCreate(prototype);
+  Ctor.prototype = prototype;
+  var result = new Ctor;
+  Ctor.prototype = null;
+  return result;
+}
 
-  var shallowProperty = function(key) {
-    return function(obj) {
-      return obj == null ? void 0 : obj[key];
-    };
+function shallowProperty(key) {
+  return function(obj) {
+    return obj == null ? void 0 : obj[key];
   };
+}
 
-  var has = function(obj, path) {
-    return obj != null && hasOwnProperty.call(obj, path);
-  }
+function _has(obj, path) {
+  return obj != null && hasOwnProperty.call(obj, path);
+}
 
-  var deepGet = function(obj, path) {
-    var length = path.length;
-    for (var i = 0; i < length; i++) {
-      if (obj == null) return void 0;
-      obj = obj[path[i]];
-    }
-    return length ? obj : void 0;
-  };
+function deepGet(obj, path) { + var length = path.length; + for (var i = 0; i < length; i++) { + if (obj == null) return void 0; + obj = obj[path[i]]; + } + return length ? obj : void 0; +}
@@ -412,12 +402,12 @@

Baseline setup

-
  var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;
-  var getLength = shallowProperty('length');
-  var isArrayLike = function(collection) {
-    var length = getLength(collection);
-    return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX;
-  };
+
var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;
+var getLength = shallowProperty('length');
+function isArrayLike(collection) {
+  var length = getLength(collection);
+  return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX;
+}
@@ -459,21 +449,21 @@

Collection Functions

-
  _.each = _.forEach = function(obj, iteratee, context) {
-    iteratee = optimizeCb(iteratee, context);
-    var i, length;
-    if (isArrayLike(obj)) {
-      for (i = 0, length = obj.length; i < length; i++) {
-        iteratee(obj[i], i, obj);
-      }
-    } else {
-      var keys = _.keys(obj);
-      for (i = 0, length = keys.length; i < length; i++) {
-        iteratee(obj[keys[i]], keys[i], obj);
-      }
+            
function each(obj, iteratee, context) {
+  iteratee = optimizeCb(iteratee, context);
+  var i, length;
+  if (isArrayLike(obj)) {
+    for (i = 0, length = obj.length; i < length; i++) {
+      iteratee(obj[i], i, obj);
     }
-    return obj;
-  };
+ } else { + var _keys = keys(obj); + for (i = 0, length = _keys.length; i < length; i++) { + iteratee(obj[_keys[i]], _keys[i], obj); + } + } + return obj; +}
@@ -488,17 +478,17 @@

Collection Functions

-
  _.map = _.collect = function(obj, iteratee, context) {
-    iteratee = cb(iteratee, context);
-    var keys = !isArrayLike(obj) && _.keys(obj),
-        length = (keys || obj).length,
-        results = Array(length);
-    for (var index = 0; index < length; index++) {
-      var currentKey = keys ? keys[index] : index;
-      results[index] = iteratee(obj[currentKey], currentKey, obj);
-    }
-    return results;
-  };
+
function map(obj, iteratee, context) {
+  iteratee = cb(iteratee, context);
+  var _keys = !isArrayLike(obj) && keys(obj),
+      length = (_keys || obj).length,
+      results = Array(length);
+  for (var index = 0; index < length; index++) {
+    var currentKey = _keys ? _keys[index] : index;
+    results[index] = iteratee(obj[currentKey], currentKey, obj);
+  }
+  return results;
+}
@@ -513,7 +503,7 @@

Collection Functions

-
  var createReduce = function(dir) {
+
function createReduce(dir) {
@@ -529,26 +519,26 @@

Collection Functions

-
    var reducer = function(obj, iteratee, memo, initial) {
-      var keys = !isArrayLike(obj) && _.keys(obj),
-          length = (keys || obj).length,
-          index = dir > 0 ? 0 : length - 1;
-      if (!initial) {
-        memo = obj[keys ? keys[index] : index];
-        index += dir;
-      }
-      for (; index >= 0 && index < length; index += dir) {
-        var currentKey = keys ? keys[index] : index;
-        memo = iteratee(memo, obj[currentKey], currentKey, obj);
-      }
-      return memo;
-    };
+            
  var reducer = function(obj, iteratee, memo, initial) {
+    var _keys = !isArrayLike(obj) && keys(obj),
+        length = (_keys || obj).length,
+        index = dir > 0 ? 0 : length - 1;
+    if (!initial) {
+      memo = obj[_keys ? _keys[index] : index];
+      index += dir;
+    }
+    for (; index >= 0 && index < length; index += dir) {
+      var currentKey = _keys ? _keys[index] : index;
+      memo = iteratee(memo, obj[currentKey], currentKey, obj);
+    }
+    return memo;
+  };
 
-    return function(obj, iteratee, memo, context) {
-      var initial = arguments.length >= 3;
-      return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial);
-    };
-  };
+ return function(obj, iteratee, memo, context) { + var initial = arguments.length >= 3; + return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial); + }; +}
@@ -564,7 +554,7 @@

Collection Functions

-
  _.reduce = _.foldl = _.inject = createReduce(1);
+
var reduce = createReduce(1);
@@ -579,7 +569,7 @@

Collection Functions

-
  _.reduceRight = _.foldr = createReduce(-1);
+
var reduceRight = createReduce(-1);
@@ -590,15 +580,15 @@

Collection Functions

-

Return the first value which passes a truth test. Aliased as detect.

+

Return the first value which passes a truth test.

-
  _.find = _.detect = function(obj, predicate, context) {
-    var keyFinder = isArrayLike(obj) ? _.findIndex : _.findKey;
-    var key = keyFinder(obj, predicate, context);
-    if (key !== void 0 && key !== -1) return obj[key];
-  };
+
function find(obj, predicate, context) {
+  var keyFinder = isArrayLike(obj) ? findIndex : findKey;
+  var key = keyFinder(obj, predicate, context);
+  if (key !== void 0 && key !== -1) return obj[key];
+}
@@ -609,19 +599,18 @@

Collection Functions

-

Return all the elements that pass a truth test. -Aliased as select.

+

Return all the elements that pass a truth test.

-
  _.filter = _.select = function(obj, predicate, context) {
-    var results = [];
-    predicate = cb(predicate, context);
-    _.each(obj, function(value, index, list) {
-      if (predicate(value, index, list)) results.push(value);
-    });
-    return results;
-  };
+
function filter(obj, predicate, context) {
+  var results = [];
+  predicate = cb(predicate, context);
+  each(obj, function(value, index, list) {
+    if (predicate(value, index, list)) results.push(value);
+  });
+  return results;
+}
@@ -636,9 +625,9 @@

Collection Functions

-
  _.reject = function(obj, predicate, context) {
-    return _.filter(obj, _.negate(cb(predicate)), context);
-  };
+
function reject(obj, predicate, context) {
+  return filter(obj, negate(cb(predicate)), context);
+}
@@ -649,21 +638,20 @@

Collection Functions

-

Determine whether all of the elements match a truth test. -Aliased as all.

+

Determine whether all of the elements match a truth test.

-
  _.every = _.all = function(obj, predicate, context) {
-    predicate = cb(predicate, context);
-    var keys = !isArrayLike(obj) && _.keys(obj),
-        length = (keys || obj).length;
-    for (var index = 0; index < length; index++) {
-      var currentKey = keys ? keys[index] : index;
-      if (!predicate(obj[currentKey], currentKey, obj)) return false;
-    }
-    return true;
-  };
+
function every(obj, predicate, context) {
+  predicate = cb(predicate, context);
+  var _keys = !isArrayLike(obj) && keys(obj),
+      length = (_keys || obj).length;
+  for (var index = 0; index < length; index++) {
+    var currentKey = _keys ? _keys[index] : index;
+    if (!predicate(obj[currentKey], currentKey, obj)) return false;
+  }
+  return true;
+}
@@ -674,21 +662,20 @@

Collection Functions

-

Determine if at least one element in the object matches a truth test. -Aliased as any.

+

Determine if at least one element in the object matches a truth test.

-
  _.some = _.any = function(obj, predicate, context) {
-    predicate = cb(predicate, context);
-    var keys = !isArrayLike(obj) && _.keys(obj),
-        length = (keys || obj).length;
-    for (var index = 0; index < length; index++) {
-      var currentKey = keys ? keys[index] : index;
-      if (predicate(obj[currentKey], currentKey, obj)) return true;
-    }
-    return false;
-  };
+
function some(obj, predicate, context) {
+  predicate = cb(predicate, context);
+  var _keys = !isArrayLike(obj) && keys(obj),
+      length = (_keys || obj).length;
+  for (var index = 0; index < length; index++) {
+    var currentKey = _keys ? _keys[index] : index;
+    if (predicate(obj[currentKey], currentKey, obj)) return true;
+  }
+  return false;
+}
@@ -699,16 +686,15 @@

Collection Functions

-

Determine if the array or object contains a given item (using ===). -Aliased as includes and include.

+

Determine if the array or object contains a given item (using ===).

-
  _.contains = _.includes = _.include = function(obj, item, fromIndex, guard) {
-    if (!isArrayLike(obj)) obj = _.values(obj);
-    if (typeof fromIndex != 'number' || guard) fromIndex = 0;
-    return _.indexOf(obj, item, fromIndex) >= 0;
-  };
+
function contains(obj, item, fromIndex, guard) {
+  if (!isArrayLike(obj)) obj = values(obj);
+  if (typeof fromIndex != 'number' || guard) fromIndex = 0;
+  return indexOf(obj, item, fromIndex) >= 0;
+}
@@ -723,26 +709,26 @@

Collection Functions

-
  _.invoke = restArguments(function(obj, path, args) {
-    var contextPath, func;
-    if (_.isFunction(path)) {
-      func = path;
-    } else if (_.isArray(path)) {
-      contextPath = path.slice(0, -1);
-      path = path[path.length - 1];
-    }
-    return _.map(obj, function(context) {
-      var method = func;
-      if (!method) {
-        if (contextPath && contextPath.length) {
-          context = deepGet(context, contextPath);
-        }
-        if (context == null) return void 0;
-        method = context[path];
+            
var invoke = restArguments(function(obj, path, args) {
+  var contextPath, func;
+  if (isFunction(path)) {
+    func = path;
+  } else if (isArray(path)) {
+    contextPath = path.slice(0, -1);
+    path = path[path.length - 1];
+  }
+  return map(obj, function(context) {
+    var method = func;
+    if (!method) {
+      if (contextPath && contextPath.length) {
+        context = deepGet(context, contextPath);
       }
-      return method == null ? method : method.apply(context, args);
-    });
-  });
+ if (context == null) return void 0; + method = context[path]; + } + return method == null ? method : method.apply(context, args); + }); +});
@@ -757,9 +743,9 @@

Collection Functions

-
  _.pluck = function(obj, key) {
-    return _.map(obj, _.property(key));
-  };
+
function pluck(obj, key) {
+  return map(obj, property(key));
+}
@@ -775,9 +761,9 @@

Collection Functions

-
  _.where = function(obj, attrs) {
-    return _.filter(obj, _.matcher(attrs));
-  };
+
function where(obj, attrs) {
+  return filter(obj, matcher(attrs));
+}
@@ -793,9 +779,9 @@

Collection Functions

-
  _.findWhere = function(obj, attrs) {
-    return _.find(obj, _.matcher(attrs));
-  };
+
function findWhere(obj, attrs) {
+  return find(obj, matcher(attrs));
+}
@@ -810,29 +796,29 @@

Collection Functions

-
  _.max = function(obj, iteratee, context) {
-    var result = -Infinity, lastComputed = -Infinity,
-        value, computed;
-    if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {
-      obj = isArrayLike(obj) ? obj : _.values(obj);
-      for (var i = 0, length = obj.length; i < length; i++) {
-        value = obj[i];
-        if (value != null && value > result) {
-          result = value;
-        }
+            
function max(obj, iteratee, context) {
+  var result = -Infinity, lastComputed = -Infinity,
+      value, computed;
+  if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {
+    obj = isArrayLike(obj) ? obj : values(obj);
+    for (var i = 0, length = obj.length; i < length; i++) {
+      value = obj[i];
+      if (value != null && value > result) {
+        result = value;
       }
-    } else {
-      iteratee = cb(iteratee, context);
-      _.each(obj, function(v, index, list) {
-        computed = iteratee(v, index, list);
-        if (computed > lastComputed || computed === -Infinity && result === -Infinity) {
-          result = v;
-          lastComputed = computed;
-        }
-      });
     }
-    return result;
-  };
+ } else { + iteratee = cb(iteratee, context); + each(obj, function(v, index, list) { + computed = iteratee(v, index, list); + if (computed > lastComputed || computed === -Infinity && result === -Infinity) { + result = v; + lastComputed = computed; + } + }); + } + return result; +}
@@ -847,29 +833,29 @@

Collection Functions

-
  _.min = function(obj, iteratee, context) {
-    var result = Infinity, lastComputed = Infinity,
-        value, computed;
-    if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {
-      obj = isArrayLike(obj) ? obj : _.values(obj);
-      for (var i = 0, length = obj.length; i < length; i++) {
-        value = obj[i];
-        if (value != null && value < result) {
-          result = value;
-        }
+            
function min(obj, iteratee, context) {
+  var result = Infinity, lastComputed = Infinity,
+      value, computed;
+  if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {
+    obj = isArrayLike(obj) ? obj : values(obj);
+    for (var i = 0, length = obj.length; i < length; i++) {
+      value = obj[i];
+      if (value != null && value < result) {
+        result = value;
       }
-    } else {
-      iteratee = cb(iteratee, context);
-      _.each(obj, function(v, index, list) {
-        computed = iteratee(v, index, list);
-        if (computed < lastComputed || computed === Infinity && result === Infinity) {
-          result = v;
-          lastComputed = computed;
-        }
-      });
     }
-    return result;
-  };
+ } else { + iteratee = cb(iteratee, context); + each(obj, function(v, index, list) { + computed = iteratee(v, index, list); + if (computed < lastComputed || computed === Infinity && result === Infinity) { + result = v; + lastComputed = computed; + } + }); + } + return result; +}
@@ -884,9 +870,9 @@

Collection Functions

-
  _.shuffle = function(obj) {
-    return _.sample(obj, Infinity);
-  };
+
function shuffle(obj) {
+  return sample(obj, Infinity);
+}
@@ -904,23 +890,23 @@

Collection Functions

-
  _.sample = function(obj, n, guard) {
-    if (n == null || guard) {
-      if (!isArrayLike(obj)) obj = _.values(obj);
-      return obj[_.random(obj.length - 1)];
-    }
-    var sample = isArrayLike(obj) ? _.clone(obj) : _.values(obj);
-    var length = getLength(sample);
-    n = Math.max(Math.min(n, length), 0);
-    var last = length - 1;
-    for (var index = 0; index < n; index++) {
-      var rand = _.random(index, last);
-      var temp = sample[index];
-      sample[index] = sample[rand];
-      sample[rand] = temp;
-    }
-    return sample.slice(0, n);
-  };
+
function sample(obj, n, guard) {
+  if (n == null || guard) {
+    if (!isArrayLike(obj)) obj = values(obj);
+    return obj[random(obj.length - 1)];
+  }
+  var sample = isArrayLike(obj) ? clone(obj) : values(obj);
+  var length = getLength(sample);
+  n = Math.max(Math.min(n, length), 0);
+  var last = length - 1;
+  for (var index = 0; index < n; index++) {
+    var rand = random(index, last);
+    var temp = sample[index];
+    sample[index] = sample[rand];
+    sample[rand] = temp;
+  }
+  return sample.slice(0, n);
+}
@@ -935,25 +921,25 @@

Collection Functions

-
  _.sortBy = function(obj, iteratee, context) {
-    var index = 0;
-    iteratee = cb(iteratee, context);
-    return _.pluck(_.map(obj, function(value, key, list) {
-      return {
-        value: value,
-        index: index++,
-        criteria: iteratee(value, key, list)
-      };
-    }).sort(function(left, right) {
-      var a = left.criteria;
-      var b = right.criteria;
-      if (a !== b) {
-        if (a > b || a === void 0) return 1;
-        if (a < b || b === void 0) return -1;
-      }
-      return left.index - right.index;
-    }), 'value');
-  };
+
function sortBy(obj, iteratee, context) {
+  var index = 0;
+  iteratee = cb(iteratee, context);
+  return pluck(map(obj, function(value, key, list) {
+    return {
+      value: value,
+      index: index++,
+      criteria: iteratee(value, key, list)
+    };
+  }).sort(function(left, right) {
+    var a = left.criteria;
+    var b = right.criteria;
+    if (a !== b) {
+      if (a > b || a === void 0) return 1;
+      if (a < b || b === void 0) return -1;
+    }
+    return left.index - right.index;
+  }), 'value');
+}
@@ -968,17 +954,17 @@

Collection Functions

-
  var group = function(behavior, partition) {
-    return function(obj, iteratee, context) {
-      var result = partition ? [[], []] : {};
-      iteratee = cb(iteratee, context);
-      _.each(obj, function(value, index) {
-        var key = iteratee(value, index, obj);
-        behavior(result, value, key);
-      });
-      return result;
-    };
-  };
+
function group(behavior, partition) {
+  return function(obj, iteratee, context) {
+    var result = partition ? [[], []] : {};
+    iteratee = cb(iteratee, context);
+    each(obj, function(value, index) {
+      var key = iteratee(value, index, obj);
+      behavior(result, value, key);
+    });
+    return result;
+  };
+}
@@ -994,9 +980,9 @@

Collection Functions

-
  _.groupBy = group(function(result, value, key) {
-    if (has(result, key)) result[key].push(value); else result[key] = [value];
-  });
+
var groupBy = group(function(result, value, key) {
+  if (_has(result, key)) result[key].push(value); else result[key] = [value];
+});
@@ -1012,9 +998,9 @@

Collection Functions

-
  _.indexBy = group(function(result, value, key) {
-    result[key] = value;
-  });
+
var indexBy = group(function(result, value, key) {
+  result[key] = value;
+});
@@ -1031,11 +1017,11 @@

Collection Functions

-
  _.countBy = group(function(result, value, key) {
-    if (has(result, key)) result[key]++; else result[key] = 1;
-  });
+            
var countBy = group(function(result, value, key) {
+  if (_has(result, key)) result[key]++; else result[key] = 1;
+});
 
-  var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;
+var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;
@@ -1050,10 +1036,10 @@

Collection Functions

-
  _.toArray = function(obj) {
-    if (!obj) return [];
-    if (_.isArray(obj)) return slice.call(obj);
-    if (_.isString(obj)) {
+
function toArray(obj) {
+  if (!obj) return [];
+  if (isArray(obj)) return slice.call(obj);
+  if (isString(obj)) {
@@ -1068,11 +1054,11 @@

Collection Functions

-
      return obj.match(reStrSymbol);
-    }
-    if (isArrayLike(obj)) return _.map(obj, _.identity);
-    return _.values(obj);
-  };
+
    return obj.match(reStrSymbol);
+  }
+  if (isArrayLike(obj)) return map(obj, identity);
+  return values(obj);
+}
@@ -1087,10 +1073,10 @@

Collection Functions

-
  _.size = function(obj) {
-    if (obj == null) return 0;
-    return isArrayLike(obj) ? obj.length : _.keys(obj).length;
-  };
+
function size(obj) {
+  if (obj == null) return 0;
+  return isArrayLike(obj) ? obj.length : keys(obj).length;
+}
@@ -1106,9 +1092,9 @@

Collection Functions

-
  _.partition = group(function(result, value, pass) {
-    result[pass ? 0 : 1].push(value);
-  }, true);
+
var partition = group(function(result, value, pass) {
+  result[pass ? 0 : 1].push(value);
+}, true);
@@ -1145,16 +1131,15 @@

Array Functions

Get the first element of an array. Passing n will return the first N -values in the array. Aliased as head and take. The guard check -allows it to work with _.map.

+values in the array. The guard check allows it to work with map.

-
  _.first = _.head = _.take = function(array, n, guard) {
-    if (array == null || array.length < 1) return n == null ? void 0 : [];
-    if (n == null || guard) return array[0];
-    return _.initial(array, array.length - n);
-  };
+
function first(array, n, guard) {
+  if (array == null || array.length < 1) return n == null ? void 0 : [];
+  if (n == null || guard) return array[0];
+  return initial(array, array.length - n);
+}
@@ -1171,9 +1156,9 @@

Array Functions

-
  _.initial = function(array, n, guard) {
-    return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));
-  };
+
function initial(array, n, guard) {
+  return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));
+}
@@ -1189,11 +1174,11 @@

Array Functions

-
  _.last = function(array, n, guard) {
-    if (array == null || array.length < 1) return n == null ? void 0 : [];
-    if (n == null || guard) return array[array.length - 1];
-    return _.rest(array, Math.max(0, array.length - n));
-  };
+
function last(array, n, guard) {
+  if (array == null || array.length < 1) return n == null ? void 0 : [];
+  if (n == null || guard) return array[array.length - 1];
+  return rest(array, Math.max(0, array.length - n));
+}
@@ -1204,15 +1189,15 @@

Array Functions

-

Returns everything but the first entry of the array. Aliased as tail and drop. -Especially useful on the arguments object. Passing an n will return -the rest N values in the array.

+

Returns everything but the first entry of the array. Especially useful on +the arguments object. Passing an n will return the rest N values in the +array.

-
  _.rest = _.tail = _.drop = function(array, n, guard) {
-    return slice.call(array, n == null || guard ? 1 : n);
-  };
+
function rest(array, n, guard) {
+  return slice.call(array, n == null || guard ? 1 : n);
+}
@@ -1227,9 +1212,9 @@

Array Functions

-
  _.compact = function(array) {
-    return _.filter(array, Boolean);
-  };
+
function compact(array) {
+  return filter(array, Boolean);
+}
@@ -1244,12 +1229,12 @@

Array Functions

-
  var flatten = function(input, shallow, strict, output) {
-    output = output || [];
-    var idx = output.length;
-    for (var i = 0, length = getLength(input); i < length; i++) {
-      var value = input[i];
-      if (isArrayLike(value) && (_.isArray(value) || _.isArguments(value))) {
+
function _flatten(input, shallow, strict, output) {
+  output = output || [];
+  var idx = output.length;
+  for (var i = 0, length = getLength(input); i < length; i++) {
+    var value = input[i];
+    if (isArrayLike(value) && (isArray(value) || isArguments(value))) {
@@ -1264,19 +1249,19 @@

Array Functions

-
        if (shallow) {
-          var j = 0, len = value.length;
-          while (j < len) output[idx++] = value[j++];
-        } else {
-          flatten(value, shallow, strict, output);
-          idx = output.length;
-        }
-      } else if (!strict) {
-        output[idx++] = value;
+            
      if (shallow) {
+        var j = 0, len = value.length;
+        while (j < len) output[idx++] = value[j++];
+      } else {
+        _flatten(value, shallow, strict, output);
+        idx = output.length;
       }
+    } else if (!strict) {
+      output[idx++] = value;
     }
-    return output;
-  };
+ } + return output; +}
@@ -1291,9 +1276,9 @@

Array Functions

-
  _.flatten = function(array, shallow) {
-    return flatten(array, shallow, false);
-  };
+
function flatten(array, shallow) {
+  return _flatten(array, shallow, false);
+}
@@ -1308,9 +1293,9 @@

Array Functions

-
  _.without = restArguments(function(array, otherArrays) {
-    return _.difference(array, otherArrays);
-  });
+
var without = restArguments(function(array, otherArrays) {
+  return difference(array, otherArrays);
+});
@@ -1325,37 +1310,36 @@

Array Functions

been sorted, you have the option of using a faster algorithm. The faster algorithm will not work with an iteratee if the iteratee is not a one-to-one function, so providing an iteratee will disable -the faster algorithm. -Aliased as unique.

+the faster algorithm.

-
  _.uniq = _.unique = function(array, isSorted, iteratee, context) {
-    if (!_.isBoolean(isSorted)) {
-      context = iteratee;
-      iteratee = isSorted;
-      isSorted = false;
-    }
-    if (iteratee != null) iteratee = cb(iteratee, context);
-    var result = [];
-    var seen = [];
-    for (var i = 0, length = getLength(array); i < length; i++) {
-      var value = array[i],
-          computed = iteratee ? iteratee(value, i, array) : value;
-      if (isSorted && !iteratee) {
-        if (!i || seen !== computed) result.push(value);
-        seen = computed;
-      } else if (iteratee) {
-        if (!_.contains(seen, computed)) {
-          seen.push(computed);
-          result.push(value);
-        }
-      } else if (!_.contains(result, value)) {
+            
function uniq(array, isSorted, iteratee, context) {
+  if (!isBoolean(isSorted)) {
+    context = iteratee;
+    iteratee = isSorted;
+    isSorted = false;
+  }
+  if (iteratee != null) iteratee = cb(iteratee, context);
+  var result = [];
+  var seen = [];
+  for (var i = 0, length = getLength(array); i < length; i++) {
+    var value = array[i],
+        computed = iteratee ? iteratee(value, i, array) : value;
+    if (isSorted && !iteratee) {
+      if (!i || seen !== computed) result.push(value);
+      seen = computed;
+    } else if (iteratee) {
+      if (!contains(seen, computed)) {
+        seen.push(computed);
         result.push(value);
       }
+    } else if (!contains(result, value)) {
+      result.push(value);
     }
-    return result;
-  };
+ } + return result; +}
@@ -1371,9 +1355,9 @@

Array Functions

-
  _.union = restArguments(function(arrays) {
-    return _.uniq(flatten(arrays, true, true));
-  });
+
var union = restArguments(function(arrays) {
+  return uniq(_flatten(arrays, true, true));
+});
@@ -1389,20 +1373,20 @@

Array Functions

-
  _.intersection = function(array) {
-    var result = [];
-    var argsLength = arguments.length;
-    for (var i = 0, length = getLength(array); i < length; i++) {
-      var item = array[i];
-      if (_.contains(result, item)) continue;
-      var j;
-      for (j = 1; j < argsLength; j++) {
-        if (!_.contains(arguments[j], item)) break;
-      }
-      if (j === argsLength) result.push(item);
+            
function intersection(array) {
+  var result = [];
+  var argsLength = arguments.length;
+  for (var i = 0, length = getLength(array); i < length; i++) {
+    var item = array[i];
+    if (contains(result, item)) continue;
+    var j;
+    for (j = 1; j < argsLength; j++) {
+      if (!contains(arguments[j], item)) break;
     }
-    return result;
-  };
+ if (j === argsLength) result.push(item); + } + return result; +}
@@ -1418,12 +1402,12 @@

Array Functions

-
  _.difference = restArguments(function(array, rest) {
-    rest = flatten(rest, true, true);
-    return _.filter(array, function(value){
-      return !_.contains(rest, value);
-    });
-  });
+
var difference = restArguments(function(array, rest) {
+  rest = _flatten(rest, true, true);
+  return filter(array, function(value){
+    return !contains(rest, value);
+  });
+});
@@ -1434,20 +1418,20 @@

Array Functions

-

Complement of _.zip. Unzip accepts an array of arrays and groups +

Complement of zip. Unzip accepts an array of arrays and groups each array’s elements on shared indices.

-
  _.unzip = function(array) {
-    var length = array && _.max(array, getLength).length || 0;
-    var result = Array(length);
+            
function unzip(array) {
+  var length = array && max(array, getLength).length || 0;
+  var result = Array(length);
 
-    for (var index = 0; index < length; index++) {
-      result[index] = _.pluck(array, index);
-    }
-    return result;
-  };
+ for (var index = 0; index < length; index++) { + result[index] = pluck(array, index); + } + return result; +}
@@ -1463,7 +1447,7 @@

Array Functions

-
  _.zip = restArguments(_.unzip);
+
var zip = restArguments(unzip);
@@ -1476,21 +1460,21 @@

Array Functions

Converts lists into objects. Pass either a single array of [key, value] pairs, or two parallel arrays of the same length – one of keys, and one of -the corresponding values. Passing by pairs is the reverse of _.pairs.

+the corresponding values. Passing by pairs is the reverse of pairs.

-
  _.object = function(list, values) {
-    var result = {};
-    for (var i = 0, length = getLength(list); i < length; i++) {
-      if (values) {
-        result[list[i]] = values[i];
-      } else {
-        result[list[i][0]] = list[i][1];
-      }
+            
function object(list, values) {
+  var result = {};
+  for (var i = 0, length = getLength(list); i < length; i++) {
+    if (values) {
+      result[list[i]] = values[i];
+    } else {
+      result[list[i][0]] = list[i][1];
     }
-    return result;
-  };
+ } + return result; +}
@@ -1505,17 +1489,17 @@

Array Functions

-
  var createPredicateIndexFinder = function(dir) {
-    return function(array, predicate, context) {
-      predicate = cb(predicate, context);
-      var length = getLength(array);
-      var index = dir > 0 ? 0 : length - 1;
-      for (; index >= 0 && index < length; index += dir) {
-        if (predicate(array[index], index, array)) return index;
-      }
-      return -1;
-    };
-  };
+
function createPredicateIndexFinder(dir) {
+  return function(array, predicate, context) {
+    predicate = cb(predicate, context);
+    var length = getLength(array);
+    var index = dir > 0 ? 0 : length - 1;
+    for (; index >= 0 && index < length; index += dir) {
+      if (predicate(array[index], index, array)) return index;
+    }
+    return -1;
+  };
+}
@@ -1530,8 +1514,8 @@

Array Functions

-
  _.findIndex = createPredicateIndexFinder(1);
-  _.findLastIndex = createPredicateIndexFinder(-1);
+
var findIndex = createPredicateIndexFinder(1);
+var findLastIndex = createPredicateIndexFinder(-1);
@@ -1547,16 +1531,16 @@

Array Functions

-
  _.sortedIndex = function(array, obj, iteratee, context) {
-    iteratee = cb(iteratee, context, 1);
-    var value = iteratee(obj);
-    var low = 0, high = getLength(array);
-    while (low < high) {
-      var mid = Math.floor((low + high) / 2);
-      if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;
-    }
-    return low;
-  };
+
function sortedIndex(array, obj, iteratee, context) {
+  iteratee = cb(iteratee, context, 1);
+  var value = iteratee(obj);
+  var low = 0, high = getLength(array);
+  while (low < high) {
+    var mid = Math.floor((low + high) / 2);
+    if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;
+  }
+  return low;
+}
@@ -1571,29 +1555,29 @@

Array Functions

-
  var createIndexFinder = function(dir, predicateFind, sortedIndex) {
-    return function(array, item, idx) {
-      var i = 0, length = getLength(array);
-      if (typeof idx == 'number') {
-        if (dir > 0) {
-          i = idx >= 0 ? idx : Math.max(idx + length, i);
-        } else {
-          length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;
-        }
-      } else if (sortedIndex && idx && length) {
-        idx = sortedIndex(array, item);
-        return array[idx] === item ? idx : -1;
-      }
-      if (item !== item) {
-        idx = predicateFind(slice.call(array, i, length), _.isNaN);
-        return idx >= 0 ? idx + i : -1;
-      }
-      for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {
-        if (array[idx] === item) return idx;
+            
function createIndexFinder(dir, predicateFind, sortedIndex) {
+  return function(array, item, idx) {
+    var i = 0, length = getLength(array);
+    if (typeof idx == 'number') {
+      if (dir > 0) {
+        i = idx >= 0 ? idx : Math.max(idx + length, i);
+      } else {
+        length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;
       }
-      return -1;
-    };
-  };
+ } else if (sortedIndex && idx && length) { + idx = sortedIndex(array, item); + return array[idx] === item ? idx : -1; + } + if (item !== item) { + idx = predicateFind(slice.call(array, i, length), isNaN); + return idx >= 0 ? idx + i : -1; + } + for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) { + if (array[idx] === item) return idx; + } + return -1; + }; +}
@@ -1611,8 +1595,8 @@

Array Functions

-
  _.indexOf = createIndexFinder(1, _.findIndex, _.sortedIndex);
-  _.lastIndexOf = createIndexFinder(-1, _.findLastIndex);
+
var indexOf = createIndexFinder(1, findIndex, sortedIndex);
+var lastIndexOf = createIndexFinder(-1, findLastIndex);
@@ -1629,24 +1613,24 @@

Array Functions

-
  _.range = function(start, stop, step) {
-    if (stop == null) {
-      stop = start || 0;
-      start = 0;
-    }
-    if (!step) {
-      step = stop < start ? -1 : 1;
-    }
+            
function range(start, stop, step) {
+  if (stop == null) {
+    stop = start || 0;
+    start = 0;
+  }
+  if (!step) {
+    step = stop < start ? -1 : 1;
+  }
 
-    var length = Math.max(Math.ceil((stop - start) / step), 0);
-    var range = Array(length);
+  var length = Math.max(Math.ceil((stop - start) / step), 0);
+  var range = Array(length);
 
-    for (var idx = 0; idx < length; idx++, start += step) {
-      range[idx] = start;
-    }
+  for (var idx = 0; idx < length; idx++, start += step) {
+    range[idx] = start;
+  }
 
-    return range;
-  };
+ return range; +}
@@ -1662,15 +1646,15 @@

Array Functions

-
  _.chunk = function(array, count) {
-    if (count == null || count < 1) return [];
-    var result = [];
-    var i = 0, length = array.length;
-    while (i < length) {
-      result.push(slice.call(array, i, i += count));
-    }
-    return result;
-  };
+
function chunk(array, count) {
+  if (count == null || count < 1) return [];
+  var result = [];
+  var i = 0, length = array.length;
+  while (i < length) {
+    result.push(slice.call(array, i, i += count));
+  }
+  return result;
+}
@@ -1711,13 +1695,13 @@

Function (ahem) Functions

-
  var executeBound = function(sourceFunc, boundFunc, context, callingContext, args) {
-    if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);
-    var self = baseCreate(sourceFunc.prototype);
-    var result = sourceFunc.apply(self, args);
-    if (_.isObject(result)) return result;
-    return self;
-  };
+
function executeBound(sourceFunc, boundFunc, context, callingContext, args) {
+  if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);
+  var self = baseCreate(sourceFunc.prototype);
+  var result = sourceFunc.apply(self, args);
+  if (isObject(result)) return result;
+  return self;
+}
@@ -1734,13 +1718,13 @@

Function (ahem) Functions

-
  _.bind = restArguments(function(func, context, args) {
-    if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function');
-    var bound = restArguments(function(callArgs) {
-      return executeBound(func, bound, context, this, args.concat(callArgs));
-    });
-    return bound;
-  });
+
var bind = restArguments(function(func, context, args) {
+  if (!isFunction(func)) throw new TypeError('Bind must be called on a function');
+  var bound = restArguments(function(callArgs) {
+    return executeBound(func, bound, context, this, args.concat(callArgs));
+  });
+  return bound;
+});
@@ -1754,25 +1738,25 @@

Function (ahem) Functions

Partially apply a function by creating a version that has had some of its arguments pre-filled, without changing its dynamic this context. _ acts as a placeholder by default, allowing any combination of arguments to be -pre-filled. Set _.partial.placeholder for a custom placeholder argument.

+pre-filled. Set partial.placeholder for a custom placeholder argument.

-
  _.partial = restArguments(function(func, boundArgs) {
-    var placeholder = _.partial.placeholder;
-    var bound = function() {
-      var position = 0, length = boundArgs.length;
-      var args = Array(length);
-      for (var i = 0; i < length; i++) {
-        args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];
-      }
-      while (position < arguments.length) args.push(arguments[position++]);
-      return executeBound(func, bound, this, this, args);
-    };
-    return bound;
-  });
+            
var partial = restArguments(function(func, boundArgs) {
+  var placeholder = partial.placeholder;
+  var bound = function() {
+    var position = 0, length = boundArgs.length;
+    var args = Array(length);
+    for (var i = 0; i < length; i++) {
+      args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];
+    }
+    while (position < arguments.length) args.push(arguments[position++]);
+    return executeBound(func, bound, this, this, args);
+  };
+  return bound;
+});
 
-  _.partial.placeholder = _;
+partial.placeholder = _;
@@ -1789,15 +1773,15 @@

Function (ahem) Functions

-
  _.bindAll = restArguments(function(obj, keys) {
-    keys = flatten(keys, false, false);
-    var index = keys.length;
-    if (index < 1) throw new Error('bindAll must be passed function names');
-    while (index--) {
-      var key = keys[index];
-      obj[key] = _.bind(obj[key], obj);
-    }
-  });
+
var bindAll = restArguments(function(obj, _keys) {
+  _keys = _flatten(_keys, false, false);
+  var index = _keys.length;
+  if (index < 1) throw new Error('bindAll must be passed function names');
+  while (index--) {
+    var key = _keys[index];
+    obj[key] = bind(obj[key], obj);
+  }
+});
@@ -1812,16 +1796,16 @@

Function (ahem) Functions

-
  _.memoize = function(func, hasher) {
-    var memoize = function(key) {
-      var cache = memoize.cache;
-      var address = '' + (hasher ? hasher.apply(this, arguments) : key);
-      if (!has(cache, address)) cache[address] = func.apply(this, arguments);
-      return cache[address];
-    };
-    memoize.cache = {};
-    return memoize;
-  };
+
function memoize(func, hasher) {
+  var memoize = function(key) {
+    var cache = memoize.cache;
+    var address = '' + (hasher ? hasher.apply(this, arguments) : key);
+    if (!_has(cache, address)) cache[address] = func.apply(this, arguments);
+    return cache[address];
+  };
+  memoize.cache = {};
+  return memoize;
+}
@@ -1837,11 +1821,11 @@

Function (ahem) Functions

-
  _.delay = restArguments(function(func, wait, args) {
-    return setTimeout(function() {
-      return func.apply(null, args);
-    }, wait);
-  });
+
var delay = restArguments(function(func, wait, args) {
+  return setTimeout(function() {
+    return func.apply(null, args);
+  }, wait);
+});
@@ -1857,7 +1841,7 @@

Function (ahem) Functions

-
  _.defer = _.partial(_.delay, _, 1);
+
var defer = partial(delay, _, 1);
@@ -1876,46 +1860,46 @@

Function (ahem) Functions

-
  _.throttle = function(func, wait, options) {
-    var timeout, context, args, result;
-    var previous = 0;
-    if (!options) options = {};
+            
function throttle(func, wait, options) {
+  var timeout, context, args, result;
+  var previous = 0;
+  if (!options) options = {};
 
-    var later = function() {
-      previous = options.leading === false ? 0 : _.now();
-      timeout = null;
-      result = func.apply(context, args);
-      if (!timeout) context = args = null;
-    };
+  var later = function() {
+    previous = options.leading === false ? 0 : now();
+    timeout = null;
+    result = func.apply(context, args);
+    if (!timeout) context = args = null;
+  };
 
-    var throttled = function() {
-      var now = _.now();
-      if (!previous && options.leading === false) previous = now;
-      var remaining = wait - (now - previous);
-      context = this;
-      args = arguments;
-      if (remaining <= 0 || remaining > wait) {
-        if (timeout) {
-          clearTimeout(timeout);
-          timeout = null;
-        }
-        previous = now;
-        result = func.apply(context, args);
-        if (!timeout) context = args = null;
-      } else if (!timeout && options.trailing !== false) {
-        timeout = setTimeout(later, remaining);
+  var throttled = function() {
+    var _now = now();
+    if (!previous && options.leading === false) previous = _now;
+    var remaining = wait - (_now - previous);
+    context = this;
+    args = arguments;
+    if (remaining <= 0 || remaining > wait) {
+      if (timeout) {
+        clearTimeout(timeout);
+        timeout = null;
       }
-      return result;
-    };
+      previous = _now;
+      result = func.apply(context, args);
+      if (!timeout) context = args = null;
+    } else if (!timeout && options.trailing !== false) {
+      timeout = setTimeout(later, remaining);
+    }
+    return result;
+  };
 
-    throttled.cancel = function() {
-      clearTimeout(timeout);
-      previous = 0;
-      timeout = context = args = null;
-    };
+  throttled.cancel = function() {
+    clearTimeout(timeout);
+    previous = 0;
+    timeout = context = args = null;
+  };
 
-    return throttled;
-  };
+ return throttled; +}
@@ -1933,34 +1917,34 @@

Function (ahem) Functions

-
  _.debounce = function(func, wait, immediate) {
-    var timeout, result;
+            
function debounce(func, wait, immediate) {
+  var timeout, result;
 
-    var later = function(context, args) {
-      timeout = null;
-      if (args) result = func.apply(context, args);
-    };
+  var later = function(context, args) {
+    timeout = null;
+    if (args) result = func.apply(context, args);
+  };
 
-    var debounced = restArguments(function(args) {
-      if (timeout) clearTimeout(timeout);
-      if (immediate) {
-        var callNow = !timeout;
-        timeout = setTimeout(later, wait);
-        if (callNow) result = func.apply(this, args);
-      } else {
-        timeout = _.delay(later, wait, this, args);
-      }
+  var debounced = restArguments(function(args) {
+    if (timeout) clearTimeout(timeout);
+    if (immediate) {
+      var callNow = !timeout;
+      timeout = setTimeout(later, wait);
+      if (callNow) result = func.apply(this, args);
+    } else {
+      timeout = delay(later, wait, this, args);
+    }
 
-      return result;
-    });
+    return result;
+  });
 
-    debounced.cancel = function() {
-      clearTimeout(timeout);
-      timeout = null;
-    };
+  debounced.cancel = function() {
+    clearTimeout(timeout);
+    timeout = null;
+  };
 
-    return debounced;
-  };
+ return debounced; +}
@@ -1977,9 +1961,9 @@

Function (ahem) Functions

-
  _.wrap = function(func, wrapper) {
-    return _.partial(wrapper, func);
-  };
+
function wrap(func, wrapper) {
+  return partial(wrapper, func);
+}
@@ -1994,11 +1978,11 @@

Function (ahem) Functions

-
  _.negate = function(predicate) {
-    return function() {
-      return !predicate.apply(this, arguments);
-    };
-  };
+
function negate(predicate) {
+  return function() {
+    return !predicate.apply(this, arguments);
+  };
+}
@@ -2014,16 +1998,16 @@

Function (ahem) Functions

-
  _.compose = function() {
-    var args = arguments;
-    var start = args.length - 1;
-    return function() {
-      var i = start;
-      var result = args[start].apply(this, arguments);
-      while (i--) result = args[i].call(this, result);
-      return result;
-    };
-  };
+
function compose() {
+  var args = arguments;
+  var start = args.length - 1;
+  return function() {
+    var i = start;
+    var result = args[start].apply(this, arguments);
+    while (i--) result = args[i].call(this, result);
+    return result;
+  };
+}
@@ -2038,13 +2022,13 @@

Function (ahem) Functions

-
  _.after = function(times, func) {
-    return function() {
-      if (--times < 1) {
-        return func.apply(this, arguments);
-      }
-    };
-  };
+
function after(times, func) {
+  return function() {
+    if (--times < 1) {
+      return func.apply(this, arguments);
+    }
+  };
+}
@@ -2059,16 +2043,16 @@

Function (ahem) Functions

-
  _.before = function(times, func) {
-    var memo;
-    return function() {
-      if (--times > 0) {
-        memo = func.apply(this, arguments);
-      }
-      if (times <= 1) func = null;
-      return memo;
-    };
-  };
+
function before(times, func) {
+  var memo;
+  return function() {
+    if (--times > 0) {
+      memo = func.apply(this, arguments);
+    }
+    if (times <= 1) func = null;
+    return memo;
+  };
+}
@@ -2084,9 +2068,7 @@

Function (ahem) Functions

-
  _.once = _.partial(_.before, 2);
-
-  _.restArguments = restArguments;
+
var once = partial(before, 2);
@@ -2126,14 +2108,14 @@

Object Functions

-
  var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');
-  var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',
-    'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];
+            
var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');
+var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',
+  'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];
 
-  var collectNonEnumProps = function(obj, keys) {
-    var nonEnumIdx = nonEnumerableProps.length;
-    var constructor = obj.constructor;
-    var proto = _.isFunction(constructor) && constructor.prototype || ObjProto;
+function collectNonEnumProps(obj, _keys) { + var nonEnumIdx = nonEnumerableProps.length; + var constructor = obj.constructor; + var proto = isFunction(constructor) && constructor.prototype || ObjProto;
@@ -2148,16 +2130,16 @@

Object Functions

-
    var prop = 'constructor';
-    if (has(obj, prop) && !_.contains(keys, prop)) keys.push(prop);
+            
  var prop = 'constructor';
+  if (_has(obj, prop) && !contains(_keys, prop)) _keys.push(prop);
 
-    while (nonEnumIdx--) {
-      prop = nonEnumerableProps[nonEnumIdx];
-      if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) {
-        keys.push(prop);
-      }
+  while (nonEnumIdx--) {
+    prop = nonEnumerableProps[nonEnumIdx];
+    if (prop in obj && obj[prop] !== proto[prop] && !contains(_keys, prop)) {
+      _keys.push(prop);
     }
-  };
+ } +}
@@ -2173,11 +2155,11 @@

Object Functions

-
  _.keys = function(obj) {
-    if (!_.isObject(obj)) return [];
-    if (nativeKeys) return nativeKeys(obj);
-    var keys = [];
-    for (var key in obj) if (has(obj, key)) keys.push(key);
+
function keys(obj) {
+  if (!isObject(obj)) return [];
+  if (nativeKeys) return nativeKeys(obj);
+  var _keys = [];
+  for (var key in obj) if (_has(obj, key)) _keys.push(key);
@@ -2192,9 +2174,9 @@

Object Functions

-
    if (hasEnumBug) collectNonEnumProps(obj, keys);
-    return keys;
-  };
+
  if (hasEnumBug) collectNonEnumProps(obj, _keys);
+  return _keys;
+}
@@ -2209,10 +2191,10 @@

Object Functions

-
  _.allKeys = function(obj) {
-    if (!_.isObject(obj)) return [];
-    var keys = [];
-    for (var key in obj) keys.push(key);
+
function allKeys(obj) {
+  if (!isObject(obj)) return [];
+  var _keys = [];
+  for (var key in obj) _keys.push(key);
@@ -2227,9 +2209,9 @@

Object Functions

-
    if (hasEnumBug) collectNonEnumProps(obj, keys);
-    return keys;
-  };
+
  if (hasEnumBug) collectNonEnumProps(obj, _keys);
+  return _keys;
+}
@@ -2244,15 +2226,15 @@

Object Functions

-
  _.values = function(obj) {
-    var keys = _.keys(obj);
-    var length = keys.length;
-    var values = Array(length);
-    for (var i = 0; i < length; i++) {
-      values[i] = obj[keys[i]];
-    }
-    return values;
-  };
+
function values(obj) {
+  var _keys = keys(obj);
+  var length = _keys.length;
+  var values = Array(length);
+  for (var i = 0; i < length; i++) {
+    values[i] = obj[_keys[i]];
+  }
+  return values;
+}
@@ -2264,21 +2246,21 @@

Object Functions

Returns the results of applying the iteratee to each element of the object. -In contrast to _.map it returns an object.

+In contrast to map it returns an object.

-
  _.mapObject = function(obj, iteratee, context) {
-    iteratee = cb(iteratee, context);
-    var keys = _.keys(obj),
-        length = keys.length,
-        results = {};
-    for (var index = 0; index < length; index++) {
-      var currentKey = keys[index];
-      results[currentKey] = iteratee(obj[currentKey], currentKey, obj);
-    }
-    return results;
-  };
+
function mapObject(obj, iteratee, context) {
+  iteratee = cb(iteratee, context);
+  var _keys = keys(obj),
+      length = _keys.length,
+      results = {};
+  for (var index = 0; index < length; index++) {
+    var currentKey = _keys[index];
+    results[currentKey] = iteratee(obj[currentKey], currentKey, obj);
+  }
+  return results;
+}
@@ -2290,19 +2272,19 @@

Object Functions

Convert an object into a list of [key, value] pairs. -The opposite of _.object.

+The opposite of object.

-
  _.pairs = function(obj) {
-    var keys = _.keys(obj);
-    var length = keys.length;
-    var pairs = Array(length);
-    for (var i = 0; i < length; i++) {
-      pairs[i] = [keys[i], obj[keys[i]]];
-    }
-    return pairs;
-  };
+
function pairs(obj) {
+  var _keys = keys(obj);
+  var length = _keys.length;
+  var pairs = Array(length);
+  for (var i = 0; i < length; i++) {
+    pairs[i] = [_keys[i], obj[_keys[i]]];
+  }
+  return pairs;
+}
@@ -2317,14 +2299,14 @@

Object Functions

-
  _.invert = function(obj) {
-    var result = {};
-    var keys = _.keys(obj);
-    for (var i = 0, length = keys.length; i < length; i++) {
-      result[obj[keys[i]]] = keys[i];
-    }
-    return result;
-  };
+
function invert(obj) {
+  var result = {};
+  var _keys = keys(obj);
+  for (var i = 0, length = _keys.length; i < length; i++) {
+    result[obj[_keys[i]]] = _keys[i];
+  }
+  return result;
+}
@@ -2335,18 +2317,17 @@

Object Functions

-

Return a sorted list of the function names available on the object. -Aliased as methods.

+

Return a sorted list of the function names available on the object.

-
  _.functions = _.methods = function(obj) {
-    var names = [];
-    for (var key in obj) {
-      if (_.isFunction(obj[key])) names.push(key);
-    }
-    return names.sort();
-  };
+
function functions(obj) {
+  var names = [];
+  for (var key in obj) {
+    if (isFunction(obj[key])) names.push(key);
+  }
+  return names.sort();
+}
@@ -2361,23 +2342,23 @@

Object Functions

-
  var createAssigner = function(keysFunc, defaults) {
-    return function(obj) {
-      var length = arguments.length;
-      if (defaults) obj = Object(obj);
-      if (length < 2 || obj == null) return obj;
-      for (var index = 1; index < length; index++) {
-        var source = arguments[index],
-            keys = keysFunc(source),
-            l = keys.length;
-        for (var i = 0; i < l; i++) {
-          var key = keys[i];
-          if (!defaults || obj[key] === void 0) obj[key] = source[key];
-        }
+            
function createAssigner(keysFunc, defaults) {
+  return function(obj) {
+    var length = arguments.length;
+    if (defaults) obj = Object(obj);
+    if (length < 2 || obj == null) return obj;
+    for (var index = 1; index < length; index++) {
+      var source = arguments[index],
+          _keys = keysFunc(source),
+          l = _keys.length;
+      for (var i = 0; i < l; i++) {
+        var key = _keys[i];
+        if (!defaults || obj[key] === void 0) obj[key] = source[key];
       }
-      return obj;
-    };
-  };
+ } + return obj; + }; +}
@@ -2392,7 +2373,7 @@

Object Functions

-
  _.extend = createAssigner(_.allKeys);
+
var extend = createAssigner(allKeys);
@@ -2408,7 +2389,7 @@

Object Functions

-
  _.extendOwn = _.assign = createAssigner(_.keys);
+
var extendOwn = createAssigner(keys);
@@ -2423,14 +2404,14 @@

Object Functions

-
  _.findKey = function(obj, predicate, context) {
-    predicate = cb(predicate, context);
-    var keys = _.keys(obj), key;
-    for (var i = 0, length = keys.length; i < length; i++) {
-      key = keys[i];
-      if (predicate(obj[key], key, obj)) return key;
-    }
-  };
+
function findKey(obj, predicate, context) {
+  predicate = cb(predicate, context);
+  var _keys = keys(obj), key;
+  for (var i = 0, length = _keys.length; i < length; i++) {
+    key = _keys[i];
+    if (predicate(obj[key], key, obj)) return key;
+  }
+}
@@ -2445,9 +2426,9 @@

Object Functions

-
  var keyInObj = function(value, key, obj) {
-    return key in obj;
-  };
+
function keyInObj(value, key, obj) {
+  return key in obj;
+}
@@ -2462,24 +2443,24 @@

Object Functions

-
  _.pick = restArguments(function(obj, keys) {
-    var result = {}, iteratee = keys[0];
-    if (obj == null) return result;
-    if (_.isFunction(iteratee)) {
-      if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]);
-      keys = _.allKeys(obj);
-    } else {
-      iteratee = keyInObj;
-      keys = flatten(keys, false, false);
-      obj = Object(obj);
-    }
-    for (var i = 0, length = keys.length; i < length; i++) {
-      var key = keys[i];
-      var value = obj[key];
-      if (iteratee(value, key, obj)) result[key] = value;
-    }
-    return result;
-  });
+
var pick = restArguments(function(obj, _keys) {
+  var result = {}, iteratee = _keys[0];
+  if (obj == null) return result;
+  if (isFunction(iteratee)) {
+    if (_keys.length > 1) iteratee = optimizeCb(iteratee, _keys[1]);
+    _keys = allKeys(obj);
+  } else {
+    iteratee = keyInObj;
+    _keys = _flatten(_keys, false, false);
+    obj = Object(obj);
+  }
+  for (var i = 0, length = _keys.length; i < length; i++) {
+    var key = _keys[i];
+    var value = obj[key];
+    if (iteratee(value, key, obj)) result[key] = value;
+  }
+  return result;
+});
@@ -2494,19 +2475,19 @@

Object Functions

-
  _.omit = restArguments(function(obj, keys) {
-    var iteratee = keys[0], context;
-    if (_.isFunction(iteratee)) {
-      iteratee = _.negate(iteratee);
-      if (keys.length > 1) context = keys[1];
-    } else {
-      keys = _.map(flatten(keys, false, false), String);
-      iteratee = function(value, key) {
-        return !_.contains(keys, key);
-      };
-    }
-    return _.pick(obj, iteratee, context);
-  });
+
var omit = restArguments(function(obj, _keys) {
+  var iteratee = _keys[0], context;
+  if (isFunction(iteratee)) {
+    iteratee = negate(iteratee);
+    if (_keys.length > 1) context = _keys[1];
+  } else {
+    _keys = map(_flatten(_keys, false, false), String);
+    iteratee = function(value, key) {
+      return !contains(_keys, key);
+    };
+  }
+  return pick(obj, iteratee, context);
+});
@@ -2521,7 +2502,7 @@

Object Functions

-
  _.defaults = createAssigner(_.allKeys, true);
+
var defaults = createAssigner(allKeys, true);
@@ -2538,11 +2519,11 @@

Object Functions

-
  _.create = function(prototype, props) {
-    var result = baseCreate(prototype);
-    if (props) _.extendOwn(result, props);
-    return result;
-  };
+
function create(prototype, props) {
+  var result = baseCreate(prototype);
+  if (props) extendOwn(result, props);
+  return result;
+}
@@ -2557,10 +2538,10 @@

Object Functions

-
  _.clone = function(obj) {
-    if (!_.isObject(obj)) return obj;
-    return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
-  };
+
function clone(obj) {
+  if (!isObject(obj)) return obj;
+  return isArray(obj) ? obj.slice() : extend({}, obj);
+}
@@ -2577,10 +2558,10 @@

Object Functions

-
  _.tap = function(obj, interceptor) {
-    interceptor(obj);
-    return obj;
-  };
+
function tap(obj, interceptor) {
+  interceptor(obj);
+  return obj;
+}
@@ -2595,16 +2576,16 @@

Object Functions

-
  _.isMatch = function(object, attrs) {
-    var keys = _.keys(attrs), length = keys.length;
-    if (object == null) return !length;
-    var obj = Object(object);
-    for (var i = 0; i < length; i++) {
-      var key = keys[i];
-      if (attrs[key] !== obj[key] || !(key in obj)) return false;
-    }
-    return true;
-  };
+
function isMatch(object, attrs) {
+  var _keys = keys(attrs), length = _keys.length;
+  if (object == null) return !length;
+  var obj = Object(object);
+  for (var i = 0; i < length; i++) {
+    var key = _keys[i];
+    if (attrs[key] !== obj[key] || !(key in obj)) return false;
+  }
+  return true;
+}
@@ -2619,8 +2600,7 @@

Object Functions

-
  var eq, deepEq;
-  eq = function(a, b, aStack, bStack) {
+
function eq(a, b, aStack, bStack) {
@@ -2636,7 +2616,7 @@

Object Functions

-
    if (a === b) return a !== 0 || 1 / a === 1 / b;
+
  if (a === b) return a !== 0 || 1 / a === 1 / b;
@@ -2651,7 +2631,7 @@

Object Functions

-
    if (a == null || b == null) return false;
+
  if (a == null || b == null) return false;
@@ -2666,7 +2646,7 @@

Object Functions

-
    if (a !== a) return b !== b;
+
  if (a !== a) return b !== b;
@@ -2681,10 +2661,10 @@

Object Functions

-
    var type = typeof a;
-    if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;
-    return deepEq(a, b, aStack, bStack);
-  };
+
  var type = typeof a;
+  if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;
+  return deepEq(a, b, aStack, bStack);
+}
@@ -2699,7 +2679,7 @@

Object Functions

-
  deepEq = function(a, b, aStack, bStack) {
+
function deepEq(a, b, aStack, bStack) {
@@ -2714,8 +2694,8 @@

Object Functions

-
    if (a instanceof _) a = a._wrapped;
-    if (b instanceof _) b = b._wrapped;
+
  if (a instanceof _) a = a._wrapped;
+  if (b instanceof _) b = b._wrapped;
@@ -2730,9 +2710,9 @@

Object Functions

-
    var className = toString.call(a);
-    if (className !== toString.call(b)) return false;
-    switch (className) {
+
  var className = toString.call(a);
+  if (className !== toString.call(b)) return false;
+  switch (className) {
@@ -2747,7 +2727,7 @@

Object Functions

-
      case '[object RegExp]':
+
    case '[object RegExp]':
@@ -2762,7 +2742,7 @@

Object Functions

-
      case '[object String]':
+
    case '[object String]':
@@ -2778,8 +2758,8 @@

Object Functions

-
        return '' + a === '' + b;
-      case '[object Number]':
+
      return '' + a === '' + b;
+    case '[object Number]':
@@ -2795,7 +2775,7 @@

Object Functions

-
        if (+a !== +a) return +b !== +b;
+
      if (+a !== +a) return +b !== +b;
@@ -2810,9 +2790,9 @@

Object Functions

-
        return +a === 0 ? 1 / +a === 1 / b : +a === +b;
-      case '[object Date]':
-      case '[object Boolean]':
+
      return +a === 0 ? 1 / +a === 1 / b : +a === +b;
+    case '[object Date]':
+    case '[object Boolean]':
@@ -2829,14 +2809,14 @@

Object Functions

-
        return +a === +b;
-      case '[object Symbol]':
-        return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);
-    }
+            
      return +a === +b;
+    case '[object Symbol]':
+      return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);
+  }
 
-    var areArrays = className === '[object Array]';
-    if (!areArrays) {
-      if (typeof a != 'object' || typeof b != 'object') return false;
+ var areArrays = className === '[object Array]'; + if (!areArrays) { + if (typeof a != 'object' || typeof b != 'object') return false;
@@ -2852,13 +2832,13 @@

Object Functions

-
      var aCtor = a.constructor, bCtor = b.constructor;
-      if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor &&
-                               _.isFunction(bCtor) && bCtor instanceof bCtor)
-                          && ('constructor' in a && 'constructor' in b)) {
-        return false;
-      }
-    }
+
    var aCtor = a.constructor, bCtor = b.constructor;
+    if (aCtor !== bCtor && !(isFunction(aCtor) && aCtor instanceof aCtor &&
+                             isFunction(bCtor) && bCtor instanceof bCtor)
+                        && ('constructor' in a && 'constructor' in b)) {
+      return false;
+    }
+  }
@@ -2888,10 +2868,10 @@

Object Functions

-
    aStack = aStack || [];
-    bStack = bStack || [];
-    var length = aStack.length;
-    while (length--) {
+
  aStack = aStack || [];
+  bStack = bStack || [];
+  var length = aStack.length;
+  while (length--) {
@@ -2907,8 +2887,8 @@

Object Functions

-
      if (aStack[length] === a) return bStack[length] === b;
-    }
+
    if (aStack[length] === a) return bStack[length] === b;
+  }
@@ -2923,8 +2903,8 @@

Object Functions

-
    aStack.push(a);
-    bStack.push(b);
+
  aStack.push(a);
+  bStack.push(b);
@@ -2939,7 +2919,7 @@

Object Functions

-
    if (areArrays) {
+
  if (areArrays) {
@@ -2954,8 +2934,8 @@

Object Functions

-
      length = a.length;
-      if (length !== b.length) return false;
+
    length = a.length;
+    if (length !== b.length) return false;
@@ -2970,10 +2950,10 @@

Object Functions

-
      while (length--) {
-        if (!eq(a[length], b[length], aStack, bStack)) return false;
-      }
-    } else {
+
    while (length--) {
+      if (!eq(a[length], b[length], aStack, bStack)) return false;
+    }
+  } else {
@@ -2988,8 +2968,8 @@

Object Functions

-
      var keys = _.keys(a), key;
-      length = keys.length;
+
    var _keys = keys(a), key;
+    length = _keys.length;
@@ -3004,8 +2984,8 @@

Object Functions

-
      if (_.keys(b).length !== length) return false;
-      while (length--) {
+
    if (keys(b).length !== length) return false;
+    while (length--) {
@@ -3020,10 +3000,10 @@

Object Functions

-
        key = keys[length];
-        if (!(has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
-      }
-    }
+
      key = _keys[length];
+      if (!(_has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
+    }
+  }
@@ -3038,10 +3018,10 @@

Object Functions

-
    aStack.pop();
-    bStack.pop();
-    return true;
-  };
+
  aStack.pop();
+  bStack.pop();
+  return true;
+}
@@ -3056,9 +3036,9 @@

Object Functions

-
  _.isEqual = function(a, b) {
-    return eq(a, b);
-  };
+
function isEqual(a, b) {
+  return eq(a, b);
+}
@@ -3074,11 +3054,11 @@

Object Functions

-
  _.isEmpty = function(obj) {
-    if (obj == null) return true;
-    if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj))) return obj.length === 0;
-    return _.keys(obj).length === 0;
-  };
+
function isEmpty(obj) {
+  if (obj == null) return true;
+  if (isArrayLike(obj) && (isArray(obj) || isString(obj) || isArguments(obj))) return obj.length === 0;
+  return keys(obj).length === 0;
+}
@@ -3093,9 +3073,9 @@

Object Functions

-
  _.isElement = function(obj) {
-    return !!(obj && obj.nodeType === 1);
-  };
+
function isElement(obj) {
+  return !!(obj && obj.nodeType === 1);
+}
@@ -3106,14 +3086,15 @@

Object Functions

-

Is a given value an array? -Delegates to ECMA5’s native Array.isArray

+

Internal function for creating a toString-based type tester.

-
  _.isArray = nativeIsArray || function(obj) {
-    return toString.call(obj) === '[object Array]';
-  };
+
function tagTester(name) {
+  return function(obj) {
+    return toString.call(obj) === '[object ' + name + ']';
+  };
+}
@@ -3124,14 +3105,12 @@

Object Functions

-

Is a given variable an object?

+

Is a given value an array? +Delegates to ECMA5’s native Array.isArray

-
  _.isObject = function(obj) {
-    var type = typeof obj;
-    return type === 'function' || type === 'object' && !!obj;
-  };
+
var isArray = nativeIsArray || tagTester('Array');
@@ -3142,15 +3121,14 @@

Object Functions

-

Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError, isMap, isWeakMap, isSet, isWeakSet.

+

Is a given variable an object?

-
  _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error', 'Symbol', 'Map', 'WeakMap', 'Set', 'WeakSet'], function(name) {
-    _['is' + name] = function(obj) {
-      return toString.call(obj) === '[object ' + name + ']';
-    };
-  });
+
function isObject(obj) {
+  var type = typeof obj;
+  return type === 'function' || type === 'object' && !!obj;
+}
@@ -3161,16 +3139,22 @@

Object Functions

-

Define a fallback version of the method in browsers (ahem, IE < 9), where -there isn’t any inspectable “Arguments” type.

+

Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError, isMap, isWeakMap, isSet, isWeakSet.

-
  if (!_.isArguments(arguments)) {
-    _.isArguments = function(obj) {
-      return has(obj, 'callee');
-    };
-  }
+
var isArguments = tagTester('Arguments');
+var isFunction = tagTester('Function');
+var isString = tagTester('String');
+var isNumber = tagTester('Number');
+var isDate = tagTester('Date');
+var isRegExp = tagTester('RegExp');
+var isError = tagTester('Error');
+var isSymbol = tagTester('Symbol');
+var isMap = tagTester('Map');
+var isWeakMap = tagTester('WeakMap');
+var isSet = tagTester('Set');
+var isWeakSet = tagTester('WeakSet');
@@ -3181,17 +3165,18 @@

Object Functions

-

Optimize isFunction if appropriate. Work around some typeof bugs in old v8, -IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).

+

Define a fallback version of the method in browsers (ahem, IE < 9), where +there isn’t any inspectable “Arguments” type.

-
  var nodelist = root.document && root.document.childNodes;
-  if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {
-    _.isFunction = function(obj) {
-      return typeof obj == 'function' || false;
+            
(function() {
+  if (!isArguments(arguments)) {
+    isArguments = function(obj) {
+      return _has(obj, 'callee');
     };
-  }
+ } +}());
@@ -3202,13 +3187,17 @@

Object Functions

-

Is a given object a finite number?

+

Optimize isFunction if appropriate. Work around some typeof bugs in old v8, +IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).

-
  _.isFinite = function(obj) {
-    return !_.isSymbol(obj) && isFinite(obj) && !isNaN(parseFloat(obj));
-  };
+
var nodelist = root.document && root.document.childNodes;
+if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {
+  isFunction = function(obj) {
+    return typeof obj == 'function' || false;
+  };
+}
@@ -3219,13 +3208,13 @@

Object Functions

-

Is the given value NaN?

+

Is a given object a finite number?

-
  _.isNaN = function(obj) {
-    return _.isNumber(obj) && isNaN(obj);
-  };
+
function isFinite(obj) {
+  return !isSymbol(obj) && _isFinite(obj) && !_isNaN(parseFloat(obj));
+}
@@ -3236,13 +3225,13 @@

Object Functions

-

Is a given value a boolean?

+

Is the given value NaN?

-
  _.isBoolean = function(obj) {
-    return obj === true || obj === false || toString.call(obj) === '[object Boolean]';
-  };
+
function isNaN(obj) {
+  return isNumber(obj) && _isNaN(obj);
+}
@@ -3253,13 +3242,13 @@

Object Functions

-

Is a given value equal to null?

+

Is a given value a boolean?

-
  _.isNull = function(obj) {
-    return obj === null;
-  };
+
function isBoolean(obj) {
+  return obj === true || obj === false || toString.call(obj) === '[object Boolean]';
+}
@@ -3270,13 +3259,13 @@

Object Functions

-

Is a given variable undefined?

+

Is a given value equal to null?

-
  _.isUndefined = function(obj) {
-    return obj === void 0;
-  };
+
function isNull(obj) {
+  return obj === null;
+}
@@ -3287,25 +3276,13 @@

Object Functions

-

Shortcut function for checking if an object has a given property directly -on itself (in other words, not on a prototype).

+

Is a given variable undefined?

-
  _.has = function(obj, path) {
-    if (!_.isArray(path)) {
-      return has(obj, path);
-    }
-    var length = path.length;
-    for (var i = 0; i < length; i++) {
-      var key = path[i];
-      if (obj == null || !hasOwnProperty.call(obj, key)) {
-        return false;
-      }
-      obj = obj[key];
-    }
-    return !!length;
-  };
+
function isUndefined(obj) {
+  return obj === void 0;
+}
@@ -3316,10 +3293,26 @@

Object Functions

-

Utility Functions

+

Shortcut function for checking if an object has a given property directly +on itself (in other words, not on a prototype).

+
function has(obj, path) {
+  if (!isArray(path)) {
+    return _has(obj, path);
+  }
+  var length = path.length;
+  for (var i = 0; i < length; i++) {
+    var key = path[i];
+    if (obj == null || !hasOwnProperty.call(obj, key)) {
+      return false;
+    }
+    obj = obj[key];
+  }
+  return !!length;
+}
+ @@ -3329,7 +3322,8 @@

Utility Functions

- +

Utility Functions

+ @@ -3341,16 +3335,9 @@

Utility Functions

-

Run Underscore.js in noConflict mode, returning the _ variable to its -previous owner. Returns a reference to the Underscore object.

- + -
  _.noConflict = function() {
-    root._ = previousUnderscore;
-    return this;
-  };
- @@ -3364,9 +3351,9 @@

Utility Functions

-
  _.identity = function(value) {
-    return value;
-  };
+
function identity(value) {
+  return value;
+}
@@ -3381,13 +3368,13 @@

Utility Functions

-
  _.constant = function(value) {
-    return function() {
-      return value;
-    };
+            
function constant(value) {
+  return function() {
+    return value;
   };
+}
 
-  _.noop = function(){};
+function noop(){}
@@ -3403,14 +3390,14 @@

Utility Functions

-
  _.property = function(path) {
-    if (!_.isArray(path)) {
-      return shallowProperty(path);
-    }
-    return function(obj) {
-      return deepGet(obj, path);
-    };
-  };
+
function property(path) {
+  if (!isArray(path)) {
+    return shallowProperty(path);
+  }
+  return function(obj) {
+    return deepGet(obj, path);
+  };
+}
@@ -3425,14 +3412,14 @@

Utility Functions

-
  _.propertyOf = function(obj) {
-    if (obj == null) {
-      return function(){};
-    }
-    return function(path) {
-      return !_.isArray(path) ? obj[path] : deepGet(obj, path);
-    };
-  };
+
function propertyOf(obj) {
+  if (obj == null) {
+    return function(){};
+  }
+  return function(path) {
+    return !isArray(path) ? obj[path] : deepGet(obj, path);
+  };
+}
@@ -3448,12 +3435,12 @@

Utility Functions

-
  _.matcher = _.matches = function(attrs) {
-    attrs = _.extendOwn({}, attrs);
-    return function(obj) {
-      return _.isMatch(obj, attrs);
-    };
-  };
+
function matcher(attrs) {
+  attrs = extendOwn({}, attrs);
+  return function(obj) {
+    return isMatch(obj, attrs);
+  };
+}
@@ -3468,12 +3455,12 @@

Utility Functions

-
  _.times = function(n, iteratee, context) {
-    var accum = Array(Math.max(0, n));
-    iteratee = optimizeCb(iteratee, context, 1);
-    for (var i = 0; i < n; i++) accum[i] = iteratee(i);
-    return accum;
-  };
+
function times(n, iteratee, context) {
+  var accum = Array(Math.max(0, n));
+  iteratee = optimizeCb(iteratee, context, 1);
+  for (var i = 0; i < n; i++) accum[i] = iteratee(i);
+  return accum;
+}
@@ -3488,13 +3475,13 @@

Utility Functions

-
  _.random = function(min, max) {
-    if (max == null) {
-      max = min;
-      min = 0;
-    }
-    return min + Math.floor(Math.random() * (max - min + 1));
-  };
+
function random(min, max) {
+  if (max == null) {
+    max = min;
+    min = 0;
+  }
+  return min + Math.floor(Math.random() * (max - min + 1));
+}
@@ -3509,9 +3496,9 @@

Utility Functions

-
  _.now = Date.now || function() {
-    return new Date().getTime();
-  };
+
var now = Date.now || function() {
+  return new Date().getTime();
+};
@@ -3526,15 +3513,15 @@

Utility Functions

-
  var escapeMap = {
-    '&': '&amp;',
-    '<': '&lt;',
-    '>': '&gt;',
-    '"': '&quot;',
-    "'": '&#x27;',
-    '`': '&#x60;'
-  };
-  var unescapeMap = _.invert(escapeMap);
+
var escapeMap = {
+  '&': '&amp;',
+  '<': '&lt;',
+  '>': '&gt;',
+  '"': '&quot;',
+  "'": '&#x27;',
+  '`': '&#x60;'
+};
+var unescapeMap = invert(escapeMap);
@@ -3549,10 +3536,10 @@

Utility Functions

-
  var createEscaper = function(map) {
-    var escaper = function(match) {
-      return map[match];
-    };
+
function createEscaper(map) {
+  var escaper = function(match) {
+    return map[match];
+  };
@@ -3567,16 +3554,16 @@

Utility Functions

-
    var source = '(?:' + _.keys(map).join('|') + ')';
-    var testRegexp = RegExp(source);
-    var replaceRegexp = RegExp(source, 'g');
-    return function(string) {
-      string = string == null ? '' : '' + string;
-      return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;
-    };
+            
  var source = '(?:' + keys(map).join('|') + ')';
+  var testRegexp = RegExp(source);
+  var replaceRegexp = RegExp(source, 'g');
+  return function(string) {
+    string = string == null ? '' : '' + string;
+    return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;
   };
-  _.escape = createEscaper(escapeMap);
-  _.unescape = createEscaper(unescapeMap);
+} +var escape = createEscaper(escapeMap); +var unescape = createEscaper(unescapeMap);
@@ -3593,22 +3580,22 @@

Utility Functions

-
  _.result = function(obj, path, fallback) {
-    if (!_.isArray(path)) path = [path];
-    var length = path.length;
-    if (!length) {
-      return _.isFunction(fallback) ? fallback.call(obj) : fallback;
-    }
-    for (var i = 0; i < length; i++) {
-      var prop = obj == null ? void 0 : obj[path[i]];
-      if (prop === void 0) {
-        prop = fallback;
-        i = length; // Ensure we don't continue iterating.
-      }
-      obj = _.isFunction(prop) ? prop.call(obj) : prop;
+            
function result(obj, path, fallback) {
+  if (!isArray(path)) path = [path];
+  var length = path.length;
+  if (!length) {
+    return isFunction(fallback) ? fallback.call(obj) : fallback;
+  }
+  for (var i = 0; i < length; i++) {
+    var prop = obj == null ? void 0 : obj[path[i]];
+    if (prop === void 0) {
+      prop = fallback;
+      i = length; // Ensure we don't continue iterating.
     }
-    return obj;
-  };
+ obj = isFunction(prop) ? prop.call(obj) : prop; + } + return obj; +}
@@ -3624,11 +3611,11 @@

Utility Functions

-
  var idCounter = 0;
-  _.uniqueId = function(prefix) {
-    var id = ++idCounter + '';
-    return prefix ? prefix + id : id;
-  };
+
var idCounter = 0;
+function uniqueId(prefix) {
+  var id = ++idCounter + '';
+  return prefix ? prefix + id : id;
+}
@@ -3644,11 +3631,11 @@

Utility Functions

-
  _.templateSettings = {
-    evaluate: /<%([\s\S]+?)%>/g,
-    interpolate: /<%=([\s\S]+?)%>/g,
-    escape: /<%-([\s\S]+?)%>/g
-  };
+
var templateSettings = _.templateSettings = {
+  evaluate: /<%([\s\S]+?)%>/g,
+  interpolate: /<%=([\s\S]+?)%>/g,
+  escape: /<%-([\s\S]+?)%>/g
+};
@@ -3665,7 +3652,7 @@

Utility Functions

-
  var noMatch = /(.)^/;
+
var noMatch = /(.)^/;
@@ -3681,20 +3668,20 @@

Utility Functions

-
  var escapes = {
-    "'": "'",
-    '\\': '\\',
-    '\r': 'r',
-    '\n': 'n',
-    '\u2028': 'u2028',
-    '\u2029': 'u2029'
-  };
+            
var escapes = {
+  "'": "'",
+  '\\': '\\',
+  '\r': 'r',
+  '\n': 'n',
+  '\u2028': 'u2028',
+  '\u2029': 'u2029'
+};
 
-  var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g;
+var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g;
 
-  var escapeChar = function(match) {
-    return '\\' + escapes[match];
-  };
+var escapeChar = function(match) { + return '\\' + escapes[match]; +};
@@ -3712,9 +3699,9 @@

Utility Functions

-
  _.template = function(text, settings, oldSettings) {
-    if (!settings && oldSettings) settings = oldSettings;
-    settings = _.defaults({}, settings, _.templateSettings);
+
function template(text, settings, oldSettings) {
+  if (!settings && oldSettings) settings = oldSettings;
+  settings = defaults({}, settings, _.templateSettings);
@@ -3729,11 +3716,11 @@

Utility Functions

-
    var matcher = RegExp([
-      (settings.escape || noMatch).source,
-      (settings.interpolate || noMatch).source,
-      (settings.evaluate || noMatch).source
-    ].join('|') + '|$', 'g');
+
  var matcher = RegExp([
+    (settings.escape || noMatch).source,
+    (settings.interpolate || noMatch).source,
+    (settings.evaluate || noMatch).source
+  ].join('|') + '|$', 'g');
@@ -3748,19 +3735,19 @@

Utility Functions

-
    var index = 0;
-    var source = "__p+='";
-    text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
-      source += text.slice(index, offset).replace(escapeRegExp, escapeChar);
-      index = offset + match.length;
+            
  var index = 0;
+  var source = "__p+='";
+  text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
+    source += text.slice(index, offset).replace(escapeRegExp, escapeChar);
+    index = offset + match.length;
 
-      if (escape) {
-        source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
-      } else if (interpolate) {
-        source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
-      } else if (evaluate) {
-        source += "';\n" + evaluate + "\n__p+='";
-      }
+ if (escape) { + source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; + } else if (interpolate) { + source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; + } else if (evaluate) { + source += "';\n" + evaluate + "\n__p+='"; + }
@@ -3775,9 +3762,9 @@

Utility Functions

-
      return match;
-    });
-    source += "';\n";
+
    return match;
+  });
+  source += "';\n";
@@ -3792,23 +3779,23 @@

Utility Functions

-
    if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n';
+            
  if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n';
 
-    source = "var __t,__p='',__j=Array.prototype.join," +
-      "print=function(){__p+=__j.call(arguments,'');};\n" +
-      source + 'return __p;\n';
+  source = "var __t,__p='',__j=Array.prototype.join," +
+    "print=function(){__p+=__j.call(arguments,'');};\n" +
+    source + 'return __p;\n';
 
-    var render;
-    try {
-      render = new Function(settings.variable || 'obj', '_', source);
-    } catch (e) {
-      e.source = source;
-      throw e;
-    }
+  var render;
+  try {
+    render = new Function(settings.variable || 'obj', '_', source);
+  } catch (e) {
+    e.source = source;
+    throw e;
+  }
 
-    var template = function(data) {
-      return render.call(this, data, _);
-    };
+ var template = function(data) { + return render.call(this, data, _); + };
@@ -3823,11 +3810,11 @@

Utility Functions

-
    var argument = settings.variable || 'obj';
-    template.source = 'function(' + argument + '){\n' + source + '}';
+            
  var argument = settings.variable || 'obj';
+  template.source = 'function(' + argument + '){\n' + source + '}';
 
-    return template;
-  };
+ return template; +}
@@ -3842,11 +3829,11 @@

Utility Functions

-
  _.chain = function(obj) {
-    var instance = _(obj);
-    instance._chain = true;
-    return instance;
-  };
+
function chain(obj) {
+  var instance = _(obj);
+  instance._chain = true;
+  return instance;
+}
@@ -3889,9 +3876,9 @@

OOP

-
  var chainResult = function(instance, obj) {
-    return instance._chain ? _(obj).chain() : obj;
-  };
+
function chainResult(instance, obj) {
+  return instance._chain ? _(obj).chain() : obj;
+}
@@ -3906,17 +3893,17 @@

OOP

-
  _.mixin = function(obj) {
-    _.each(_.functions(obj), function(name) {
-      var func = _[name] = obj[name];
-      _.prototype[name] = function() {
-        var args = [this._wrapped];
-        push.apply(args, arguments);
-        return chainResult(this, func.apply(_, args));
-      };
-    });
-    return _;
-  };
+
function mixin(obj) {
+  each(functions(obj), function(name) {
+    var func = _[name] = obj[name];
+    _.prototype[name] = function() {
+      var args = [this._wrapped];
+      push.apply(args, arguments);
+      return chainResult(this, func.apply(_, args));
+    };
+  });
+  return _;
+}
@@ -3927,11 +3914,19 @@

OOP

-

Add all of the Underscore functions to the wrapper object.

+

Add all mutator Array functions to the wrapper.

-
  _.mixin(_);
+
each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
+  var method = ArrayProto[name];
+  _.prototype[name] = function() {
+    var obj = this._wrapped;
+    method.apply(obj, arguments);
+    if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0];
+    return chainResult(this, obj);
+  };
+});
@@ -3942,19 +3937,16 @@

OOP

-

Add all mutator Array functions to the wrapper.

+

Add all accessor Array functions to the wrapper.

-
  _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
-    var method = ArrayProto[name];
-    _.prototype[name] = function() {
-      var obj = this._wrapped;
-      method.apply(obj, arguments);
-      if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0];
-      return chainResult(this, obj);
-    };
-  });
+
each(['concat', 'join', 'slice'], function(name) {
+  var method = ArrayProto[name];
+  _.prototype[name] = function() {
+    return chainResult(this, method.apply(this._wrapped, arguments));
+  };
+});
@@ -3965,16 +3957,13 @@

OOP

-

Add all accessor Array functions to the wrapper.

+

Extracts the result from a wrapped and chained object.

-
  _.each(['concat', 'join', 'slice'], function(name) {
-    var method = ArrayProto[name];
-    _.prototype[name] = function() {
-      return chainResult(this, method.apply(this._wrapped, arguments));
-    };
-  });
+
_.prototype.value = function() {
+  return this._wrapped;
+};
@@ -3985,13 +3974,159 @@

OOP

-

Extracts the result from a wrapped and chained object.

+

Provide unwrapping proxy for some methods used in engine operations +such as arithmetic and JSON stringification.

-
  _.prototype.value = function() {
-    return this._wrapped;
-  };
+
_.prototype.valueOf = _.prototype.toJSON = _.prototype.value;
+
+_.prototype.toString = function() {
+  return String(this._wrapped);
+};
+
+var allExports = ({
+  'default': _,
+  VERSION: VERSION,
+  iteratee: iteratee,
+  restArguments: restArguments,
+  each: each,
+  forEach: each,
+  map: map,
+  collect: map,
+  reduce: reduce,
+  foldl: reduce,
+  inject: reduce,
+  reduceRight: reduceRight,
+  foldr: reduceRight,
+  find: find,
+  detect: find,
+  filter: filter,
+  select: filter,
+  reject: reject,
+  every: every,
+  all: every,
+  some: some,
+  any: some,
+  contains: contains,
+  includes: contains,
+  include: contains,
+  invoke: invoke,
+  pluck: pluck,
+  where: where,
+  findWhere: findWhere,
+  max: max,
+  min: min,
+  shuffle: shuffle,
+  sample: sample,
+  sortBy: sortBy,
+  groupBy: groupBy,
+  indexBy: indexBy,
+  countBy: countBy,
+  toArray: toArray,
+  size: size,
+  partition: partition,
+  first: first,
+  head: first,
+  take: first,
+  initial: initial,
+  last: last,
+  rest: rest,
+  tail: rest,
+  drop: rest,
+  compact: compact,
+  flatten: flatten,
+  without: without,
+  uniq: uniq,
+  unique: uniq,
+  union: union,
+  intersection: intersection,
+  difference: difference,
+  unzip: unzip,
+  zip: zip,
+  object: object,
+  findIndex: findIndex,
+  findLastIndex: findLastIndex,
+  sortedIndex: sortedIndex,
+  indexOf: indexOf,
+  lastIndexOf: lastIndexOf,
+  range: range,
+  chunk: chunk,
+  bind: bind,
+  partial: partial,
+  bindAll: bindAll,
+  memoize: memoize,
+  delay: delay,
+  defer: defer,
+  throttle: throttle,
+  debounce: debounce,
+  wrap: wrap,
+  negate: negate,
+  compose: compose,
+  after: after,
+  before: before,
+  once: once,
+  keys: keys,
+  allKeys: allKeys,
+  values: values,
+  mapObject: mapObject,
+  pairs: pairs,
+  invert: invert,
+  functions: functions,
+  methods: functions,
+  extend: extend,
+  extendOwn: extendOwn,
+  assign: extendOwn,
+  findKey: findKey,
+  pick: pick,
+  omit: omit,
+  defaults: defaults,
+  create: create,
+  clone: clone,
+  tap: tap,
+  isMatch: isMatch,
+  isEqual: isEqual,
+  isEmpty: isEmpty,
+  isElement: isElement,
+  isArray: isArray,
+  isObject: isObject,
+  isArguments: isArguments,
+  isFunction: isFunction,
+  isString: isString,
+  isNumber: isNumber,
+  isDate: isDate,
+  isRegExp: isRegExp,
+  isError: isError,
+  isSymbol: isSymbol,
+  isMap: isMap,
+  isWeakMap: isWeakMap,
+  isSet: isSet,
+  isWeakSet: isWeakSet,
+  isFinite: isFinite,
+  isNaN: isNaN,
+  isBoolean: isBoolean,
+  isNull: isNull,
+  isUndefined: isUndefined,
+  has: has,
+  identity: identity,
+  constant: constant,
+  noop: noop,
+  property: property,
+  propertyOf: propertyOf,
+  matcher: matcher,
+  matches: matcher,
+  times: times,
+  random: random,
+  now: now,
+  escape: escape,
+  unescape: unescape,
+  result: result,
+  uniqueId: uniqueId,
+  templateSettings: templateSettings,
+  template: template,
+  chain: chain,
+  mixin: mixin
+});
@@ -4002,42 +4137,14 @@

OOP

-

Provide unwrapping proxy for some methods used in engine operations -such as arithmetic and JSON stringification.

+

Add all of the Underscore functions to the wrapper object and return it.

-
  _.prototype.valueOf = _.prototype.toJSON = _.prototype.value;
+            
var indexDefault = mixin(allExports);
 
-  _.prototype.toString = function() {
-    return String(this._wrapped);
-  };
- - - - -
  • -
    - -
    - -
    -

    AMD registration happens at the end for compatibility with AMD loaders -that may not enforce next-turn semantics on modules. Even though general -practice for AMD registration is to be anonymous, underscore registers -as a named module because, like jQuery, it is a base library that is -popular enough to be bundled in a third party lib, but not be part of -an AMD load request. Those cases could generate an error when an -anonymous define() is called outside of a loader request.

    - -
    - -
      if (typeof define == 'function' && define.amd) {
    -    define('underscore', [], function() {
    -      return _;
    -    });
    -  }
    -}());
    +export default indexDefault; +export { VERSION, iteratee, restArguments, each, each as forEach, map, map as collect, reduce, reduce as foldl, reduce as inject, reduceRight, reduceRight as foldr, find, find as detect, filter, filter as select, reject, every, every as all, some, some as any, contains, contains as includes, contains as include, invoke, pluck, where, findWhere, max, min, shuffle, sample, sortBy, groupBy, indexBy, countBy, toArray, size, partition, first, first as head, first as take, initial, last, rest, rest as tail, rest as drop, compact, flatten, without, uniq, uniq as unique, union, intersection, difference, unzip, zip, object, findIndex, findLastIndex, sortedIndex, indexOf, lastIndexOf, range, chunk, bind, partial, bindAll, memoize, delay, defer, throttle, debounce, wrap, negate, compose, after, before, once, keys, allKeys, values, mapObject, pairs, invert, functions, functions as methods, extend, extendOwn, extendOwn as assign, findKey, pick, omit, defaults, create, clone, tap, isMatch, isEqual, isEmpty, isElement, isArray, isObject, isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError, isSymbol, isMap, isWeakMap, isSet, isWeakSet, isFinite, isNaN, isBoolean, isNull, isUndefined, has, identity, constant, noop, property, propertyOf, matcher, matcher as matches, times, random, now, escape, unescape, result, uniqueId, templateSettings, template, chain, mixin };
  • diff --git a/index.html b/index.html index 0e18217cc..4c8681285 100644 --- a/index.html +++ b/index.html @@ -183,7 +183,7 @@