New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

btwn

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

btwn

Check if a number is in your min-max bounds.

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

btwn npm npm Build Status

Check if a number is in your min-max bounds.

  • Lightweight
  • Builds into the Number prototype
  • 100% code coverage

Install

npm install btwn

...or...

yarn add btwn

Usage

require('btwn');

var x = 12; // a normal Number type variable

if(x.btwn(1, 13)){
	console.log("This number is under or equals to 13, and greater than or equals to 1.");
} else {
	console.log("This number is under 1 or greater than 13.");
}

Docs

Number.btwn(min, max, [inclusive])

  • min - Minimum value.
  • max - Maximum value.
  • inclusive - Are min and max inclusive. (Default: true)

To-do

  • Integrate into dates

Tests

Run mocha.

Keywords

FAQs

Package last updated on 01 Sep 2017

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc