1.0.2 • Published 9 months ago

rangecontain v1.0.2

Weekly downloads
-
License
GPL-3.0-or-later
Repository
github
Last release
9 months ago

Range Contained

License

Description

This is a JavaScript library for performing range checks. It provides a function rangeContain, to check if one range is fully or partially contained in another.

Table of Contents

Installation

To install it, you can use npm:

npm install rangecontain

Usage

You can use the function rangeContain to perform range checks:

const { rangeContain } = require("rangecontain");

const range1 = [2, 5];
const range2 = [3, 8];

console.log("Fully Contained:", rangeContain(range1, range2, "full"));
// Expected true

range1 = [2, 5];
range2 = [4, 7];

console.log("Partially Contained:", rangeContain(range1, range2, "part"));
// Expected true
1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago