Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

printenv.js: New example to show system.env.

This is very similar to Unix common 'printenv'.

http://code.google.com/p/phantomjs/issues/detail?id=271
  • Loading branch information...
commit 26b28d7842fc5e178918cc7ba3301a0132aae9ea 1 parent 756d0d3
@ariya authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 examples/printenv.js
View
10 examples/printenv.js
@@ -0,0 +1,10 @@
+var system = require('system'),
+ env = system.env,
+ key;
+
+for (key in env) {
+ if (env.hasOwnProperty(key)) {
+ console.log(key + '=' + env[key]);
+ }
+}
+phantom.exit();
Please sign in to comment.
Something went wrong with that request. Please try again.