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
| const args = process.argv.slice(2); | |
| function getArg(flag: string, fallback: string): string { | |
| const i = args.indexOf(flag); | |
| return (i !== -1 && args[i + 1]) ? args[i + 1]! : fallback; | |
| } | |
| const FILE_PATH = getArg("--file-path", "message_service_db.messages.json"); | |
| const SAMPLE_SIZE = parseInt(getArg("--sample-size", "10"), 10); |