Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jdan committed Aug 27, 2014
1 parent a8bf0eb commit ff7c42f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
12 changes: 7 additions & 5 deletions lib/clone.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@
* Clones an object
*/
function clone(obj) {
var key, clone = {};
if (!obj) return;
var key, copy = {};
if (!obj) {
return;
}

for (key in obj) {
clone[key] = obj[key];
copy[key] = obj[key];
}

return clone;
};
return copy;
}

module.exports = clone;
6 changes: 4 additions & 2 deletions lib/pluck.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
*/
function pluck(obj, fields) {
var plucked = {};
if (!obj) return;
if (!obj) {
return;
}

fields.forEach(function (field) {
plucked[field] = obj[field];
});

return plucked;
};
}

module.exports = pluck;

0 comments on commit ff7c42f

Please sign in to comment.