Merged
Conversation
remove useless object.
such as `console.log({ a: 1 })` should be output `'{ a: 1 }'` instead of `'[object Object]'`.
lostfields
reviewed
Nov 25, 2018
| return code.replace(regex, (str, par, name) => { | ||
| try { | ||
| if(require(name)) { | ||
| return name; |
Owner
There was a problem hiding this comment.
I can't mine or this to work. It resolves Debug mode but not Runtime. Think we should go absolute paths all the way.
Alternative is using Object.defineProperty in repl.context with a value of require(name)
Contributor
Author
There was a problem hiding this comment.
if(require(name)) {I think that this line is using to test the module whether is Node.js api or not. I pull request #15 to fix cannot import Node.js api after removing this line.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
basePath: if cannot find third party module or user module, may has wrong basePath;node version: if cannot use an api of Node.js, may the version of api is too high for VSCode's Node.js