• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rogerpadilla / uql / 24317085364

12 Apr 2026 09:42PM UTC coverage: 94.786% (-0.09%) from 94.874%
24317085364

push

github

rogerpadilla
chore: remove changelog and update gitHead in package.json

3088 of 3431 branches covered (90.0%)

Branch coverage included in aggregate %.

5420 of 5545 relevant lines covered (97.75%)

353.61 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

91.67
/packages/uql-orm/src/util/object.util.ts
1
import type { FieldKey, FieldOptions } from '../type/index.js';
2

3
export function clone<T>(value: T): T {
4
  if (typeof value !== 'object' || value === null) {
1,150!
5
    return value;
×
6
  }
7
  if (Array.isArray(value)) {
1,150✔
8
    return value.map((it) => clone(it)) as unknown as T;
601✔
9
  }
10
  return { ...value };
728✔
11
}
12

13
export function hasKeys(obj: unknown): boolean {
14
  if (typeof obj !== 'object' || obj === null) return false;
6,711✔
15
  for (const _ in obj) return true;
6,660✔
16
  return false;
5,626✔
17
}
18

19
export function getKeys<T extends object>(obj: T): (keyof T & string)[] {
20
  return obj ? (Object.keys(obj) as (keyof T & string)[]) : [];
8,246✔
21
}
22

23
export function getFieldKeys<E>(
24
  fields: {
25
    [K in FieldKey<E>]?: FieldOptions;
26
  },
27
): FieldKey<E>[] {
28
  return getKeys(fields).filter((field) => fields[field]!.eager ?? true);
1,213✔
29
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc