microsoft / satcheljs
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 62 units with 633 lines of code in units (67.8% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (90 lines of code)
    • 3 medium size units (94 lines of code)
    • 18 small units (246 lines of code)
    • 40 very small units (203 lines of code)
0% | 14% | 14% | 38% | 32%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 14% | 14% | 38% | 32%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/legacy0% | 30% | 11% | 30% | 27%
src/legacy/react0% | 0% | 45% | 32% | 22%
src/legacy/promise0% | 0% | 34% | 23% | 42%
src0% | 0% | 0% | 53% | 46%
src/legacy/stitch0% | 0% | 0% | 73% | 26%
src/legacy/trace0% | 0% | 0% | 78% | 21%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function spyOnChanges()
in src/legacy/createUndo.ts
90 11 1
export default function reactive()
in src/legacy/react/reactive.ts
39 7 1
function trackUndo()
in src/legacy/createUndo.ts
33 4 2
export function promiseMiddleware()
in src/legacy/promise/promiseMiddleware.ts
22 3 5
20 2 2
16 6 1
function setPropAccessors()
in src/legacy/react/reactive.ts
16 2 2
function wrapInAction()
in src/legacy/promise/actionWrappers.ts
15 3 2
export default function select()
in src/legacy/select.ts
15 3 1
export default function trace()
in src/legacy/trace/trace.ts
15 2 5
14 1 0
13 1 0
function decorateClassMethod()
in src/legacy/action.ts
13 3 5
export default function dispatch()
in src/legacy/dispatch.ts
13 2 4
13 2 2
export function stitch()
in src/legacy/stitch/stitch.ts
13 3 5
export function createSimpleSubscriber()
in src/simpleSubscribers.ts
13 1 1
function createNewFunctionalComponent()
in src/legacy/react/reactive.ts
12 2 2
export function raise()
in src/legacy/stitch/stitch.ts
12 2 2
export function dispatchWithMiddleware()
in src/legacy/legacyApplyMiddleware.ts
11 2 4