mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Remove coercion method use.
This commit is contained in:
6
lt.js
6
lt.js
@@ -1,5 +1,3 @@
|
||||
import toNumber from './toNumber.js'
|
||||
|
||||
/**
|
||||
* Checks if `value` is less than `other`.
|
||||
*
|
||||
@@ -23,8 +21,8 @@ import toNumber from './toNumber.js'
|
||||
*/
|
||||
function lt(value, other) {
|
||||
if (!(typeof value == 'string' && typeof other == 'string')) {
|
||||
value = toNumber(value)
|
||||
other = toNumber(other)
|
||||
value = +value
|
||||
other = +other
|
||||
}
|
||||
return value < other
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user