Skip to content

Commit

Permalink
Refactoring the regex codes
Browse files Browse the repository at this point in the history
  • Loading branch information
simianhacker committed Sep 26, 2015
1 parent 3902c38 commit 2b41987
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/server/logging/applyFilterToKey.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ module.exports = function applyFilterToKey(obj, key, action) {
}
else if (/\/.+\//.test(action)) {
var matches = action.match(/\/(.+)\//);
try {
if (matches) {
let regex = new RegExp(matches[1]);
obj[k] = ('' + val).replace(regex, replacer);
} catch (e) {
//meh
}
}
} else if (typeof val === 'object') {
Expand Down

0 comments on commit 2b41987

Please sign in to comment.