mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 01:57:50 +00:00
Remove coercion method use.
This commit is contained in:
6
gt.js
6
gt.js
@@ -1,5 +1,3 @@
|
||||
import toNumber from './toNumber.js'
|
||||
|
||||
/**
|
||||
* Checks if `value` is greater than `other`.
|
||||
*
|
||||
@@ -23,8 +21,8 @@ import toNumber from './toNumber.js'
|
||||
*/
|
||||
function gt(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