Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

util: add util.inspect compact option #17576

Closed
wants to merge 7 commits into from

Commits on Dec 10, 2017

  1. util: add util.inspect structured option

    The current default formatting is not ideal and this improves
    the situation by formatting the output more intuitiv.
    
    1) All object keys are now indented by 2 characters instead of
       sometimes 2 and sometimes 3 characters.
    2) Each object key will now use an individual line instead of
       sharing a line potentially with multiple object keys.
    3) Long strings will now be split into multiple lines in case
       they exceed the "lineBreak" option length (including the
       current indentation).
    4) Opening braces are now directly behind a object property
       instead of using a new line.
    BridgeAR committed Dec 10, 2017
    Configuration menu
    Copy the full SHA
    d76d28d View commit details
    Browse the repository at this point in the history
  2. util: rename util.inspect argument

    util.inspect can actually receive any property and the description
    was wrong so far. This fixes it by renaming the argument to
    value and also updating the description.
    BridgeAR committed Dec 10, 2017
    Configuration menu
    Copy the full SHA
    ecf019e View commit details
    Browse the repository at this point in the history
  3. util: fix custom inspect description

    Using a custom inspect function on the inspected object is
    deprecated. Remove the reference from the option description
    to make sure the user will read about the deprecation in the
    more detailed description.
    BridgeAR committed Dec 10, 2017
    Configuration menu
    Copy the full SHA
    843a5d5 View commit details
    Browse the repository at this point in the history
  4. util: switch inspect "base" order

    In case the structured option is used, it will now print
    
      "[Function: foo] {\n  property: 'data'\n}"
    
    instead of
    
      "{ [Function: foo]\n  property: 'data'\n}"
    BridgeAR committed Dec 10, 2017
    Configuration menu
    Copy the full SHA
    cd5be74 View commit details
    Browse the repository at this point in the history

Commits on Dec 17, 2017

  1. Configuration menu
    Copy the full SHA
    e2792d5 View commit details
    Browse the repository at this point in the history
  2. squash - add another test

    BridgeAR committed Dec 17, 2017
    Configuration menu
    Copy the full SHA
    e31fd8a View commit details
    Browse the repository at this point in the history
  3. squash - address comment

    BridgeAR committed Dec 17, 2017
    Configuration menu
    Copy the full SHA
    684b992 View commit details
    Browse the repository at this point in the history