aws / aws-sdk-js-crypto-helpers
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 38 units with 381 lines of code in units (21.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 2 medium size units (60 lines of code)
    • 11 small units (164 lines of code)
    • 25 very small units (157 lines of code)
0% | 0% | 15% | 43% | 41%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 0% | 77% | 22% | 0%
ts0% | 0% | 6% | 45% | 47%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT0% | 0% | 77% | 22% | 0%
packages/supports-web-crypto0% | 0% | 47% | 0% | 52%
packages/sha1-browser0% | 0% | 0% | 77% | 22%
packages/sha256-browser0% | 0% | 0% | 77% | 22%
packages/sha256-js0% | 0% | 0% | 90% | 9%
packages/util0% | 0% | 0% | 46% | 53%
packages/random-source-node0% | 0% | 0% | 100% | 0%
packages/random-source-browser0% | 0% | 0% | 0% | 100%
packages/sha256-universal0% | 0% | 0% | 0% | 100%
packages/ie11-detection0% | 0% | 0% | 0% | 100%
packages/crc32c0% | 0% | 0% | 0% | 100%
packages/crc320% | 0% | 0% | 0% | 100%
packages/random-source-universal0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
module.exports = function()
in wallaby.conf.js
37 2 1
export async function supportsZeroByteGCM()
in packages/supports-web-crypto/src/supportsWebCrypto.ts
23 3 1
function getKeyPromise()
in packages/sha1-browser/src/ie11Sha1.ts
20 2 1
function getKeyPromise()
in packages/sha256-browser/src/ie11Sha256.ts
20 2 1
constructor()
in packages/sha256-js/src/jsSha256.ts
17 4 1
constructor()
in packages/sha1-browser/src/webCryptoSha1.ts
16 2 1
constructor()
in packages/sha256-browser/src/webCryptoSha256.ts
16 2 1
constructor()
in packages/sha1-browser/src/ie11Sha1.ts
15 2 1
constructor()
in packages/sha256-browser/src/ie11Sha256.ts
15 2 1
export function uint32ArrayFrom()
in packages/util/src/uint32ArrayFrom.ts
12 3 1
function bufferFromSecret()
in packages/sha256-js/src/jsSha256.ts
11 2 1
export function randomValues()
in packages/random-source-node/src/index.ts
11 2 1
11 3 1
export function supportsWebCrypto()
in packages/supports-web-crypto/src/supportsWebCrypto.ts
10 3 1
export function isMsWindow()
in packages/ie11-detection/src/MsWindow.ts
10 3 1
export function randomValues()
in packages/random-source-browser/src/index.ts
9 3 1
export function randomValuesOnly()
in packages/random-source-browser/src/index.ts
9 3 1
constructor()
in packages/sha1-browser/src/crossPlatformSha1.ts
9 3 1
constructor()
in packages/sha256-browser/src/crossPlatformSha256.ts
9 3 1
export function supportsSubtleCrypto()
in packages/supports-web-crypto/src/supportsWebCrypto.ts
8 2 1