šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

@teselagen/range-utils

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@teselagen/range-utils

<!-- TOC -->

0.3.13
latest
npm
Version published
Weekly downloads
6.8K
-16.1%
Maintainers
1
Weekly downloads
Ā 
Created
Source
  • [CHANGELOG](#changelogchangelogmd)
  • Installing
  • Usage
  • About this Repo
  • Editing This Repo:
  • Updating this repo:
  • Building
  • Running unit tests

CHANGELOG

Installing

npm install @teselagen/range-utils

Usage

import { getRangeLength } from '@teselagen/range-utils';

About this Repo

This is a collection of range utility functions.

A range must be an object with a start and end property. Eg:

const myRange = {
	start: 10,
	end: 40
}

A "circular" range has a start > end. Eg:

const myRange2 = {
	start: 50,
	end: 40
}

All ranges are assumed to have 0-based inclusive indices:

rrrr 0123 start = 0, end = 3

Editing This Repo:

All collaborators:

Edit/create a new file and update/add any relevant tests. You can run npm test to make sure all tests pass. Tests will automatically be run pre-commit.

Updating this repo:

Teselagen collaborators:

Commit and push all changes Sign into npm using the teselagen npm account (npm whoami)

npm version patch|minor|major
npm publish

Outside collaborators:

fork and pull request please :)

This library was generated with Nx.

Building

Run nx build range-utils to build the library.

Running unit tests

Run nx test range-utils to execute the unit tests via Jest.

FAQs

Package last updated on 24 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts