Created
October 27, 2015 15:37
-
-
Save guumaster/54aa028d5d7a7a6563b3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
let convert = require('./convert'); | |
let freq = require('./frequency'); | |
let input = process.argv[2] || 'EMPTY'; | |
console.log( freq(convert(input))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
var cap = require('./capitalize');
var wcount = require('./wordcount');
var sanitize = require('./sanitize');
console.log(process.argv.length);
if(process.argv.length < 4){
console.log('Al least 3 parameters. E.g. node execise2 -cap "AAAA"');
}else{
if ( process.argv[2][0] === '-'){
switch(process.argv[2]){
case '-cap': console.log(cap(process.argv[3]));break;
case '-san': console.log(sanitize(process.argv[3]));break;
case '-wcount':console.log(wcount(process.argv[3]));break;
}
}else{
console.log('First function to do. E.g. node execise2 -cap "AAAA"');
}
}