diff --git a/src/utils/hasOnlyOneValueForKey.ts b/src/utils/hasOnlyOneValueForKey.ts index 4471c27..a926280 100644 --- a/src/utils/hasOnlyOneValueForKey.ts +++ b/src/utils/hasOnlyOneValueForKey.ts @@ -1,7 +1,10 @@ // Tremor Raw hasOnlyOneValueForKey [v0.1.0] -export function hasOnlyOneValueForKey(array: any[], keyToCheck: string) { - const val = [] +export function hasOnlyOneValueForKey( + array: any[], + keyToCheck: string, +): boolean { + const val: any[] = [] for (const obj of array) { if (Object.prototype.hasOwnProperty.call(obj, keyToCheck)) {