The option name should be `directory` to be consistent with the
returned result. It should also allow environment variable
overrides.
This also adds documentation for the new options and improves it.
PR-URL: https://github.com/nodejs/node/pull/59931
Reviewed-By: Aditi Singh <aditisingh1400@gmail.com>