aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2017-05-12 08:37:32 -0700
committerJames M Snell <jasnell@gmail.com>2017-05-15 08:26:57 -0700
commitef16319effe396622666268cd8100ad8d586c4ee (patch)
treeb6b59e019e0e4f8a98a64786d4013c1517795e4c /lib
parente896898deac171c94de6466948686fbc280663b2 (diff)
downloadandroid-node-v8-ef16319effe396622666268cd8100ad8d586c4ee.tar.gz
android-node-v8-ef16319effe396622666268cd8100ad8d586c4ee.tar.bz2
android-node-v8-ef16319effe396622666268cd8100ad8d586c4ee.zip
util: fixup internal util exports
util.promisify landed without using the module.exports = {} pattern. This fixes it up for consistency PR-URL: https://github.com/nodejs/node/pull/12998 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/internal/util.js49
1 files changed, 25 insertions, 24 deletions
diff --git a/lib/internal/util.js b/lib/internal/util.js
index 4dfcf81837..a77089b683 100644
--- a/lib/internal/util.js
+++ b/lib/internal/util.js
@@ -198,28 +198,6 @@ function getConstructorOf(obj) {
return null;
}
-module.exports = exports = {
- assertCrypto,
- cachedResult,
- convertToValidSignal,
- createClassWrapper,
- decorateErrorStack,
- deprecate,
- filterDuplicateStrings,
- getConstructorOf,
- isError,
- normalizeEncoding,
- objectToString,
-
- // Symbol used to provide a custom inspect function for an object as an
- // alternative to using 'inspect'
- customInspectSymbol: Symbol('util.inspect.custom'),
-
- // Used by the buffer module to capture an internal reference to the
- // default isEncoding implementation, just in case userland overrides it.
- kIsEncodingSymbol: Symbol('node.isEncoding')
-};
-
const kCustomPromisifiedSymbol = Symbol('util.promisify.custom');
const kCustomPromisifyArgsSymbol = Symbol('customPromisifyArgs');
@@ -276,5 +254,28 @@ function promisify(orig) {
promisify.custom = kCustomPromisifiedSymbol;
-exports.promisify = promisify;
-exports.customPromisifyArgs = kCustomPromisifyArgsSymbol;
+module.exports = {
+ assertCrypto,
+ cachedResult,
+ convertToValidSignal,
+ createClassWrapper,
+ decorateErrorStack,
+ deprecate,
+ filterDuplicateStrings,
+ getConstructorOf,
+ isError,
+ normalizeEncoding,
+ objectToString,
+ promisify,
+
+ // Symbol used to customize promisify conversion
+ customPromisifyArgs: kCustomPromisifyArgsSymbol,
+
+ // Symbol used to provide a custom inspect function for an object as an
+ // alternative to using 'inspect'
+ customInspectSymbol: Symbol('util.inspect.custom'),
+
+ // Used by the buffer module to capture an internal reference to the
+ // default isEncoding implementation, just in case userland overrides it.
+ kIsEncodingSymbol: Symbol('node.isEncoding')
+};