# uid-ranger

> Parsing IMAP UID ranges

Latest version **1.2.0** (published 2014-09-04) · Standard 3-clause BSD license · 0 weekly downloads

## Install

```sh
npm install uid-ranger
pnpm add uid-ranger
yarn add uid-ranger
bun add uid-ranger
```

## 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.2.0 |
| Published | 2014-09-04 |
| First published | 2014-09-04 |
| Weekly downloads | 0 |
| License | Standard 3-clause BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Sune Simonsen |
| Maintainers | sunesimonsen |
| Keywords | IMAP |

## Links

- npm: https://www.npmjs.com/package/uid-ranger
- Repository: git@github.com:One-com/uid-ranger
- Homepage: https://github.com/One-com/uid-ranger
- Issues: https://github.com/One-com/uid-ranger/issues
- npm.io page: https://npm.io/package/uid-ranger

## Recent versions

- 1.2.0 (latest) — 2014-09-04

## README

# uidRanger

A library for parsing IMAP UID ranges.

## Usage

```js
var uidRanger = require('uid-ranger');
var uidRange = uidRanger.parse('5694:5696,5704,5712,5715:5717');

expect(uidRange.toString(), 'to equal', '5694:5696,5704,5712,5715:5717');
expect(uidRange.toArray(), 'to equal', [5694, 5695, 5696, 5704, 5712, 5715, 5716, 5717]);
expect(uidRange.length(), 'to equal', 8);
expect(uidRange.get(1), 'to equal', 5694);
expect(uidRange.get(4), 'to equal', 5712);
```

### Node

Install it with NPM or add it to your `package.json`:

```
$ npm install uidRanger
```

Then:

```js
var uidRanger = require('uid-ranger');
```

### Browser

Include `uidRanger.js`.

```html
<script src="uidRanger.js"></script>
```

this will expose the expect function under the following namespace:

```js
var uidRanger = one.uidRanger;
```

### RequireJS

Include the library with RequireJS the following way:

```js
require.config({
    paths: {
        uidRanger: 'path/to/uidRanger'
    }
});

define(['uidRanger'], function (uidRanger) {
   // Your code
});
```

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