Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var os = require("os");
- var os_func_list = Object.keys(os);
- os_func_list.forEach(function(element) {
- // I know this is not working
- // var func = "os." + element + "()";
- // console.log(func);
- }, this);
- var os = require("os");
- var os_func_list = Object.keys(os);
- os_func_list.forEach(function(element) {
- var func = os[element];
- func()
- });
- os_func_list.forEach(function(element) {
- os[element](/*...args here if desired...*/);
- }, this);
- os_func_list.forEach(function(element) {
- os[element].call(/*...this argument here...*/, /*...args here if desired...*/);
- }, this);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement