trymodule icon indicating copy to clipboard operation
trymodule copied to clipboard

Defining an empty variable name makes a module inaccessible

Open shockey opened this issue 9 years ago • 1 comments

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?

shockey avatar Aug 22 '16 08:08 shockey

Agreed, should default to the modules name as if you omitted the equal sign completely.

victorb avatar Jan 21 '17 09:01 victorb