🔧 Don’t use deprecated util.is* methods

This commit is contained in:
Felix Rieseberg 2017-11-20 09:40:47 -08:00
parent fa37d49fb6
commit 71b8eaf085

View file

@ -460,7 +460,7 @@
options = {
encoding: null
}
} else if (util.isString(options)) {
} else if (typeof options === 'string') {
options = {
encoding: options
}
@ -468,7 +468,7 @@
options = {
encoding: null
}
} else if (!util.isObject(options)) {
} else if (typeof options !== 'object') {
throw new TypeError('Bad arguments')
}
const {encoding} = options
@ -531,11 +531,11 @@
options = {
encoding: null
}
} else if (util.isString(options)) {
} else if (typeof options === 'string') {
options = {
encoding: options
}
} else if (!util.isObject(options)) {
} else if (typeof options !== 'object') {
throw new TypeError('Bad arguments')
}
const {encoding} = options