Console like in node.js, port node.js util module (contains functions… by MrVoltz · Pull Request #286 · walterhiggins/ScriptCraft · GitHub
Skip to content

Console like in node.js, port node.js util module (contains functions… - #286

Open
MrVoltz wants to merge 1 commit into
walterhiggins:masterfrom
MrVoltz:nodeLikeConsole
Open

MrVoltz wants to merge 1 commit into
walterhiggins:masterfrom
MrVoltz:nodeLikeConsole

Conversation

@MrVoltz

@MrVoltz MrVoltz commented Jan 1, 2016

Copy link
Copy Markdown
Contributor

… required for console to work)

You can't argue that node.js (or devtools) console works better than ScriptCraft's.

Main differences:

  • functions support multiple arguments console.log("a", 1, "b") -> a 1 b
  • better handling of objects console.log({}) -> {} instead of [object Object]

No backwards compatibility breaks. As an additional value, developers can use other functions available in util.js module, like util.inherits() or type checking functions.

@walterhiggins

Copy link
Copy Markdown
Owner

@djMax

djMax commented Dec 17, 2016

Copy link
Copy Markdown

The copyright in there is pretty clearly open to this usage though... What gives you pause?

@demipixel

Copy link
Copy Markdown

This is over a year old now. I'd rather have this than another year of waiting for a PR of a cleaner way, would prevent testing requiring multiple console.logs for every variable and JSON.stringify()ing all of them.

@TonyGravagno

Copy link
Copy Markdown
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants