rangecontain

1.0.2 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i rangecontain

Weekly Downloads

0

Version

1.0.2

License

GPL-3.0-or-later

Unpacked Size

38 kB

Total Files

6

Last publish

Collaborators

  • sudeep_sharma101