# happyrestrange

> Express middleware to extract range from request

Latest version **1.4.6** (published 2015-09-04) · ISC license · 0 weekly downloads

## Install

```sh
npm install happyrestrange
pnpm add happyrestrange
yarn add happyrestrange
bun add happyrestrange
```

## 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.4.6 |
| Published | 2015-09-04 |
| First published | 2015-08-07 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Yannick Saint Martino |
| Maintainers | yanninho |

## Links

- npm: https://www.npmjs.com/package/happyrestrange
- Repository: https://github.com/yanninho/happyRestRange
- Homepage: https://github.com/yanninho/happyRestRange#readme
- Issues: https://github.com/yanninho/happyRestRange/issues
- npm.io page: https://npm.io/package/happyrestrange

## Recent versions

- 1.4.6 (latest) — 2015-09-04
- 1.4.5 — 2015-09-04
- 1.4.4 — 2015-09-04
- 1.4.3 — 2015-09-04
- 1.4.2 — 2015-09-03
- 1.4.1 — 2015-09-03
- 1.4.0 — 2015-09-03
- 1.3.0 — 2015-08-08
- 1.2.1 — 2015-08-07
- 1.2.0 — 2015-08-07
- 1.1.0 — 2015-08-07
- 1.0.0 — 2015-08-07

## README

# happyRestRange
Express middleware which extract range from request

# Example : 

	request : /test?range=10-20
	result : req.happyRest.range =  {"offset":"10","limit":"20"}

# install

npm install happyrestrange

# How to use ?

like all others Express middleware : 

## Application-level : 

var express = require('express')
  , happyRestRange = require('happyRestRange');

var app = express();

app.use(extractRange());

app.use('/test?range=10-20', function (req, res, next) {
  console.log('Range:', req.happyRest.range);
  next();
});

## Application-level : 

var express = require('express')
  , happyRestRange = require('happyRestRange');

var router = express.Router();

router.get('/test?range=10-20', extractRange(), function (req, res, next) {
	  console.log('Range:', req.happyRest.range);
	  next();
	})

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