Closed spencewine closed 7 years ago
This appears to be a bug. If call the add command like this:
add 0 0 0 0 1
I would expect an args.bills to equal [0,0,0,0,1]. Instead, args.bills = 0.
here is the code I used
program .command('add [bills...]') .description('run addBills to register') .action(function(args, cb){ cashRegister = Object.assign({}, cashRegister, totalBills(args.bills, 'Added')) showReg() cb() });
program
.command('add [bills...]')
.description('run addBills to register')
.action(function(args, cb){
cashRegister = Object.assign({}, cashRegister, totalBills(args.bills, 'Added'))
showReg()
cb()
});
This appears to be a bug. If call the add command like this:
add 0 0 0 0 1
I would expect an args.bills to equal [0,0,0,0,1]. Instead, args.bills = 0.
here is the code I used
program
.command('add [bills...]')
.description('run addBills to register')
.action(function(args, cb){
cashRegister = Object.assign({}, cashRegister, totalBills(args.bills, 'Added'))
showReg()
cb()
});