Skip to content

util.inspect() options maxArrayLength, breakLength #15

Open
@mk-pmb

Description

@mk-pmb

Does anyone know a browser-compatible inspect module that supports them, or can add support for them here?

Using [email protected], Node.js v6.9.4, npm v3.10.10, Ubuntu 14.04.5 LTS trusty:

var nums = [ 1, 2, 3, 4, 5 ],
  opts = { depth: null, maxArrayLength: 2, breakLength: 2 };
console.log("node:", require("util").inspect(nums, opts));
console.log("util:", require("util/util.js").inspect(nums, opts));

prints:

node: [ 1,
  2,
  ... 3 more items ]
util: [ 1, 2, 3, 4, 5 ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions