Cleanup benchmarks in perf.js.

Former-commit-id: f845855383e01c63d513cea53cec86abb4f4fb65
This commit is contained in:
John-David Dalton
2012-08-25 20:13:24 -07:00
parent 0e4afefc7f
commit 7adf5e763b
3 changed files with 5 additions and 71 deletions

View File

@@ -708,11 +708,11 @@
// Return a copy of the object without the blacklisted properties.
_.omit = function(obj) {
var copy = _.extend({}, obj);
var copy = {};
var keys = _.flatten(slice.call(arguments, 1));
each(keys, function(key) {
delete copy[key];
});
for (var key in obj) {
if (!_.include(keys, key)) copy[key] = obj[key];
}
return copy;
};