Update vendors.

Former-commit-id: f2a09b6501a34b2ae2d8e996b13c9da4fb048535
This commit is contained in:
John-David Dalton
2012-08-24 08:26:34 -07:00
parent a2665529f6
commit 48c13c990f
4 changed files with 50 additions and 38 deletions

View File

@@ -699,12 +699,18 @@
// Return a copy of the object only containing the whitelisted properties.
_.pick = function(obj) {
var result = {};
each(flatten(slice.call(arguments, 1), true, []), function(key) {
each(_.flatten(slice.call(arguments, 1)), function(key) {
if (key in obj) result[key] = obj[key];
});
return result;
};
// Return a copy of the object without the blacklisted properties.
_.omit = function(obj) {
var keys = _.flatten(slice.call(arguments, 1));
return _.pick(obj, _.difference(_.keys(obj), keys));
};
// Fill in a given object with default properties.
_.defaults = function(obj) {
each(slice.call(arguments, 1), function(source) {