browserify / browserify/node-util

util.inspect() options maxArrayLength, breakLength

Open
#15 0 comments 4 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
255
Forks
92
PR merge metrics
No merged PRs in 30d

Description

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

Using util@0.10.3, Node.js v6.9.4, npm v3.10.10, Ubuntu 14.04.5 LTS trusty:

```javascript
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:

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

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with util/util.js and reproduce the issue using the supplied inspect() example, comparing its output with Node's util.inspect(). Add support for maxArrayLength and breakLength, then verify that the browser-compatible module produces the expected truncated and wrapped output.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.