mirror of
https://github.com/ariya/phantomjs.git
synced 2024-09-11 04:46:09 +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:
parent
756d0d3166
commit
26b28d7842
10
examples/printenv.js
Normal file
10
examples/printenv.js
Normal 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();
|
Loading…
Reference in New Issue
Block a user