Struct might_be_minified::Analysis [] [src]

pub struct Analysis { /* fields omitted */ }

Provides an analysis of a source file

Methods

impl Analysis
[src]

Returns the whitespace to code ratio

This is a useful metric to decide on if a file is likely minified code or regular JavaScript code.

The median identifier length

This returns the median length for an identifier (name) in the JS source code.

The longest code line length

This returns the length of the longest line. This includes comments and other things.

The "shape" of the code file

This essentially is height / width of the file where the height is the actual number of lines however the width is the p75 line length.

The proability of the file being minified

Effectively 1.0 (which is unlikely to be reached) means the file is definitely minified. Anything above 0.5 is considered likely to be minified.

Indicates that the file is likely minified