From 9431029917dcbb58f1a9302d7da090a5cf358973 Mon Sep 17 00:00:00 2001 From: Mikhail Bodrov Date: Wed, 10 Jun 2020 22:54:01 +0300 Subject: [PATCH] Simplify type checking of plainObject, buffer (#2252) --- lib/is.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/is.js b/lib/is.js index 43e052c9..762d8452 100644 --- a/lib/is.js +++ b/lib/is.js @@ -21,7 +21,7 @@ const object = function (val) { * @private */ const plainObject = function (val) { - return object(val) && Object.prototype.toString.call(val) === '[object Object]'; + return Object.prototype.toString.call(val) === '[object Object]'; }; /** @@ -45,7 +45,7 @@ const bool = function (val) { * @private */ const buffer = function (val) { - return object(val) && val instanceof Buffer; + return val instanceof Buffer; }; /**