Skip to content

chrisantonellis/between.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

is this between that?

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published