Update docs and builds.

Former-commit-id: 21791e052114af5907d76251c58c3ba2ca138873
This commit is contained in:
John-David Dalton
2013-03-25 08:35:20 -07:00
parent 14343b5410
commit 87f1d55bc2
7 changed files with 240 additions and 261 deletions

50
dist/lodash.js vendored
View File

@@ -614,19 +614,6 @@
return htmlEscapes[match];
}
/**
* Checks if `value` is a DOM node in IE < 9.
*
* @private
* @param {Mixed} value The value to check.
* @returns {Boolean} Returns `true` if the `value` is a DOM node, else `false`.
*/
function isNode(value) {
// IE < 9 presents DOM nodes as `Object` objects except they have `toString`
// methods that are `typeof` "string" and still can coerce nodes to strings
return typeof value.toString != 'function' && typeof String(value) == 'string';
}
/**
* A fast path for creating `lodash` wrapper objects.
*
@@ -667,7 +654,8 @@
}
// check that the constructor is `Object` (i.e. `Object instanceof Object`)
var ctor = value.constructor;
if ((!isFunction(ctor)) || ctor instanceof ctor) {
if (isFunction(ctor) ? ctor instanceof ctor : (support.nodeClass || !isNode(value))) {
// In most environments an object's own properties are iterated before
// its inherited properties. If the last iterated property is an object's
// own property then there are no inherited enumerable properties.
@@ -679,23 +667,6 @@
return result;
}
/**
* A fallback implementation of `Object.keys` that produces an array of the
* given object's own enumerable property names.
*
* @private
* @type Function
* @param {Object} object The object to inspect.
* @returns {Array} Returns a new array of property names.
*/
var shimKeys = createIterator({
'args': 'object',
'init': '[]',
'top': 'if (!(objectTypes[typeof object])) return result',
'loop': 'result.push(index)',
'arrays': false
});
/**
* Slices the `collection` from the `start` index up to, but not including,
* the `end` index.
@@ -779,6 +750,23 @@
return value instanceof Array || toString.call(value) == arrayClass;
};
/**
* A fallback implementation of `Object.keys` that produces an array of the
* given object's own enumerable property names.
*
* @private
* @type Function
* @param {Object} object The object to inspect.
* @returns {Array} Returns a new array of property names.
*/
var shimKeys = createIterator({
'args': 'object',
'init': '[]',
'top': 'if (!(objectTypes[typeof object])) return result',
'loop': 'result.push(index)',
'arrays': false
});
/**
* Creates an array composed of the own enumerable property names of `object`.
*