Created
February 8, 2018 22:47
-
-
Save en0/7ae8740243612e519d63c2a3533a4fc8 to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/env node | |
const fs = require("fs"); | |
const path = process.argv.pop(); | |
const code = fs.readFileSync(path, "utf8"); | |
const lines = code.split("\n"); | |
const ret = JSON.stringify(lines, null, 2); | |
process.stdout.write(ret); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment