firebase / geofire-js
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 50 units with 589 lines of code in units (71.4% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 8 medium size units (235 lines of code)
    • 15 small units (215 lines of code)
    • 27 very small units (139 lines of code)
0% | 0% | 39% | 36% | 23%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 0% | 40% | 37% | 22%
js0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
geofire/src0% | 0% | 45% | 25% | 28%
geofire-common/src0% | 0% | 31% | 56% | 11%
geofire-common0% | 0% | 0% | 0% | 100%
geofire0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
export function geohashForLocation()
in packages/geofire-common/src/index.ts
47 12 2
private _listenForNewGeohashes()
in packages/geofire/src/GeoQuery.ts
42 5 0
public set()
in packages/geofire/src/GeoFire.ts
27 6 2
export function validateCriteria()
in packages/geofire/src/GeoQuery.ts
25 15 2
private _cleanUpCurrentGeohashesQueried()
in packages/geofire/src/GeoQuery.ts
25 5 0
public on()
in packages/geofire/src/GeoQuery.ts
24 8 2
export function validateLocation()
in packages/geofire-common/src/index.ts
23 10 1
public updateCriteria()
in packages/geofire/src/GeoQuery.ts
22 9 1
export function boundingBoxCoordinates()
in packages/geofire-common/src/index.ts
20 1 2
export function geohashQuery()
in packages/geofire-common/src/index.ts
19 3 2
export function validateKey()
in packages/geofire-common/src/index.ts
18 7 1
private _updateLocation()
in packages/geofire/src/GeoQuery.ts
18 9 2
export function validateGeohash()
in packages/geofire-common/src/index.ts
17 6 1
export function geohashQueryBounds()
in packages/geofire-common/src/index.ts
15 3 2
constructor()
in packages/geofire/src/GeoQuery.ts
14 3 2
export function metersToLongitudeDegrees()
in packages/geofire-common/src/index.ts
12 3 2
export function wrapLongitude()
in packages/geofire-common/src/index.ts
12 3 1
export function distanceBetween()
in packages/geofire-common/src/index.ts
12 1 2
public cancel()
in packages/geofire/src/GeoQuery.ts
12 1 0
private _childRemovedCallback()
in packages/geofire/src/GeoQuery.ts
12 5 1