Files
Scanning the repository...
Last update 9 years 9 months
by Raivo Laanemets
| Filespclib | |
|---|---|
| .. | |
| args.js | |
| command_queue.js | |
| command_run.js | |
| commands.js | |
| connection.js | |
| control.js | |
| decode.js | |
| decode_line.js | |
| encode.js | |
| help.js | |
| pearson.js |
args.js// Simple argument parser. module.exports = function(args) { var options = {}, current, option; args.forEach(function(arg) { var match = arg.match(/^\-\-(.*)/); if (match) { option = match[1]; current = option; options[option] = []; } else { if (current) { options[current].push(arg); } } }); return options; };