# range-within

> Checks if one range is entirely contained within another range, i.e. equals to it or is contained within it.

Latest version **1.1.0** (published 2018-02-10) · Unlicense license · 0 weekly downloads

## Install

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

## 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.1.0 |
| Published | 2018-02-10 |
| First published | 2018-01-18 |
| Weekly downloads | 0 |
| License | Unlicense |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Anton Ivanov |
| Maintainers | anton-ivanov |
| Keywords | range, utilities, utils, within, contains |

## Links

- npm: https://www.npmjs.com/package/range-within
- npm.io page: https://npm.io/package/range-within

## Recent versions

- 1.1.0 (latest) — 2018-02-10
- 1.0.0 — 2018-01-18

## README

# range-within - Check that one range is entirely contained within another range #

Checks that one range of numbers, like `[1, 5]` is enirely contained within another
range of numbers, like `[0, 10]`.

## Usage ##

The function takes two arguments, each of which is an object containing the `start` and
`end` properties, which must be numbers.

The order of the ranges doesn't matter; you can put the larger or the shorter
range first.

```js
const within = require('range-within');

let range1 = {start: 1, end: 10};
let range2 = {start: 5, end: 10};

let result = within(range1, range2); // returns true
```

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