From 260d2e6df285501c69e0d4f6d29fcd4b5266ed54 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sat, 13 Jan 2024 20:41:24 +0100 Subject: [PATCH] refactor: cleanup isPlainObject arguments namespace MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/utils.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/utils.ts b/src/utils.ts index d74cfbfd..d15f63c5 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -118,17 +118,17 @@ export const round = (num: number, scale = 2): number => { } /** - * Is the given object a plain object? + * Is the given value a plain object? * - * @param obj - The object to check. - * @returns `true` if the given object is a plain object, `false` otherwise. + * @param value - The value to check. + * @returns `true` if the given value is a plain object, `false` otherwise. * @internal */ -export const isPlainObject = (obj: unknown): obj is object => - typeof obj === 'object' && - obj !== null && - obj.constructor === Object && - Object.prototype.toString.call(obj) === '[object Object]' +export const isPlainObject = (value: unknown): value is object => + typeof value === 'object' && + value !== null && + value.constructor === Object && + Object.prototype.toString.call(value) === '[object Object]' /** * Detects whether the given value is a kill behavior or not. -- 2.34.1