Permalink
Browse files

dont use + prefix anymore

  • Loading branch information...
1 parent 4602a64 commit c568051ae796519354b412f0021a99e765671d37 @olalonde committed Oct 26, 2012
Showing with 3 additions and 10 deletions.
  1. +3 −10 index.js
View
@@ -104,10 +104,6 @@ function modifyPath(type, obj, path, value) {
root = root[property];
}
return obj;
- console.log('done');
- //eval('property = oldObj' + path);
-
-
}
// Recursive
@@ -128,18 +124,15 @@ function traverse (obj, cb, parent, key) {
function parseOptions (str) {
var only = [], except = [];
-
var regex = {
- only: /\+[^ ]+/g
+ only: /[^- ][^ ]*/g
, except: /\-[^ ]+/g
}
-
str.replace(regex.only, function(path) {
- only.push(path.substr(1)); // strip + or -
+ only.push(path); // strip + or -
});
str.replace(regex.except, function(path) {
- except.push(path.substr(1)); // strip + or -
+ except.push(path.substr(1)); // strip -
});
-
return {only: only, except: except};
}

0 comments on commit c568051

Please sign in to comment.