-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
26 lines (21 loc) · 669 Bytes
/
Copy pathapp.js
File metadata and controls
26 lines (21 loc) · 669 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
const _ = require('lodash');
const yargs = require('yargs');
/* TODO : define all commands
* TODO : create modules
*/
//modules
const fibonacci = require('./fibonacci.js');
const number = {}
const argv = yargs.command('fib', 'Generate fibonacci sequence',{
number:number
})
.help().argv;
var command = argv._[0];
if(command === "fib"){
//TODO: work out why argv is going wrong
console.log(argv.number);
var fibonacci_sequence = new fibonacci(10);
console.log(fibonacci_sequence);
console.log(fibonacci_sequence.getSequence());
// console.log(fibonacci_sequence.generateSequence);
}