file-command-parser

0.0.1 • Public • Published

commandParser

Use for parse file with command.

Example

script

var CommandParser = require('commandParser');

var commandParser = new CommandParser();
commandParser.file('test');
console.log(commandParser.parse());

input

command1 "arg1 test" arg2 arg3
#comment
command2 arg4 'temp lorem lipsum'
 	command3
 	command4
 	command5 arg5 arg4 "arg6"

output

[ [ 'command1', 'arg1 test', 'arg2', 'arg3' ],
  false,
  [ 'command2', 'arg4', 'temp lorem lipsum' ],
  [ 'command3' ],
  [ 'command4' ],
  [ 'command5', 'arg5', 'arg4', 'arg6' ] ]

Readme

Keywords

none

Package Sidebar

Install

npm i file-command-parser

Weekly Downloads

0

Version

0.0.1

License

none

Last publish

Collaborators

  • jwest