Skip to content

Latest commit

 

History

History
50 lines (34 loc) · 970 Bytes

readme.md

File metadata and controls

50 lines (34 loc) · 970 Bytes

between.js

between.js is a script that determines if a Number ( or a type that evaluates to Number ) is between two other numbers.

Usage

mynum = 4

mynum.between(2, 6) // True
mynum.between(6, 8) // False
mynum.between(4, 8, True) // True

Function Reference

Direct function call:

between(i, l, h, e = false)

Prototype method:

(input).between(i, l, h, e = false)

Arguments

  • i

    type: Number, Date

    Input value.

  • l

    type: Number, Date

    Low value.
    The lower end of the range to compare against.

  • h

    type: Number, Date

    High value.
    The higher end of the range to compare against.

  • e

    type: Boolean

    Or equal to.
    If True, the range compared against includes l and h.