mirror of
https://github.com/discourse/discourse.git
synced 2024-12-05 12:03:39 +08:00
16 lines
323 B
JavaScript
16 lines
323 B
JavaScript
|
import Helper from "@ember/component/helper";
|
||
|
|
||
|
export function gte([left, right], hash) {
|
||
|
if (hash.forceNumber) {
|
||
|
if (typeof left !== "number") {
|
||
|
left = Number(left);
|
||
|
}
|
||
|
if (typeof right !== "number") {
|
||
|
right = Number(right);
|
||
|
}
|
||
|
}
|
||
|
return left >= right;
|
||
|
}
|
||
|
|
||
|
export default Helper.helper(gte);
|