util: use a global symbol for `util.promisify.custom`
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.
Fixes: https://github.com/nodejs/node/issues/31647
PR-URL: https://github.com/nodejs/node/pull/31672
Reviewed-By:
Anna Henningsen <anna@addaleax.net>
Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
Reviewed-By:
Gus Caplan <me@gus.host>
Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de>
parent
7f44d2ce
Please register or sign in to comment