Skip to content

Remove buffer.inspect #239

Closed
Closed

Description

@feross

It has been deprecated, as per @goto-bus-stop's comment here: #204

Activity

  1. fanatid commented on Sep 17, 2019

    @fanatid
    Contributor

    Any plans about this issue?

    • left both methods now
    • remove buffer.inspect
    • define buffer.inspect only if Symbol util.inspect.custom undefined
    • something else?
  2. goto-bus-stop commented on Sep 17, 2019

    @goto-bus-stop
    Contributor

    I mentioned in the PR that the util shim would start using the symbol, but I think that didn't actually happen yet as there was another big effort to add util.types there and the inspect symbol fell by the wayside. I will work on adding that ASAP. Until then it would be best to keep both around for compatibility reasons.

    IMHO Buffer.prototype.inspect() isn't really in anyone's way so if I were a buffer maintainer i would opt to keep it around for a long time, avoiding a major bump which would have some ecosystem impact, but that's not my decision to make :)

    e; it's worth noting that it also still exists in Node.js. The deprecation is docs-only at the moment, so people are not even seeing deprecation warnings for it yet in the console. Until Node.js has shown deprecation warnings for a good while, I would strongly prefer the old inspect() method to stay functional.

  3. feross commented on Sep 18, 2019

    @feross
    OwnerAuthor

    @goto-bus-stop Thanks for all that context. This package aims for 1-to-1 functionality compatibility with Node.js, so if it's not removed from Node.js LTS yet, then we should keep it here. I'll close this now.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions