diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2018-12-20 17:35:40 +0100 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2018-12-27 22:34:47 +0100 |
commit | 5ac30c99a9cc92f563655709d61e47729d441f62 (patch) | |
tree | c6dfa331576d8a0709cee35570d86fba6ffd25e9 /lib/util.js | |
parent | d385e2cc5a85e150538fd1f41087db9b38943c49 (diff) | |
download | android-node-v8-5ac30c99a9cc92f563655709d61e47729d441f62.tar.gz android-node-v8-5ac30c99a9cc92f563655709d61e47729d441f62.tar.bz2 android-node-v8-5ac30c99a9cc92f563655709d61e47729d441f62.zip |
lib: expose all type checks from the internal types module
Combine all type checks on the internal types module and do not use
the types binding anywhere else anymore. This makes sure all of those
checks exist when required.
PR-URL: https://github.com/nodejs/node/pull/25149
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Diffstat (limited to 'lib/util.js')
-rw-r--r-- | lib/util.js | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/util.js b/lib/util.js index f48d93d124..1eaf958c39 100644 --- a/lib/util.js +++ b/lib/util.js @@ -31,13 +31,7 @@ const { const { validateNumber } = require('internal/validators'); const { TextDecoder, TextEncoder } = require('internal/encoding'); const { isBuffer } = require('buffer').Buffer; - -const types = internalBinding('types'); -Object.assign(types, require('internal/util/types')); -const { - isRegExp, - isDate, -} = types; +const types = require('internal/util/types'); const { deprecate, @@ -432,9 +426,9 @@ module.exports = exports = { isString, isSymbol, isUndefined, - isRegExp, + isRegExp: types.isRegExp, isObject, - isDate, + isDate: types.isDate, isError(e) { return objectToString(e) === '[object Error]' || e instanceof Error; }, |