# string-range

> check if a string is within a range

Latest version **1.2.2** (published 2013-07-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install string-range
pnpm add string-range
yarn add string-range
bun add string-range
```

## 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.2 |
| Published | 2013-07-17 |
| First published | 2013-03-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Dominic Tarr |
| Maintainers | dominictarr |

## Links

- npm: https://www.npmjs.com/package/string-range
- Repository: https://github.com/dominictarr/string-range
- Issues: https://github.com/dominictarr/string-range/issues
- npm.io page: https://npm.io/package/string-range

## Recent versions

- 1.2.2 (latest) — 2013-07-17
- 1.2.1 — 2013-04-04
- 1.2.0 — 2013-04-04
- 1.1.0 — 2013-03-12
- 1.0.0 — 2013-03-12

## README

# string-range

Check whether a string is within a range.

## Example

``` js
var ranges = require('string-range')

ranges.satisfies('hello', {min: 'a', max: 'z'})
=> true
ranges.satisfies('Hello', {min: 'a', max: 'z'})
=> false

//force a range inside a prefix!

ranges.satisfies('TYPE~key', ranges.prefix({min:'a', max:'z'}, 'TYPE')
=> true
```

`min` and `max` are alaises for `start` and `end`.

## License

MIT

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