# rut-helpers

> Validate and format strings to RUT (Chilean DNI)

Latest version **0.1.1** (published 2016-12-28) · MIT license · 4.7K weekly downloads

## Install

```sh
npm install rut-helpers
pnpm add rut-helpers
yarn add rut-helpers
bun add rut-helpers
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2016-12-28 |
| First published | 2016-12-24 |
| Weekly downloads | 4.7K |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 23 |
| Author | Platanus |
| Maintainers | platanus |

## Links

- npm: https://www.npmjs.com/package/rut-helpers
- Repository: https://github.com/platanus/rut-helpers
- Homepage: https://github.com/platanus/rut-helpers#readme
- Issues: https://github.com/platanus/rut-helpers/issues
- npm.io page: https://npm.io/package/rut-helpers

## Recent versions

- 0.1.1 (latest) — 2016-12-28
- 0.1.0 — 2016-12-24

## README

# Rut Helpers

[![Build Status](https://travis-ci.org/platanus/rut-helpers.svg?branch=master)](https://travis-ci.org/platanus/rut-helpers)

A small collection of helpers to validate and format strings to RUT (Chilean DNI).

## Installation
```bash
npm install rut-helpers --save
```

or with Yarn

```bash
yarn add rut-helpers
```

## Use

```javascript
// You can import everything
import * as rutHelpers from 'rut-helpers';

// Or import only what you need.
import { rutValidate, rutFormat } from 'rut-helpers';

// Or with node
var rutHelpers = require('rut-helpers');
```

### Validating RUTs
```javascript

rutHelpers.rutValidate('THIS IS A RUT');
// false

rutHelpers.rutValidate('7.618.285-K');
// true

rutHelpers.rutValidate('7618285K');
// true
```

### Formatting strings as RUTs

```javascript
rutHelpers.rutFormat('7618285K');
// 7.618.285-K
```

### Cleaning RUTs

```javascript
rutHelpers.rutClean('7.618.285-K');
// 7618285K
```

## Contributing

If you want to add functionality please go to
the [contributing](/docs/CONTRIBUTING.md)

## Credits

Thank you [contributors](https://github.com/platanus/rut-helpers/graphs/contributors)!

<img src="http://platan.us/gravatar_with_text.png" alt="Platanus" width="250"/>

rut-helpers is maintained by [platanus](http://platan.us).

## License

Potassium is © 2017 platanus, spa. It is free software and may be redistributed under the terms specified in the LICENSE file.

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