
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
in-between
Advanced tools
Test whether a number, english alphabet character or Date is between two others.
Test whether a number, english alphabet character or a date is between two others.
Augmented version of in-range made by Sindre Sorhus with a more functional taste
$ npm install in-between
With numbers:
const between = require('in-between')
const between1and10 = between(1, 10)
between1and10(10) //=> false
between1and10(3) //=> true
betweenAandZ('*') //=> throws error
between1and10(1) //=> false
between(100, 200)(101) //=> true
Works with alphabet characters:
const between = require('in-between')
const betweenAandD = between('a', 'd')
betweenAandD('b') //=> true
betweenAandD('z') //=> false
Works with Dates as well:
const between = require('in-between')
let myGraduation = new Date("October 13, 2014 11:13:00")
let myFirstJob = new Date("September 1, 2015 11:13:00")
let myBirthDay = new Date("January 10, 2015 10:11:03")
between(myGraduation, myFirstJob)(myBirthDay) //=> true
You can include the boundaries:
const between = require('in-between')
between(3, 4, true)(3) //=> true
between('a', 'b', true)('a') // => true
between(number | string | date, number | string | date, boolean) => function(number | string | date) => boolean
MIT © Alvaro Bernal
FAQs
Test whether a number, english alphabet character or Date is between two others.
We found that in-between demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.