Monthly Archives: October 2019

JavaScript – find all available functions and properties in an object

The following three functions are very useful on inspecting methods and properties in any Javascrip object. Github code: https://github.com/nsclass/describe-javascript-object-methods/blob/master/list-object-methods.js For instance, we can list all available functions and each function’s arguemnts in fs node module. Results

Posted in JavaScript, Programming | Leave a comment

JavaScript – Promise.all getting response

Promise.all guarantee the order of response in input promises so that caller can retrieve the result with array index number.

Posted in JavaScript, Programming | Leave a comment

Unix – Sharp bang to specify a command by using a env

Each script file can use a env command to specify the location of command. Below example will show how a shell can find a python3 command location with a env command.

Posted in Programming | Leave a comment