browserify / node-util

node.js util module as a module
MIT License
247 stars 88 forks source link

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

Open ExE-Boss opened 4 years ago

ExE-Boss commented 4 years ago

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:

ljharb commented 4 years ago

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

ExE-Boss commented 3 years ago

@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