node-util icon indicating copy to clipboard operation
node-util copied to clipboard

feat: use a global symbol for `util.promisify.custom`

Open ExE-Boss opened this issue 5 years ago • 2 comments

Define util.promisify.custom as:

Symbol.for("nodejs.util.inspect.custom")

rather than as:

Symbol("util.inspect.custom")

This allows custom promisify wrappers to easily/safely be defined in non‑Node.js environments.

See also:

ExE-Boss avatar Feb 08 '20 14:02 ExE-Boss

This shouldn’t land until the node one has landed.

ljharb avatar Feb 08 '20 19:02 ljharb

@goto-bus-stop This is now shipping in Node since v12.16.2/v13.12.0.

Refs: https://nodejs.org/api/util.html#util_util_promisify_custom

ExE-Boss avatar Nov 26 '20 07:11 ExE-Boss