What is the problem this feature will solve?
Node.js developers, especially those coming from a Python background, may find it less intuitive to quickly explore object properties, available methods, and to access built-in help within the REPL environment.
What is the feature you are proposing to solve the problem?
Implement the following features within the Node.js REPL:
dir(object):
When an object is passed to dir(), provide a structured listing of its properties, methods, and nested structures if applicable. This allows for quick at-a-glance comprehension of an object's composition.
Example: dir(process) might output a list of process-related properties and methods.
^ well, we can do with Object.keys and similar, but we can format the output better for readability if we decide to go with dir
help(objectOrModule):
Attempt to retrieve contextual help based on the provided input:
If an object is passed: Display either internal docstrings (if defined within the object) or type/constructor information.
If a module name is passed: Try to fetch relevant documentation from the official Node.js API reference if available.
Example: help(fs) might link to or display a portion of the file system module's documentation.
What alternatives have you considered?
No response
What is the problem this feature will solve?
Node.js developers, especially those coming from a Python background, may find it less intuitive to quickly explore object properties, available methods, and to access built-in help within the REPL environment.
What is the feature you are proposing to solve the problem?
Implement the following features within the Node.js REPL:
dir(object):When an object is passed to
dir(), provide a structured listing of its properties, methods, and nested structures if applicable. This allows for quick at-a-glance comprehension of an object's composition.Example:
dir(process)might output a list of process-related properties and methods.^ well, we can do with
Object.keysand similar, but we can format the output better for readability if we decide to go withdirhelp(objectOrModule):Attempt to retrieve contextual help based on the provided input:
If an object is passed: Display either internal docstrings (if defined within the object) or type/constructor information.
If a module name is passed: Try to fetch relevant documentation from the official Node.js API reference if available.
Example:
help(fs)might link to or display a portion of the file system module's documentation.What alternatives have you considered?
No response