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

buffer: add tests for Buffer.prototype.inspect() and refactor #11600

Closed
wants to merge 2 commits into from

Commits on Mar 2, 2017

  1. test: add test-buffer-prototype-inspect

    lib/buffer.js defines Buffer.prototype.inspect() to override how buffers
    are presented by util.inspect(). Add basic tests for it.
    Trott committed Mar 2, 2017
    Configuration menu
    Copy the full SHA
    48583c4 View commit details
    Browse the repository at this point in the history
  2. buffer: refactor Buffer.prototype.inspect()

    Replace toString().match().join() with toString().replace().trim(). This
    enables the elimination of a length check becuase replace() will return
    empty string if Buffer is empty whereas match() returns null.
    Trott committed Mar 2, 2017
    Configuration menu
    Copy the full SHA
    03b1a2d View commit details
    Browse the repository at this point in the history