From 3c653a0342204eae4943cfdef432e9b01dafc0d0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 12 May 2023 15:55:57 +0200 Subject: [PATCH 1/1] docs: add comment on utils helpers MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/utils.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/utils.ts b/src/utils.ts index 176d2c4f..164a2aca 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -36,6 +36,12 @@ export const median = (dataSet: number[]): number => { ) } +/** + * Is the given object a plain object? + * + * @param obj - The object to check. + * @returns `true` if the given object is a plain object, `false` otherwise. + */ export const isPlainObject = (obj: unknown): boolean => typeof obj === 'object' && obj !== null && -- 2.34.1