Skip to content

Commit

Permalink
Merge pull request jashkenas#1687 from braddunbar/style
Browse files Browse the repository at this point in the history
Remove unnecessary variable declaration.
  • Loading branch information
jashkenas committed Jun 16, 2014
2 parents e834df6 + f3230b7 commit 45a7c0e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions underscore.js
Original file line number Diff line number Diff line change
Expand Up @@ -913,11 +913,10 @@

// Return a copy of the object without the blacklisted properties.
_.omit = function(obj, iterator, context) {
var keys;
if (_.isFunction(iterator)) {
iterator = _.negate(iterator);
} else {
keys = _.map(concat.apply([], slice.call(arguments, 1)), String);
var keys = _.map(concat.apply([], slice.call(arguments, 1)), String);
iterator = function(value, key) {
return !_.contains(keys, key);
};
Expand All @@ -928,10 +927,9 @@
// Fill in a given object with default properties.
_.defaults = function(obj) {
if (!_.isObject(obj)) return obj;
var source, prop;
for (var i = 1, length = arguments.length; i < length; i++) {
source = arguments[i];
for (prop in source) {
var source = arguments[i];
for (var prop in source) {
if (obj[prop] === void 0) obj[prop] = source[prop];
}
}
Expand Down

0 comments on commit 45a7c0e

Please sign in to comment.