# dejunk.js

> A JS port of academia-edu/dejunk. Utils for detecting keyboard mash and other junk in your data.

Latest version **0.4.4** (published 2017-05-26) · AFL-2.0 license · 0 weekly downloads

## Install

```sh
npm install dejunk.js
pnpm add dejunk.js
yarn add dejunk.js
bun add dejunk.js
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.4 |
| Published | 2017-05-26 |
| First published | 2017-05-09 |
| Weekly downloads | 0 |
| License | AFL-2.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Pat Ho |
| Maintainers | pjho |

## Links

- npm: https://www.npmjs.com/package/dejunk.js
- Repository: https://github.com/pjho/dejunk.js
- Homepage: https://github.com/pjho/dejunk.js#readme
- Issues: https://github.com/pjho/dejunk.js/issues
- npm.io page: https://npm.io/package/dejunk.js

## Dependencies (2)

- [diacritics](https://npm.io/package/diacritics.md) ^1.3.0
- [lodash.zip](https://npm.io/package/lodash.zip.md) ^4.2.0

## Recent versions

- 0.4.4 (latest) — 2017-05-26
- 0.1.1 (beta) — 2017-05-09
- 0.4.3 — 2017-05-26
- 0.4.2 — 2017-05-26
- 0.4.1 — 2017-05-25
- 0.4.0 — 2017-05-16
- 0.3.0 — 2017-05-14
- 0.2.1 — 2017-05-13
- 0.2.0 — 2017-05-13
- 0.1.3 — 2017-05-10
- 0.1.2 — 2017-05-09
- 0.1.0 — 2017-05-09

## README

A modified JS port of [academia-edu/dejunk](https://github.com/academia-edu/dejunk).

Detect keyboard mashing and other junk in your data.

``` javascript

var deJunk = require("dejunk.js")

isJunk('asd asd das as d'); // true


// if you need more info pass true as second parameter
var returnString = true;

deJunk.isJunk('asd asd das as d', returnString); // "asdf_row"

deJunk.isJunk('Hello', returnString); // false


deJunk.hasJunk('There once was a Moooooooooose with a big Kaboose @%@#**@(@)'); // false (20% junk)
deJunk.hasJunk('There aslkdjaslkdj was a Moooooose with a big Kaboose @%@#**@(@)'); // true (30%)

// or set the threshold yourself in the second param. Float representing % between 0 & 1
deJunk.hasJunk('There once was a Moooooooooose with a big Kaboose @%@#**@(@)', 0.1); // true (10% junk)


```

#### To do
- memoize intensive functions
- make whitelisting easier
- improve docs

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