src/index.ts   A
last analyzed

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 20
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 16
mnd 0
bc 0
fnc 1
dl 0
loc 20
ccs 4
cts 4
cp 1
rs 10
bpm 0
cpm 1
noi 0
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A index.ts ➔ sort 0 8 1
1
import { SortOptions } from './types';
2 1
import { sortRecursively } from './core';
3
4 1
export function sort<T>(
5
  data: T,
6
  ascending = true,
7
  sortPrimitiveArrays = false
8
): T {
9 82
  const options: SortOptions = { ascending, sortPrimitiveArrays };
10 82
  return sortRecursively(data, options);
11
}
12
13
// Re-export types for convenience
14
export type {
15
  SortOptions,
16
  ObjectType,
17
  SortedEntry,
18
  NonSortableType,
19
} from './types';
20