Skip to content

Instantly share code, notes, and snippets.

@tingstad
Created January 21, 2020 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tingstad/0cdafb1adf5a5ed71be1248e130da2c1 to your computer and use it in GitHub Desktop.
Save tingstad/0cdafb1adf5a5ed71be1248e130da2c1 to your computer and use it in GitHub Desktop.
console.log(
JSON.stringify(
JSON.parse(require('fs').readFileSync(0, 'utf-8')),
null,
(args =>
(argsLength =>
argsLength > 1
? (arg =>
(num => Number.isInteger(num) ? num : arg
)(Number(arg))
)(args[argsLength - 1])
: 4
)(args.length)
)(process.argv)
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment