Created
October 26, 2014 23:15
-
-
Save juntalis/d912af8345ddad879902 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mixins.numeric = { | |
gt: expects('number') | |
(function gt(value) { | |
return this.valueOf() > value; | |
}), | |
gte: expects('number') | |
(function gte(value) { | |
return this.valueOf() >= value; | |
}), | |
eq: expects('number') | |
(function eq(value) { | |
return this.valueOf() === value; | |
}), | |
ne: expects('number') | |
(function ne(value) { | |
return this.valueOf() !== value; | |
}), | |
lte: expects('number') | |
(function lte(value) { | |
return this.valueOf() <= value; | |
}), | |
lt: expects('number') | |
(function lt(value) { | |
return this.valueOf() < value; | |
}), | |
neq: expects('number') | |
(function neq(value) { | |
return this.ne(value); | |
}) | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment