is-uglified
v1.0.2
Published
Detect if a javascript file is uglified
Downloads
11
Readme
is-uglified
Detect if a javascript file is uglified
How?
We use Mean Identify Length
measure. For one handwriting javascript file, the average length of identifiers MUST
bigger than it of an uglified one.
E.g.,
- The
mean identify length
of react.development.js is10.8
- The
mean identify length
of the minimized version react.production.js is1.7
, which is much more smaller than before.
We set the threshold value default to 3
, detecting whether a javascript file is uglified.
Installing
npm install is-uglified
Usage
import isUglified from 'is-uglified';
isUglified('local_file_to_detect.js') // get result;