mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 15:25:07 +01:00
Simplify type checking of plainObject, buffer (#2252)
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user