Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add word support to --map and --select

for example
$ jog --file my.log --map name

vs

$ log --file my.log --map _.name
  • Loading branch information...
commit c065776f475cf666d6ba76909ec92c338a471b95 1 parent b85c941
@tj authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  bin/jog
View
2  bin/jog
@@ -16,6 +16,7 @@ var selects = [];
// --map
program.on('map', function(val){
+ if (/^\w+$/.test(val)) val = '_.' + val;
maps.push(new Function('_', 'return ' + val));
});
@@ -34,6 +35,7 @@ program.on('type', function(val){
// --select
program.on('select', function(val){
+ if (/^\w+$/.test(val)) val = '_.' + val;
selects.push(new Function('_', 'return ' + val));
});
Please sign in to comment.
Something went wrong with that request. Please try again.