Skip to content

Instantly share code, notes, and snippets.

@ArnaudRinquin
Last active December 2, 2015 17:13
Show Gist options
  • Save ArnaudRinquin/0eca15ec4af3474bdaea to your computer and use it in GitHub Desktop.
Save ArnaudRinquin/0eca15ec4af3474bdaea to your computer and use it in GitHub Desktop.
envtojson

Usage: envtojson [indent]

EDIT: I created the package ¯\_(ツ)_/¯

#!/usr/bin/env node
var firstArg = process.argv[2];
var indent = isNaN(firstArg) ? 0 : parseInt(firstArg);
process.stdout.write(JSON.stringify(process.env, null, indent));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment