Update builds and docs.

Former-commit-id: a09de289c420b76f68efb9471e6e630d07663733
This commit is contained in:
John-David Dalton
2013-06-30 11:03:07 -07:00
parent 9e9bd16b18
commit 9c2151dc37
7 changed files with 279 additions and 270 deletions

18
dist/lodash.compat.js vendored
View File

@@ -22,6 +22,9 @@
/** Used internally to indicate various things */
var indicatorObject = {};
/** Used to avoid reference errors in `createIterator` */
var iteratorObject = {};
/** Used to prefix keys to avoid issues with `__proto__` and properties on `Object.prototype` */
var keyPrefix = +new Date + '';
@@ -663,7 +666,7 @@
* @memberOf _.support
* @type Boolean
*/
support.argsClass = isArguments(arguments);
support.argsClass = toString.call(arguments) == argsClass;
/**
* Detect if `name` or `message` properties of `Error.prototype` are
@@ -1027,7 +1030,8 @@
* @returns {Function} Returns the compiled function.
*/
function createIterator() {
var data = getObject();
var data = getObject(),
keys = iteratorObject.keys;
// data properties
data.shadowedProps = shadowedProps;
@@ -1048,8 +1052,8 @@
// create the function factory
var factory = Function(
'errorClass, errorProto, hasOwnProperty, isArguments, isArray, ' +
'isString, keys, lodash, objectProto, objectTypes, nonEnumProps, ' +
'errorClass, errorProto, hasOwnProperty, indicatorObject, isArguments, ' +
'isArray, isString, keys, lodash, objectProto, objectTypes, nonEnumProps, ' +
'stringClass, stringProto, toString',
'return function(' + args + ') {\n' + iteratorTemplate(data) + '\n}'
);
@@ -1058,8 +1062,8 @@
// return the compiled function
return factory(
errorClass, errorProto, hasOwnProperty, isArguments, isArray,
isString, keys, lodash, objectProto, objectTypes, nonEnumProps,
errorClass, errorProto, hasOwnProperty, indicatorObject, isArguments,
isArray, isString, keys, lodash, objectProto, objectTypes, nonEnumProps,
stringClass, stringProto, toString
);
}
@@ -1261,7 +1265,7 @@
* _.keys({ 'one': 1, 'two': 2, 'three': 3 });
* // => ['one', 'two', 'three'] (order is not guaranteed)
*/
var keys = !nativeKeys ? shimKeys : function(object) {
var keys = iteratorObject.keys = !nativeKeys ? shimKeys : function(object) {
if (!isObject(object)) {
return [];
}