# is-uglified

> Detect if a javascript file is uglified

Latest version **1.0.2** (published 2019-12-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-uglified
pnpm add is-uglified
yarn add is-uglified
bun add is-uglified
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2019-12-01 |
| First published | 2019-12-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 3.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | surgesoft@gmail.com |
| Maintainers | raohai |

## Links

- npm: https://www.npmjs.com/package/is-uglified
- npm.io page: https://npm.io/package/is-uglified

## Dependencies (3)

- [acorn](https://npm.io/package/acorn.md) ^7.1.0
- [acorn-walk](https://npm.io/package/acorn-walk.md) ^7.0.0
- [simple-statistics](https://npm.io/package/simple-statistics.md) ^7.0.7

## Recent versions

- 1.0.2 (latest) — 2019-12-01
- 1.0.0 — 2019-12-01

## 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](https://unpkg.com/react@16.7.0/umd/react.development.js) is `10.8` 
* The `mean identify length` of the minimized version [react.production.js](https://unpkg.com/react@16.7.0/umd/react.production.min.js) is `1.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

```javascript
import isUglified from 'is-uglified';

isUglified('local_file_to_detect.js') // get result;
```

---
_Source: https://npm.io/package/is-uglified · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
