trymodule
trymodule copied to clipboard
Defining an empty variable name makes a module inaccessible
Example:
→ trymodule js-yaml=
Gonna start a REPL with packages installed and loaded for you
Couldn't find 'js-yaml' locally, gonna download it now
[email protected] .trymodule/node_modules/js-yaml
├── [email protected]
└── [email protected] ([email protected])
Package 'js-yaml' was loaded and assigned to '' in the current scope
REPL started...
>
This was a typo on my part, and strictly speaking, it isn't a bug... but it definitely would have been a nice user experience for trymodule to have picked up on my mistake and defaulted to the module's name.
Thoughts?
Agreed, should default to the modules name as if you omitted the equal sign completely.