{"size": 569, "ext": "js", "max_stars_repo_path": "bin/unmask.js", "max_stars_repo_name": "remorses/unmask-json", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "bin/unmask.js", "max_issues_repo_name": "remorses/unmask-json", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "bin/unmask.js", "max_forks_repo_name": "remorses/unmask-json", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.45, "max_line_length": 72, "alphanum_fraction": 0.6625659051}
#!/usr/bin/env node
const program = require("commander");
const {unmaskStream, unmaskFile} = require("../lib");
const c = require("colors");

program
  .option("-f, --file <file>", "Outputs the structure of a JSON file")
  .option(
    "-s, --stream ",
    "Outputs the structure from a JSON stream, using cat file > unmask "
  )
  .option("-i, --indents", "Set starting indents", 0)
  .parse(process.argv);

if (!program.file) {
  console.error(c.red("please enter a file path to unmask"));
  process.exit(1);
}
console.log(unmaskFile(program.file, program.indents));
