1
1
mirror of https://github.com/ariya/phantomjs.git synced 2024-08-15 15:50:34 +03:00

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
This commit is contained in:
Ariya Hidayat 2012-03-15 01:33:27 -07:00
parent 756d0d3166
commit 26b28d7842

10
examples/printenv.js Normal file
View File

@ -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();