This repository was archived by the owner on Feb 20, 2019. It is now read-only.
File tree 3 files changed +24
-0
lines changed
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'
7
7
import getQueryStringParam from './get-query-string-param'
8
8
import snakeToCamel from './snake-to-camel'
9
9
import padLeft from './pad-left'
10
+ import lessThan from './less-than'
10
11
import randomInteger from './random-integer'
11
12
import arrayFill from './array-fill'
12
13
import sortObjectsArray from './sort-objects-array'
@@ -120,4 +121,5 @@ export {
120
121
reverse ,
121
122
removeAccents ,
122
123
getQueryStringValue ,
124
+ lessThan ,
123
125
}
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