This repository was archived by the owner on Feb 20, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import flatten from './flatten'
77import getQueryStringParam from './get-query-string-param'
88import snakeToCamel from './snake-to-camel'
99import padLeft from './pad-left'
10+ import lessThan from './less-than'
1011import randomInteger from './random-integer'
1112import arrayFill from './array-fill'
1213import sortObjectsArray from './sort-objects-array'
@@ -120,4 +121,5 @@ export {
120121 reverse ,
121122 removeAccents ,
122123 getQueryStringValue ,
124+ lessThan ,
123125}
Original file line number Diff line number Diff line change 1+ export default lessThan
2+
3+ /**
4+ * This method will check if num1 is less than num2
5+ *
6+ * @param {Number } num1 - first number
7+ * @param {Number } num2 - second number
8+ * @return {Boolean } - Returns true if num1 is less than num2, else false.
9+ */
10+ function lessThan ( num1 , num2 ) {
11+ return num1 < num2
12+ }
Original file line number Diff line number Diff line change 1+ import test from 'ava'
2+ import { lessThan } from '../src'
3+
4+ test ( 'checks if num1 is less than num2' , t => {
5+ const num1 = 1
6+ const num2 = 2
7+ const expected = true
8+ const actual = lessThan ( num1 , num2 )
9+ t . deepEqual ( actual , expected )
10+ } )
You can’t perform that action at this time.
0 commit comments